On Mon, Dec 27, 2010 at 2:57 PM, John Mattson <[email protected]> wrote: > 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
Why are you using INTERPRET here? I can't hardly read it due to the quotes-within-quotes, so maybe it would be obvious in another font, but it seems like that's the key question. If you just want it to execute the command, remove the INTERPRET. -- zMan -- "I've got a mainframe and I'm not afraid to use it" ---------------------------------------------------------------------- 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

