Todd Burch wrote:
<snip>
modaddr = some_variable_determined_above ; pgm.1 = "/* rexx */" ; pgm.2 = "Address IPCS ""LIST" modaddr". LENGTH(256)""" ; pgm.0 = 2 ; Address TSO "ALLOC F(TEMP) DA(CLIST.CLIST(TEMP)) SHR REUSE" ; Address MVS "EXECIO * DISKW TEMP (FINIS STEM pgm." ; Address ISPEXEC "SELECT PGM(BLSGSCMD) PARM('%TEMP') NEWAPPL(BLSG) PASSLIB" ;

.
.
.

(the above typed from memory - not copy/pasted from my working exec)
So it's clunky.  Plus, if running the first time, if member TEMP does not
exist in CLIST.CLIST, it blows up, so for production use, I would have to
add logic to determine if it already exists, if not, blah blah blah. I tried to do this, but it didn't work:
text = "IPCS LIST" modaddr". LENGTH(256)" ;
Address ISPEXEC "SELECT PGM(BLSGSCMD) PARM('"text"') NEWAPPL(BLSG) PASSLIB" or some flavor thereof, and that did not work. Thus the clunk.
I don't see your rationale for getting a data set into the picture. Instead of passing a LIST subcommand to IPCS, you should be able to pass an ISPEXEC request as though it were the original subcommand that you had in mind. Skipping the quotation marks and substitution concerns:

Address IPCS ispexec PGM(BLSGSCMD) PARM(list modaddr length(256)) PASSLIB

BLSGSCMD takes care of breaking out the subcommand/command-procedure invocation using what TSO I/O service routines call an instorage list. IPCS/TSO code lets your pass command names and operands in mixed case, folding those operands that need it to upper case during parsing. I'd have to double-check whether the text interpreted by ISPEXEC needs to be in upper case as I've shown.

--
Bob Wright - [EMAIL PROTECTED]

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to