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

Re: Pass parms to rexx

 

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: 2568
Joined: Sun Jul 04, 2010 12:13 am
Location: Down on the pig farm
Has thanked: 4 times
Been thanked: 90 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: 98
Joined: Wed Apr 06, 2011 11:49 am
Location: Stockholm, Sweden
Has thanked: 4 times
Been thanked: 1 time


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post