Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to substitute a value into the PARM?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to substitute a value into the PARM?
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

Moderator Team Head


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

PostPosted: Tue Jan 16, 2007 9:19 pm    Post subject: Re: How to substitute a value into the PARM?
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    Post subject: Re: How to substitute a value into the PARM?
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

Moderator Team Head


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

PostPosted: Tue Jan 16, 2007 11:22 pm    Post subject: Re: How to substitute a value into the PARM?
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    Post subject: Re: How to substitute a value into the PARM?
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm
No new posts Copy a particular column based on PAR... brindhamohan DFSORT/ICETOOL 5 Wed May 11, 2016 8:49 am
No new posts Use of Parm in SORT Ambili S DFSORT/ICETOOL 2 Mon May 09, 2016 9:16 pm
No new posts symbolic parm - allocate dsn krrp JCL & VSAM 11 Sat Oct 31, 2015 8:27 pm
No new posts EXEC SORT,REGION=0M,PARM=ELAP venugopal.mft DFSORT/ICETOOL 4 Wed May 20, 2015 12:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us