I’m trying to fetch content in variables lying in another APPL(zapplid)
I’m starting the “subroutine” from a Rexx like this
(sample code is just a small part…)
I can’t use RETURN rcode ‘text’, so I’m trying to “QUEUE” the result but that don’t work either
Does anyone have another (working) solution?
/* REXX */
trace r
address "ISPEXEC" "SELECT CMD(%TSTAPPL2) NEWAPPL(ABCD)"
say 'Back from TSTAPPL2 RC='rc
pull tstappl2_result
say 'From TSTAPPL2' strip(tstappl2_result)
exit 0
Subroutine:
/* REXX */
trace r
say 'Entering TSTAPPL2'
address ispexec 'vget zapplid shared'
say 'TSTAPPL2: zapplid='zapplid
queue 'This is a return text from TSTAPPL2'
return 0
The result is
3 *-* address "ISPEXEC" "SELECT CMD(%TSTAPPL2) NEWAPPL(ABCD)"
>>> "SELECT CMD(%TSTAPPL2) NEWAPPL(ABCD)"
3 *-* say 'Entering TSTAPPL2'
>>> "Entering TSTAPPL2"
Entering TSTAPPL2
4 *-* address ispexec 'vget zapplid shared'
>>> "vget zapplid shared"
5 *-* say 'TSTAPPL2: zapplid='zapplid
>>> "TSTAPPL2: zapplid=ABCD"
TSTAPPL2: zapplid=ABCD
6 *-* queue 'This is a return text from TSTAPPL2'
>>> "This is a return text from TSTAPPL2"
7 *-* return 0
>>> "0"
COMMAND THIS NOT FOUND ç= this seems to be “before” we are exiting the subroutine
+++ RC(12) +++
4 *-* say 'Back from TSTAPPL2 RC='rc
>>> "Back from TSTAPPL2 RC=12"
Back from TSTAPPL2 RC=12
5 *-* pull tstappl2_result ç== here it’s waiting…
//Lasse
Same result
To view this discussion on the web visit https://groups.google.com/a/nd.edu/d/msgid/ispf-l-list/951783408.2571840.1674055955168%40mail.yahoo.com.
I realize that you’re looking for a way to return a string on the stack, and I don’t know why that isn’t working. But I’m distracted by the return code from the subroutine. Why 12? The subroutine seems to run correctly, and explicitly returns 0. Seems to me there might be a clue there.
---
Bob Bridges, robhb...@gmail.com, cell 336 382-7313
/* When I was ten, I read fairy tales in secret and would have been ashamed if I had been found doing so. Now that I am fifty I read them openly. When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up. -C.S. Lewis */
--