Pass parms to rexx



IBM's Command List programming language & Restructured Extended Executor

Pass parms to rexx

Postby LasseH » Wed Oct 07, 2015 4:31 pm

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
LasseH
 
Posts: 70
Joined: Mon Nov 08, 2010 2:51 pm
Has thanked: 7 times
Been thanked: 1 time

Re: Pass parms to rexx

Postby NicC » Wed Oct 07, 2015 7:01 pm

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.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Pass parms to rexx

Postby Steve Coalbran » Wed Jan 13, 2016 8:03 pm

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         
Steve
User avatar
Steve Coalbran
 
Posts: 138
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 13 times
Been thanked: 1 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post