When using an CA OPS/MVS function sample from the manuals, you get an invalid function call.
Like here in this sample with the OPSYSPLX function from the manual :
temp = OPSYSPLX("I","S")
do temp
pull line
say line
end
The following record was returned in a local sysplex:
XAE1 E1 LOCAL AEBE70DBFCB89206 20030602 16:51:16 1 5 8500 8800 ACTIVE+SINGLE_SYSTEM
This results in :
ERROR 5 RUNNING OPSYSPLX, LINE 0: MACHINE RESOURCES EXHAUSTED, CODE=2
ERROR 40 RUNNING OPSYSPLX, LINE 1: INCORRECT CALL TO ROUTINE
ERROR 40 RUNNING OPSYSPLX, LINE 1: INCORRECT CALL TO ROUTINE
ERROR 40 RUNNING OPSYSPLX, LINE 1: INCORRECT CALL TO ROUTINE
ERROR 40 RUNNING OPSYSPLX, LINE 1: INCORRECT CALL TO ROUTINE
ERROR 40 RUNNING OPSYSPLX, LINE 1: INCORRECT CALL TO ROUTINE
ERROR 40 RUNNING OPSYSPLX, LINE 1: INCORRECT CALL TO ROUTINE
etc...
The CA OPS/MVS function you call is also the member name of your rexx in the PDS.
In the case of the OPSYSPLX function, the member name you used for the OPSYSPLX function in the PDS is also called OPSYSPLX.
If you do so it will just call itself over and over again, and get the error described above.
Change the name of the member of the PDS that contains your REXX program to something else than OPSYSPLX in this case. To something different than a function name.