Page 1 of 1

How to pass parameters to a Clist

PostPosted: Wed Mar 20, 2013 6:47 pm
by cbhargavi
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

Re: How to pass parameters to a Clist

PostPosted: Wed Mar 20, 2013 10:05 pm
by steve-myers
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.

Re: How to pass parameters to a Clist

PostPosted: Thu Mar 21, 2013 1:52 am
by c62ap90
You can pass parameters to a clist like this...
TSO EX ' pds id.sample.jcl(cname)' 'vala' 'valb' 'valc' 'vald' 'vale'