Skip to content
systemcoding.dev
Mainframe

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.

1 min read
Summarize in AI

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.

HELLOrexx
/* REXX */
SAY 'Hello from REXX'
Text
Hello from REXX

The 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.

Share

More snippets

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.