panelmainframezosrexxispf

Are ISPEXEC services available in ISPF panel REXX?


Here's an ISPF panel definition:

)BODY
 Hello, world!
)PROC
*REXX
ADDRESS ISPEXEC "CONTROL ERRORS CANCEL"
*ENDREXX
)END

The panel displays fine, but the imbedded REXX immediately fails:

*-*  ADDRESS ISPEXEC "CONTROL ERRORS CANCEL"
+++ RC(-3) +++

A return code of -3 typically means that the command environment doesn't know what to do with the command.

It seems reasonable that an ISPF panel would be able to cope with an ISPF request. Any idea what's going on?


Solution

  • *REXX code cannot issue ISPF service requests as per note 5 in the article:

    The *REXX statement.

    I'd suggest having a good read of the article.