View previous topic :: View next topic
|
Author |
Message |
manikandanjs
New User
Joined: 02 Jun 2006 Posts: 27 Location: Blue Bell, PA
|
|
|
|
Hi,
My requirement is, I'm having a date with value as '20070101'. This value needs to get substitute into as PARM. For egs,
The member F6412EC2 needs to get substituted with the value CDATE which will be dynamically changing.
Code: |
// SET CDATE=2007017
//STEP001 PGM=ICEMAN
//SORTIN DD DSN=USERID.INPUT1.DISP=SHR
// DD DSN=USERID.INPUT2,DISP=SHR
//SORTOUT DD DSN=USERID.OUTPUT1
// DISP=(NEW,CATLG,DELETE)
//SYSIN DD DSN=USERID.PARM(F6412EC2),
// DISP=SHR
|
The param is like this,
Code: |
OPTION COPY
OUTFIL REMOVECC,HEADER1=(1:C'01',3:C'CES ',
13:C'USERID.TRAN.ELG.D',&CDATE,
|
In the above file name USERID.TRAN.ELG.D',&CDATE
the &CDATE needs to get substituted dynamically.
Can you please help me in this regard?
Thanks,
Manikandan J |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
You'll need to write the program that will convert the JCL variable CDATE into a valid symbolic statement that DFSORT can process. For example:
Code: |
// SET CDATE=2007017
//*
//STEP000 EXEC PGM=WHATEVER,PARM='&CDATE'
//SYMNAMES DD DSN=&&T1,DISP=(,PASS),UNIT=VIO,RECFM=FB,LRECL=80
//*
//STEP001 EXEC PGM=ICEMAN
//SORTIN DD DSN=USERID.INPUT1.DISP=SHR
// DD DSN=USERID.INPUT2,DISP=SHR
//SORTOUT DD DSN=USERID.OUTPUT1
// DISP=(,CATLG,DELETE)
//SYSIN DD DSN=USERID.PARM(F6412EC2),
// DISP=SHR
//SYSOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&T1,DISP=(OLD,DELETE)
//*
|
where the program WHATEVER takes value from the parameter, and creates a valid DFSORT symbolic parameter that looks like this:
Code: |
//SYMNAMES DD *
CDATE,C'2007017'
/*
|
and is used in the SYSIN as:
Code: |
OPTION COPY
OUTFIL REMOVECC,HEADER1=(1:C'01',3:C'CES ',
13:C'USERID.TRAN.ELG.D',CDATE)
|
|
|
Back to top |
|
|
manikandanjs
New User
Joined: 02 Jun 2006 Posts: 27 Location: Blue Bell, PA
|
|
|
|
Hi,
Thanks for your information. But i've to do the same thing without writting a program :-)
Regards,
Manikandan J |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Can you set the value of CDATE by some means other than the SET statement? Can it possibly be retrieved from a dataset instead? |
|
Back to top |
|
|
manikandanjs
New User
Joined: 02 Jun 2006 Posts: 27 Location: Blue Bell, PA
|
|
|
|
Hi,
The CYCDATE is passed from the JCL. I'll use the parm inside the PROC where the sustitution needs to happen while expanding.
Thanks
Manikandan J |
|
Back to top |
|
|
|
|