Page 1 of 1

Overriding a single DD out of many in JCL.

Posted: Thu Dec 04, 2014 2:27 pm
by Kirti Kakkar
Hi

I've a PROC which has got a step having 6 dataset concatenated to it. I need to override this step for a test Job run to have only one dataset and null-out other datasets. Can we do this? Please let me know if there is any way of doing this.

Thanks

Re: Overriding a single DD out of many in JCL.

Posted: Thu Dec 04, 2014 2:51 pm
by enrico-sorichetti
the manuals "jcl guide" and "jcl reference" will tell all You might want to know on the subject :mrgreen:

You can reach the manuals starting from ...
http://www-03.ibm.com/systems/z/os/zos/ ... index.html

Re: Overriding a single DD out of many in JCL.

Posted: Thu Dec 04, 2014 5:45 pm
by William Collins
And be particularly careful in reading. If you use DD DUMMY or NULLFILE for anything in the concatenation except the (logically) last DD, you'll probably not get the results you want.

Re: Overriding a single DD out of many in JCL.

Posted: Tue Jan 06, 2015 2:23 pm
by Kirti Kakkar
Thanks enrico. So if I've a JCL like this

Code: Select all

//step10 dd exec=pgm
//           dd dsn=abc.xyz,disp=shr
//           dd dsn=abcd.xyz,disp=shr
//           dd dsn=abcde.xyz,disp=shr
//           dd dsn=abcdef.xyz,disp=shr
//           dd dsn=abcdefg.xyz,disp=shr
/*
//*
and I want to override the third data set, this should work?

Code: Select all

//step10 dd exec=pgm
//           dd dsn=abc.xyz,disp=shr
//           dd dsn=abcd.xyz,disp=shr
//           dd dsn=over.ride.dataset,disp=shr
//           dd dsn=abcdef.xyz,disp=shr
//           dd dsn=abcdefg.xyz,disp=shr
/*
//*

Re: Overriding a single DD out of many in JCL.

Posted: Tue Jan 06, 2015 9:43 pm
by Robert Sample
First, your JCL is invalid -- DD EXEC won't work.
Second, your first DD statement needs a DD name.
Third, your post mentions wanting to override a concatenation set with a single DD statement -- not what you did in your last post.
Fourth, (fixing your JCL error) you could also do this

Code: Select all

//DD1        dd 
//           dd 
//           dd dsn=over.ride.dataset,disp=shr
//           dd 
//           dd 
to keep the first, second, fourth, and fifth data sets as they are in the PROC.
Fifth, your original post can be accomplished by using a one-line DD override (the concatenated data sets will not be used).