Using TSO/E REXX for z/OS UNIX processing

Start of changeA REXX program is recognized by the word 'REXX' on the first line and within a REXX comment. The string is not case-sensitive.
  • When the REXXPARSE=SHELL option is specified in the BPXPRMxx member, 'REXX' must be the first character in the comment after the opening '/*'. The following example shows a simple REXX program that can be recognized by the REXXPARSE=SHELL option:
    /*REXX*/ 
    say 'hello world' 
  • When the REXXPARSE=TSO option is specified in BPXPRMxx, you can put 'REXX' anywhere on the first line within the comment. The following example shows a simple REXX program that can be recognized by the REXXPARSE=TSO option but not with REXXPARSE=SHELL:
        /* this is rexx */ 
    say 'hello world' 
End of change

The set of z/OS UNIX extensions to the TSO/E Restructured Extended Executor (REXX) language enables REXX programs to access z/OS UNIX callable services. The z/OS UNIX extensions, called syscall commands, have names that correspond to the names of the callable services they invoke, such as access, chmod, and chown.

You can run an interpreted or compiled REXX program with syscall commands from TSO/E, from MVS batch, from the z/OS UNIX shell, or from a program. You can run a REXX program with syscall commands only on a system with z/OS UNIX System Services installed. For a complete description of each syscall command, see The syscall commands.

The set of z/OS UNIX REXX functions also extend the REXX language on z/OS® in the z/OS UNIX environment. Some functions provide standard REXX I/O and access to some common file services and environment variables. All of the z/OS UNIX functions, except bpxwunix() and syscalls(), must be run in a z/OS UNIX environment. For a complete description of each function, see z/OS UNIX REXX functions.

For dynamic allocation and dynamic output, BPXWDYN is a text interface to a subset of the SVC 99 and SVC 109 services that can be called from REXX. For a complete description of BPXWDYN, see BPXWDYN: a text interface to dynamic allocation and dynamic output.

Restriction: LISTDSI does not support files in the UNIX file system. It is a TSO/E external function and can be used only in REXX execs that run in the TSO/E address space.