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 pass parm value to a pli pgm with sqls

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: how to pass parm value to a pli pgm with sqls
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 25, 2008 1:32 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Apr 25, 2008 2:17 pm    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Fri Apr 25, 2008 7:27 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Sat Apr 26, 2008 12:13 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm
No new posts Is it possible to pass variables of s... Csongor CLIST & REXX 2 Fri Jun 10, 2016 7:33 pm
No new posts Copy a particular column based on PAR... brindhamohan DFSORT/ICETOOL 5 Wed May 11, 2016 8:49 am


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