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
//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
Pete AKA Carmen