IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to substitute a value into the PARM?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manikandanjs

New User


Joined: 02 Jun 2006
Posts: 27
Location: Blue Bell, PA

PostPosted: Tue Jan 16, 2007 8:26 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jan 16, 2007 9:19 pm
Reply with quote

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
View user's profile Send private message
manikandanjs

New User


Joined: 02 Jun 2006
Posts: 27
Location: Blue Bell, PA

PostPosted: Tue Jan 16, 2007 11:06 pm
Reply with quote

Hi,

Thanks for your information. But i've to do the same thing without writting a program :-)

Regards,
Manikandan J
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Jan 16, 2007 11:22 pm
Reply with quote

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
View user's profile Send private message
manikandanjs

New User


Joined: 02 Jun 2006
Posts: 27
Location: Blue Bell, PA

PostPosted: Wed Jan 17, 2007 8:17 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts JCL EXEC PARM data in C Java & MQSeries 2
No new posts Need to specify PARM='POSIX(ON) Java & MQSeries 4
No new posts How to pass the PARM value to my targ... COBOL Programming 8
No new posts substitute TN3270 All Other Mainframe Topics 6
No new posts Passing parm from JCL to Assembler, b... PL/I & Assembler 2
Search our Forums:

Back to Top