Start an exec with a /* REXX */ comment
Start a REXX exec with a first-line comment that contains the word REXX so TSO runs it as REXX on z/OS 3.1.
A REXX exec must begin with a comment on line 1, and on z/OS 3.1 the comment must contain the word REXX. That is how TSO tells the exec apart from a CLIST when you run it from a library such as SYSPROC.
/* REXX */
SAY 'Hello from REXX'Hello from REXXThe comment has to start in column 1 of the first line. Without it, an exec found through SYSPROC is treated as a CLIST, and you get CLIST errors on perfectly good REXX statements. Execs found through SYSEXEC are always REXX, but the comment is still required by the language and costs nothing.
Put a real description after the word, as in /* REXX - list datasets for a user */. The check looks for the word REXX in the first comment, so keep the word there.