I have One JCL in which I am using PROC....
And I want to override the DSN value in PROC by passing the DSN name from JCL....
When I am giving the updated DSN name from JCL....still it is taking the old DSN name from PROC only....
I am not sure if i need to use any environment parameter setting to override the DSN name from JCL to PROC?
#EnterpriseDeveloperHi Harish,
Can you share a cut down example of how you are approaching this, that can help me understand the syntax you are using. Please share the relevant PROC and JCL to review. Also, is the same syntax working on the mainframe or is this new JCL you are writing/trying?
Hi Harish,
Can you share a cut down example of how you are approaching this, that can help me understand the syntax you are using. Please share the relevant PROC and JCL to review. Also, is the same syntax working on the mainframe or is this new JCL you are writing/trying?
JCL:--
//SABLSX80 JOB (9990,9990),'SABLSX-TEST',
// CLASS=P,USER=SABLSX,MSGCLASS=A
//*
//SM455S10 EXEC DD603C10,
// CNTRL='RTR1.SYSIN(SABLSX03)'
//GDTFFILE DD DSN=T.SM455.TRAN01,
// DISP=(NEW,PASS,DELETE),
// DCB=(SYS2.MODDSCB,BLKSIZE=6233,RECFM=VB),
// UNIT=SYSDA,
// SPACE=(6233,(5000,500),RLSE)
//*
PROC:--
//DD603C10 PROC CNTRL='RTR1.SYSIN(COMMANDS)',
// DSNAME='P.XXXXXXXX(+1)',
// VOLNO='PVT002',
// SPACE='(CYL,(10,2),RLSE)',
// SOUT='*'
//*
//DD603X01 EXEC DB2BATCH
//SYSTSIN DD DSN=RTR1.SYSIN(DD603CRD),DISP=SHR
//* -------------------------- I N P U T ---------------------------
//*
//SYSIN DD DSN=&CNTRL,DISP=SHR
//*
//* ------------------------- O U T P U T --------------------------
//GDTFFILE DD DSN=&DSNAME, OS BACKUP FILE
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,VOL=SER=&VOLNO,
// SPACE=&SPACE,
// DCB=(SYS2.MODDSCB,BLKSIZE=6233,RECFM=VB)
//SYSUDUMP DD SYSOUT=&SOUT
//SYSOUD DD SYSOUT=&SOUT DISPLAYS
//SYSPRINT DD SYSOUT=&SOUT
//*
JCL:--
//SABLSX80 JOB (9990,9990),'SABLSX-TEST',
// CLASS=P,USER=SABLSX,MSGCLASS=A
//*
//SM455S10 EXEC DD603C10,
// CNTRL='RTR1.SYSIN(SABLSX03)'
//GDTFFILE DD DSN=T.SM455.TRAN01,
// DISP=(NEW,PASS,DELETE),
// DCB=(SYS2.MODDSCB,BLKSIZE=6233,RECFM=VB),
// UNIT=SYSDA,
// SPACE=(6233,(5000,500),RLSE)
//*
PROC:--
//DD603C10 PROC CNTRL='RTR1.SYSIN(COMMANDS)',
// DSNAME='P.XXXXXXXX(+1)',
// VOLNO='PVT002',
// SPACE='(CYL,(10,2),RLSE)',
// SOUT='*'
//*
//DD603X01 EXEC DB2BATCH
//SYSTSIN DD DSN=RTR1.SYSIN(DD603CRD),DISP=SHR
//* -------------------------- I N P U T ---------------------------
//*
//SYSIN DD DSN=&CNTRL,DISP=SHR
//*
//* ------------------------- O U T P U T --------------------------
//GDTFFILE DD DSN=&DSNAME, OS BACKUP FILE
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,VOL=SER=&VOLNO,
// SPACE=&SPACE,
// DCB=(SYS2.MODDSCB,BLKSIZE=6233,RECFM=VB)
//SYSUDUMP DD SYSOUT=&SOUT
//SYSOUD DD SYSOUT=&SOUT DISPLAYS
//SYSPRINT DD SYSOUT=&SOUT
//*
Hi Harish, thanks you for the sample. Can you provide more specific information, e.g. which variable / DSN are you overriding in the sample, this will help to ensure we understand which line/DSN you are working on.
Hi Harish, thanks you for the sample. Can you provide more specific information, e.g. which variable / DSN are you overriding in the sample, this will help to ensure we understand which line/DSN you are working on.
- We are running below JCL that calling DD603C10 PROC with SYSIN CARD and GDTFFILE.

And In DD603C10 PROC DSN name is &DSNAME should override this DSNAME='P.XXXXXXXX(+1)' in below screenshots:---

in the above screenshot it is default DSN value.
it should replace in the below Piece of code:--

But it is not replaced while running JCL, see the job output below:--

To test if this is an issue code being in a PROC or not, can you move all the JCL into one job, then test, does it work or not?
Yes, if i move everything in one JCL....then it is working fine.
- We are running below JCL that calling DD603C10 PROC with SYSIN CARD and GDTFFILE.

And In DD603C10 PROC DSN name is &DSNAME should override this DSNAME='P.XXXXXXXX(+1)' in below screenshots:---

in the above screenshot it is default DSN value.
it should replace in the below Piece of code:--

But it is not replaced while running JCL, see the job output below:--

To test if this is an issue code being in a PROC or not, can you move all the JCL into one job, then test, does it work or not?
Yes, if i move everything in one JCL....then it is working fine.
Hi Harish, for this I suggest you to consider raising a support case, if the issue is proc specific there may be a product issue and the way to pass that on to our developer team if needed would be via the support case. Please consider this, include the sample JCL, detailed problem description and screenshots for review.