Page 3 of 3

Re: Changing a DDNAME in a JCL.

PostPosted: Thu Apr 05, 2012 9:10 pm
by Peter_Mann
steve-myers wrote:In all these posts, I'm surprised no one mention the DDNAME=alternate keyword. About the only time it's commonly used is in cataloged procedures that invoke the Binder or the old Linkage Editor, as in -

//LINK PROC
//LINK EXEC PGM=IEWL
//SYSPRINT DD SYSOUT=*
//SYSLMOD DD DISP=(,PASS),UNIT=SYSDA,SPACE=(CYL,(1,1,1)),DSN=&&G(GO)
//SYSLIN DD DDNAME=SYSIN
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
// PEND

and it's called like this -

//LINK EXEC LINK,PARM='MAP,XREF,LIST'
//OBJLIB DD ---
//SYSIN DD *
INCLUDE OBJLIB(member)
ENTRY NEWPGM

Now this does not change the DD name as seen by the program, but it does provide a mechanism to "change" the DD name in the JCL, which may be the real goal of the topic starter.

I was thinking about that also Steve, I do it with SAS and other utilities, but when I tested with this JCL
//COPYIT   EXEC PGM=IEBGENER   
//SYSPRINT DD SYSOUT=*         
//SYSUT1 DD *                 
SOME NOT SO IMPORTANT DATA     
//SYSUT2 DD DDNAME=ACCDEV     
//ACCDEV DD SYSOUT=*           
//SYSIN    DD  DUMMY           

the DDANME in SDSF was SYSUT2 not ACCDEV :D
Pete AKA Carmen

Re: Changing a DDNAME in a JCL.

PostPosted: Fri Apr 06, 2012 12:26 am
by steve-myers
Yes, that's correct. Shortly after I wrote my DDNAME=newname post I went back to the first post, and realized - without testing, by the way - that SDSF would show the real, as opposed to the alternate, DD name.