Page 1 of 1

Pass parms to rexx

PostPosted: Wed Oct 07, 2015 4:31 pm
by LasseH
Trying to pass parameters to a rexx (not in sysexec-concatenation)

Using

address tso "EXEC 'MY.OWN.DSN(MYREXX)'


and my parameter contains ' within the string.

TSO will complain if I do this:
address tso "EXEC 'MY.OWN.DSN(MYREXX)' 'USERID /ds/lib/dis  FORM_user='userid'; FORM_work='reset' ¤and.so.on'"

INVALID KEYWORD, userid'

And if I use " round the parameterlist

"EXEC 'MY.OWN.DSN(MYREXX)' "USERID /ds/lib/dis  FORM_user='userid'; FORM_work='reset' ¤and.so.on""

the result is

INVALID KEYWORD, "USERID
INVALID KEYWORD, /ds/lib/dis
INVALID KEYWORD, FORM_user='userid'

Does anyone have a clue?

//Lasse

Re: Pass parms to rexx

PostPosted: Wed Oct 07, 2015 7:01 pm
by NicC
look up how to use quotes within quotes. You have single quotes within single quotes. It is the userid related to form_user that is the problem.

Re: Pass parms to rexx

PostPosted: Wed Jan 13, 2016 8:03 pm
by Steve Coalbran
Hej Lasse, Nic, (sorry been off-fora for a while, changing jobs!)
Something like this perhaps...

N472730.USER.EXEC(MYDRIVE)
/*REXX*/                                       
TRACE "C"                                       
ADDRESS TSO                                     
QUEUE "FORM_user='"userid"';FORM_work='reset';"
"EXEC 'N472730.USER.EXEC(MYREXX)'"
EXIT

N472730.USER.EXEC(MYREXX)
/*REXX*/                     
PULL parms                   
/*do stuff */
SAY "PARMS="parms   
EXIT