Overriding a single DD out of many in JCL.

JES2/3, JCL, utilities.
Post Reply
Kirti Kakkar
New Member
Posts: 7
Joined: Tue Jul 08, 2014 3:55 pm

Overriding a single DD out of many in JCL.

Post 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
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 826
Joined: Wed Sep 11, 2013 3:57 pm

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

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
William Collins
Global Moderator
Global Moderator
Posts: 490
Joined: Sun Aug 25, 2013 7:24 pm

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

Post 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.
Kirti Kakkar
New Member
Posts: 7
Joined: Tue Jul 08, 2014 3:55 pm

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

Post 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
/*
//*
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1895
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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).
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”