How to pass parameters to a Clist



IBM's Command List programming language & Restructured Extended Executor

How to pass parameters to a Clist

Postby cbhargavi » Wed Mar 20, 2013 6:47 pm

Hi everyone,

First of all am new to rexx and clist.
I have an issue related to rexx and clist.
I have a clist called cname in pds id.sample.jcl
it is saying like this
PROC 5 A,B,C,D,E
CONTROL NOFLUSH NOPROMPT NOLIST NOSYMLIST NOCONLIST NOMSG
OPENFILE TEMPFILE OUTPUT
SET &TEMPFILE = &A &B &C &D &E
PUTFILE TEMPFILE
CLOSFILE TEMPFILE
FREE FI(TEMPFILE)

So here all these paramters getting written in to a temporary file .

My requirement is i want to know from where it is getting the parameters.
what and all I know how to pass parameters to a clist is %clistname parm1,parm2,parm3,parm...
this is for implictly passing the paramteres.
so I searched for the same syntax in the id.sample.jcl pds which i mentioned earlier.
this is pds is composed of all those related modules.

can any one suggest me is this is the correct process to search or is there any other way to pass parameters to a clist
cbhargavi
 
Posts: 20
Joined: Mon Oct 15, 2012 5:43 pm
Has thanked: 0 time
Been thanked: 0 time

Re: How to pass parameters to a Clist

 

Re: How to pass parameters to a Clist

Postby steve-myers » Wed Mar 20, 2013 10:05 pm

Your OPEN TEMPFILE OUTPUT won't work unless you have allocate TEMPFILE before you call the CLIST. Whether TEMPFILE is a temporary data set or a permanent data set depends on the way it was allocated.

And, no, I know of no way to determine whether the value for &A through &E came from the command line used to call the CLIST or if TSO prompted the terminal operator for the value.
steve-myers
Global moderator
 
Posts: 1886
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 197 times

Re: How to pass parameters to a Clist

Postby c62ap90 » Thu Mar 21, 2013 1:52 am

You can pass parameters to a clist like this...
TSO EX ' pds id.sample.jcl(cname)' 'vala' 'valb' 'valc' 'vald' 'vale'
c62ap90
 
Posts: 125
Joined: Thu Oct 11, 2012 10:24 pm
Has thanked: 1 time
Been thanked: 6 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post