Changing a DDNAME in a JCL.



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Re: Changing a DDNAME in a JCL.

Postby Peter_Mann » Thu Apr 05, 2012 9:10 pm

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
Peter
Peter_Mann
 
Posts: 145
Joined: Fri Jun 24, 2011 7:37 pm
Location: Lowell,AR
Has thanked: 15 times
Been thanked: 3 times

Re: Changing a DDNAME in a JCL.

Postby steve-myers » Fri Apr 06, 2012 12:26 am

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.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Previous

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post