Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DDNAME parameter

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 287
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Mon Dec 19, 2016 4:41 pm    Post subject: DDNAME parameter
Reply with quote

Hi,

A job is using DDNAME parameter in one of the step as shown below:

Code:
Modified Version                |  Original Version
++++++++++++++++++++++++++++++++|+++++++++++++++++++++++++++++++++
//STEP01   EXEC PGM=IEBGENER    |  //STEP01  EXEC PGM=IEBGENER
//SYSIN    DD DUMMY             |  //SYSIN    DD DUMMY
//SYSOUT   DD SYSOUT=*          |  //SYSOUT   DD SYSOUT=*
//SYSPRINT DD SYSOUT=*          |  //SYSPRINT DD SYSOUT=*
//SYSUT2   DD SYSOUT=*          |  //SYSUT2   DD SYSOUT=*
//SYSUT1   DD DSN=&&DSN01,      |  //SYSUT1   DD DDNAME=FIRSTDD
//            DISP=(OLD,DELETE) |  //FIRSTDD  DD DSN=&&DSN01,
//         DD DSN=&&DSN02,      |  //            DISP=(OLD,DELETE)
//            DISP=(OLD,DELETE) |  //         DD DSN=&&DSN02,
//         DD DSN=&&DSN03,      |  //            DISP=(OLD,DELETE)
//            DISP=(OLD,DELETE) |  //         DD DDNAME=NEXTDD
                                |  //NEXTDD   DD DSN=&&DSN03,
                                |  //            DISP=(OLD,DELETE)


DSN01, DSN02, DSN03 will always be created in previous steps. DSN02 might be empty in some cases.

My question is: Is there any scenario in which original version will behave different from the modified version? Is the original version more efficient?
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1817
Location: NY,USA

PostPosted: Tue Dec 20, 2016 3:05 am    Post subject:
Reply with quote

NEXTDD will always be appended. Did you execute them to know the results?
Back to top
View user's profile Send private message
mistah kurtz

Active User


Joined: 28 Jan 2012
Posts: 287
Location: Room: TREE(3). Hilbert's Hotel

PostPosted: Tue Dec 20, 2016 1:55 pm    Post subject:
Reply with quote

Yes. I did execute both the jobs and getting the same results. I was just wondering if DDNAME is serving any specific purpose in this context.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1922
Location: UK

PostPosted: Tue Dec 20, 2016 3:05 pm    Post subject:
Reply with quote

Yes, of course it is. It is, perhaps, an unusual usage and who knows why the writer of the JCL did that but it serves a purpose - to assign data set names to a ddname.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1817
Location: NY,USA

PostPosted: Tue Dec 20, 2016 10:05 pm    Post subject:
Reply with quote

Yes DDNAME has its own purpose, but in this context you will see no effect because there are NO "DD statements between the forward reference and the concatenation".
Referenced DD statement

Try adding SYSUT1 before SYSUT2 in your Original version (which is not right now) and you will see only DSN01 is copied.
Back to top
View user's profile Send private message
mohitsaini
Warnings : 1

New User


Joined: 15 May 2006
Posts: 92

PostPosted: Fri Dec 23, 2016 10:20 pm    Post subject: Reply to: DDNAME parameter
Reply with quote

I think both versions will produce equal performance as the original version will not consume any additional CPU cycle.
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 585
Location: The Universe

PostPosted: Sat Dec 24, 2016 7:08 am    Post subject:
Reply with quote

I prepared and ran this JCL. The JOB statement and other identifiable information has been redacted. It has both versions of the IEBGENER step. The "TSO" step executes a private TIOT command located in the STEPLIB data set.
Code:
//A       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  *
DSN01
//SYSUT2   DD  DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,1),DSN=&&DSN01
//SYSIN    DD  DUMMY
//B       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  *
DSN02
//SYSUT2   DD  DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,1),DSN=&&DSN02
//SYSIN    DD  DUMMY
//C       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  *
DSN03
//SYSUT2   DD  DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,1),DSN=&&DSN03
//SYSIN    DD  DUMMY
//D       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DISP=(OLD,PASS),DSN=&&DSN01
//         DD  DISP=(OLD,PASS),DSN=&&DSN02
//         DD  DISP=(OLD,PASS),DSN=&&DSN03
//SYSUT2   DD  SYSOUT=*
//SYSIN    DD  DUMMY
//E       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  DDNAME=FIRSTDD
//SYSUT2   DD  SYSOUT=*
//SYSIN    DD  DUMMY
//FIRSTDD  DD  DISP=(OLD,PASS),DSN=&&DSN01
//         DD  DISP=(OLD,PASS),DSN=&&DSN02
//         DD  DDNAME=LASTDD
//LASTDD   DD  DISP=(OLD,PASS),DSN=&&DSN03
//F       EXEC PGM=IKJEFT01,PARM=TIOT
//STEPLIB  DD  DISP=(SHR,PASS),DSN=&SYSUID..LOAD
//         DD  DISP=(SHR,PASS),DSN=&SYSUID..OLOAD
//SYSTSPRT DD  SYSOUT=*
//SYSTSIN  DD  DUMMY
//SYSUT1   DD  DDNAME=FIRSTDD
//SYSUT2   DD  SYSOUT=*
//SYSIN    DD  DUMMY
//FIRSTDD  DD  DISP=(OLD,PASS),DSN=&&DSN01
//         DD  DISP=(OLD,PASS),DSN=&&DSN02
//         DD  DDNAME=LASTDD
//LASTDD   DD  DISP=(OLD,PASS),DSN=&&DSN03
The "original" JCL in step E just processed the first data set. An analysis of the TIOT from the TSO step gives a clue as to what actually happened.
Code:
XXXXXXJ F
STEPLIB  0A38 VVVV08 2 XXXXXX.LOAD
         0A6B VVVV1B 0 XXXXXX.OLOAD
SYSTSPRT SSDS
SYSTSIN  DMY
SYSUT1   0A2E WRK002 0 SYS16358.T195722.RA000.XXXXXXJ.DSN01.H01
SYSUT2   SSDS
SYSIN    DMY
         0A2F WRK003 0 SYS16358.T195722.RA000.XXXXXXJ.DSN02.H01
         0A2E WRK002 0 SYS16358.T195722.RA000.XXXXXXJ.DSN03.H01
The SSDS code means subsystem data set. The command also obtains the data set name and, if it can find it, the EXCP count for the DD statement.

What happened?

It seems to me that when the JCL processor encounters DDNAME=xxx, it copies the data from the xxx DD statement and inserts it into the DD statement it is processing, and removes the referenced DD statement
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Regarding time parameter shanthi gude JCL & VSAM 7 Mon Sep 04, 2017 2:31 pm
No new posts Paasing symbolic parameter to instrea... Robert Sample JCL & VSAM 2 Thu Jul 27, 2017 1:22 pm
No new posts JTS parameter Shashank Chaubey JCL & VSAM 2 Thu Jul 13, 2017 4:15 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us