DD statement meaning



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

DD statement meaning

Postby ravisankarc » Wed Nov 30, 2011 7:50 pm

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
ravisankarc
 
Posts: 47
Joined: Thu Aug 27, 2009 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Re: DD statement meaning

 

Re: DD statement meaning

Postby Robert Sample » Wed Nov 30, 2011 8:12 pm

It's called a symbolic parameter. Check section 5.4.2.1 of the JCL Language Reference manual.
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: DD statement meaning

Postby BillyBoyo » Wed Nov 30, 2011 8:20 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: DD statement meaning

Postby steve-myers » Wed Nov 30, 2011 8:43 pm

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

Re: DD statement meaning

Postby gokulNmf » Thu Dec 01, 2011 9:19 am

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.
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 114
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 0 time
Been thanked: 0 time

Re: DD statement meaning

Postby steve-myers » Thu Dec 01, 2011 11:00 am

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

Re: DD statement meaning

Postby ravisankarc » Thu Dec 01, 2011 12:45 pm

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
ravisankarc
 
Posts: 47
Joined: Thu Aug 27, 2009 2:18 am
Has thanked: 0 time
Been thanked: 0 time

Re: DD statement meaning

Postby halfteck » Thu Dec 01, 2011 2:07 pm

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.
halfteck
 
Posts: 42
Joined: Tue Nov 08, 2011 8:47 pm
Has thanked: 0 time
Been thanked: 0 time

Re: DD statement meaning

Postby BillyBoyo » Thu Dec 01, 2011 3:53 pm

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).
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: DD statement meaning

Postby gokulNmf » Fri Dec 02, 2011 9:46 am

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. :)
Cheers,
Gokul
User avatar
gokulNmf
 
Posts: 114
Joined: Sat Mar 28, 2009 6:41 pm
Location: India
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post