This little REXX snippet does just fine with most TSO commands including
those with data sets in single quotes.
/* REXX */
arg cmd
ADDRESS "TSO"
pq=pos("'",cmd); do while pq>0
cmd=insert("''",cmd,pq)
pq=pos("'",cmd,pq+3); end
interpret "'"cmd"'"
BUT !!! it goes crazy when you try to use it with "*" and/or "**" . Wants
to treat the "*" as arithmetic operators. Makes something like LISTDSD
DA('SYS1.**') AUTH fail every time. Any suggestions on how to get this to
just treat the "*" as a String?
15 +++ 'LISTDSD DA('''SYS1.**''')'
15 +++ interpret "'"cmd"'"
IRX0026I Error running TR$, line 15: Invalid whole number
----------------------------------------------------------------------
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