I should probably know this by now but I can't remember having to know this before!...
Inside a REXX exec, how do I execute an external function IMplicitly as a CLIST?
ie.
in REXX (DRIVER)
/*REXX*/ TRACE "C"
ADDRESS TSO
parms = "doe ray me so far lah tea doe" /* 'Sound of music' version! */
parms = TRANSLATE(parms,'_',' ') /* has to be one string, no blanks */
/* I can do the EXPLICIT execution */
"EX 'N472730.USER.EXEC(WRT)' 'W("parms")' CLIST "
/* BUT I want to do the IMPLICIT execution, which of course fails */
"%WRT 'W("parms")' CLIST "
/* ¯¯¯¯¯ unavailable on %invocation */
/* without the CLIST parm one gets a REXX error, even omitting W() */
"%WRT"
EXIT
ADDRESS TSO
parms = "doe ray me so far lah tea doe" /* 'Sound of music' version! */
parms = TRANSLATE(parms,'_',' ') /* has to be one string, no blanks */
/* I can do the EXPLICIT execution */
"EX 'N472730.USER.EXEC(WRT)' 'W("parms")' CLIST "
/* BUT I want to do the IMPLICIT execution, which of course fails */
"%WRT 'W("parms")' CLIST "
/* ¯¯¯¯¯ unavailable on %invocation */
/* without the CLIST parm one gets a REXX error, even omitting W() */
"%WRT"
EXIT
and in CLIST (WRT)
PROC 0 W(77)
CONTROL MAIN LIST MSG
WRITE &W
EXIT
CONTROL MAIN LIST MSG
WRITE &W
EXIT
The last two REXX attempts both result in...
IRX0043I Error running WRT, line 1: Routine not found
WRT could be in SYSPROC or SYSEXEC, or worse, both, and different content in each.
I need to know the setting of the SEARCHDD to find out which in order to search the allocations If I need to specify the dataset name explicitly.
I see no way to trap this from HELP.
OR... am I missing something?...
Is there a way that I can IMplicitly call it as a CLIST?
(I tried /*CLIST*/ at the head of WRT! No way, no such luck (would've been nice Mike?)
/Steve