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

how to pass parm value to a pli pgm with sqls


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Fri Apr 25, 2008 1:19 pm
Reply with quote

I have a jcl as following.i want to pass TM(=04) value to pli source.
but it didn't work,anybody can tell me how to correct it?

jcl
Code:
//XXXXXXX  JOB (,,,'TM=04')
....
//STEP010  EXEC PGM=IKJEFT01
....
//SYSTSIN  DD  *                               
 DSN SYSTEM(xxx)                               
   RUN PROGRAM(PGM01) PLAN(PGM01)  -     
   LIB(XXXXXX)  PARMS(&TM)
 END                                           
/*


pli source
Code:
PGM01: PROC (PARM) OPTIONS(MAIN);
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 25, 2008 1:32 pm
Reply with quote

You can not use symbolics in instream data
Back to top
View user's profile Send private message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Fri Apr 25, 2008 1:52 pm
Reply with quote

hi expat,
you mean I can't pass symbolic to my pli pgm?
or any other methods?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Apr 25, 2008 2:17 pm
Reply with quote

LIB(XXXXXX) PARMS(&TM)

The PARMS(&TM) will not be substituted as it is not JCL code, but is instream data

Have you tried with the value for &TM coded as it should be ? i.e. 04
Back to top
View user's profile Send private message
julian123

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Fri Apr 25, 2008 2:27 pm
Reply with quote

yes, '04' works well.
but &TM stands for current month, it will be changed next month.
so i can't put '04' there directly.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri Apr 25, 2008 7:27 pm
Reply with quote

Hello,

Quote:
so i can't put '04' there directly.
That is what you can do directly. What you cannot is substitute for &TM in sinstream data.

You could implement a step to be executed before the step you posted that would create the "instream data" and write it to a dasd file with the month resolved. This: "//SYSTSIN DD * " would become "//SYSTSIN DD DSN=". The data written to the dasd file would have the specific month, not the symbolic parameter &TM.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Apr 26, 2008 12:13 pm
Reply with quote

You could set up 12 members in a PDS, one for each month, and use

//SYSIN DD DSN=Dataset Name(XX&TM.),DISP=SHR
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 -> JCL & VSAM

 


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 Dynamically pass table name to a sele... DB2 2
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
Search our Forums:

Back to Top