Page 1 of 1

DD statement meaning

PostPosted: Wed Nov 30, 2011 7:50 pm
by ravisankarc
Hi,

Can anyone explain me the meaning of below DD statement :

//INCLIN DD DSN=&INCL,UNIT=SYSALLDA,SPACE=(TRK,(1,1)),DISP=(,PASS)

Here, I would like to know about the meaning of DSN=&INCL

Thanks in advance!!!

Regards
Ravi

Re: DD statement meaning

PostPosted: Wed Nov 30, 2011 8:12 pm
by Robert Sample
It's called a symbolic parameter. Check section 5.4.2.1 of the JCL Language Reference manual.

Re: DD statement meaning

PostPosted: Wed Nov 30, 2011 8:20 pm
by BillyBoyo
At the same time, look at the difference if it were &&INCL, when you're checking one thing, always useful to keep an eye open for something else.

Re: DD statement meaning

PostPosted: Wed Nov 30, 2011 8:43 pm
by steve-myers
ravisankarc wrote:Hi,

Can anyone explain me the meaning of below DD statement :

//INCLIN DD DSN=&INCL,UNIT=SYSALLDA,SPACE=(TRK,(1,1)),DISP=(,PASS)

Here, I would like to know about the meaning of DSN=&INCL

Thanks in advance!!!

Regards
Ravi
In this context, DSN=&INCL has two potential meanings:
  • In the original definition of JCL, &INCL specified a temporary dataset with name &INCL. This meaning is still used if &INCL has not been assigned a value. If &INCL has been assigned a value, symbol substitution is done as in this code.
    //         SET INCL=XX.YY
    //INCLIN   DD  DSN=&INCL,...
  • As Billyboy mentioned, DSN=&&INCL was added when JCL symbols were added to JCL, and it defines a temporary dataset with name &INCL. Symbol substitution is not done for &INCL.

Re: DD statement meaning

PostPosted: Thu Dec 01, 2011 9:19 am
by gokulNmf
Hi ravisankarc,

As BillyBoyo & steve-myers mentioned, there can be 2 possibilities,

Case1. &INCL can be a symbolic parameter, in this case check the Symbols declared in the SET statement.
SET INCL=******

substitute &incl. with *****..

Case2. check whether &&incl, in this case it will be a temporary dataset. As the disp parameter is pass, there is a possibility of it being a temporary dataset.

Re: DD statement meaning

PostPosted: Thu Dec 01, 2011 11:00 am
by steve-myers
gokulNmf wrote:... Case2. check whether &&incl, in this case it will be a temporary dataset. As the disp parameter is pass, there is a possibility of it being a temporary dataset.
DISP=(...,PASS) does not necessarily mean the dataset is a "temporary" dataset. Consider this JCL.
//A       EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  *
Data to copy to SYSUT2
//SYSUT2   DD  DISP=(NEW,PASS),UNIT=SYSDA,
//             DCB=(RECFM=FB,LRECL=80,DSORG=PS),
//             SPACE=(TRK,(1,1)),
//             DSN=XX.YY
//SYSIN    DD  DUMMY
//B       EXEC PGM=IEFBR14
//KEEPIT   DD  DISP=(OLD,CATLG),DSN=XX.YY
The SYSUT2 dataset in step A is not a temporary dataset, but it is "passed" to step B to catalog it. If step B is not run because step A abnormally terminates, XX.YY is deleted at the end of the job because its initial allocation (DISP=(NEW,...)) implies the dataset is to be deleted.

Re: DD statement meaning

PostPosted: Thu Dec 01, 2011 12:45 pm
by ravisankarc
Hi All,

Thank you for the response. &INCL is not a temporary dataset. It could be a symbolic parameter. But no where in my JCL the SET parameter has been mentioned that's why I am confused. Below is my JCL for your reference :

//Job Statement
//ARCGFSRC EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTIN DD DISP=SHR,
// DSN=&EDGGVAR2
//SORTOUT DD DISP=(NEW,PASS),
// UNIT=SYSALLDA,
// LIKE=&EDGGVAR2,
// DSN=&EDGGFILE
//MSGOUT1 DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSIN DD *

here some SORT control statements are there

In this case I want to know the meaning of DSN=&EDGGVAR2 and DSN=&EDGGFILE.

Thanks N Regards
Ravi

Re: DD statement meaning

PostPosted: Thu Dec 01, 2011 2:07 pm
by halfteck
OK simply put, if, in your JOB, there is NO value EDGGVAR2=xxxxx, or EDGGFILE=xxxx then they are temporary names. However, if this is all the JCL for the job, then EDGGVAR2 HAS to be a symbolic / variable (its name can give this thought also), as it quotes DISP=SHR, so exists prior to the SORT starting. Variable names cannot be used across different jobs,
Also i have it in my mind that variable names can only total 8 characters including & but i am not sure. Your name lengths are 9 including &.
With no SET statement there is NO evaluation of possible variables.

Re: DD statement meaning

PostPosted: Thu Dec 01, 2011 3:53 pm
by BillyBoyo
Put ,TYPRUN=SCAN on the JOB card and submit. Have a look at the output, paste it here (the JCL and messages shown in the output).

Re: DD statement meaning

PostPosted: Fri Dec 02, 2011 9:46 am
by gokulNmf
As BillyBoyo said run it using typrun and check. Also I have one suggestion if this is existing job running in production space such do a check with the scheduler as this can be overridden by the scheduler also. I am not sure though. :?
Steve ur correct, i just mention it as a possibility. :)