I "borrowed" the LPINFOX REXX program from this url: http://www.longpelaexpertise.com/toolsLPinfoX.php
When I run it "directly" (EX 'hlq.LPINFOX.EXEC') it runs fine:
------------------------------------------------------
LPInfo: Information for z/OS ssssssss as of 18 Mar 2021
------------------------------------------------------
z/OS version: 02.04
Sysplex name: LOCAL
JES: JES2 z/OS 2.4 (Node nnnn)
Security Software: RACF
CEC: 3907-Z02 (IBM Z z14 ZR1)
CEC Serial: ssssss
CEC Capacity mmmm MSU
LPAR name: llll
LPAR Capacity mmmm MSU
Not running under a z/VM image
I inserted a call to the LPINFOX exec into another exec, and this results in a RC -2 from the address LINKPGM call:
------------------------------------------------------
LPInfo: Information for z/OS sssssss as of 18 Mar 2021
------------------------------------------------------
z/OS version: 02.04
Sysplex name: LOCAL
JES: JES2 z/OS 2.4 (Node N1)
Security Software: RACF
79 - Address Linkpgm 'IWMQVS QVS_Out'
+++ RC(-2) +++
CEC: -
CEC Serial:
LPAR name:
Not running under a z/VM image
I did an EXECUTIL TS prior to the exec and this is what is output:

When LPINFOX is run "directly" this is the EXECUTIL TS output:

In this case, the address LINKPGM works fine.
I'm sure this has to do with the second level of REXX program running, but what can I do about the error?
Thanks,
Scott