Rexx - 1.1


Compatibility: v2 v3 Express
What's new? Release Notes
ID: com.castsoftware.rexx

Description

If your Mainframe application contains Rexx (z/OS TSO/E REXX) source code and you want to view these object types and their links with other objects, then you should install this extension.

The extension provides Rexx programs and routines, the calls between them and to other programs, the SQL queries run through DB2 (DSNREXX), the files accessed with EXECIO, and the links from JCL steps.

Download and installation instructions

The extension will be automatically downloaded and installed when any of the file types listed below are delivered in the source code. It can be managed through the Application → Extensions interface.

Supported file types

Code type Supported file extension Required? Comments
Rexx programs *.rexx (case insensitive) ✅ 1 program per file

Files that do not look like Rexx (no REXX comment on the first line and no Rexx-only statement such as PARSE ARG) get a Rexx Program object, but their content is not analyzed.

Supported languages

Scope Status
TSO/E REXX execs on z/OS: TSO/ISPF execs, ISPF edit macros, batch execs (IRXJCL, IKJEFT*), REXX Compiler source ✅
Classic REXX for other systems (VM/CMS, REXX/VSE, Regina, …): analyzed as REXX, but their host commands (ADDRESS CMS, CP, …) are not interpreted ⚠️
Object REXX / ooRexx extensions, NetRexx ❌

Host commands are interpreted only for EXECIO, DB2 (DSNREXX) and ISPEXEC SELECT PGM. Other host environments (ISREDIT, SYSCALL, NetView, …) are analyzed as plain REXX code.

Transactions

Transaction support is derived from metamodel concepts used to build CAST Imaging Blueprint and structural transaction flows. Entry Points start transactions; Exit Points include both output/boundary concepts and Data Entities manipulated by transactions.

Role Support Breakdown
Entry Point No direct concept type details
Exit Point
  • Procedure

Data version: 1.0.1-funcrel

ISO 5055 Structural Rules

Quality support is based on ISO 5055 structural rules available for the selected extension version.

Reliability Maintainability Security Performance Efficiency

Data version: 1.0.1-funcrel

What results can you expect?

Programs, routines and calls

Each .rexx file is a Rexx Program. Each label is a Routine, or a Protected Routine when it is declared with PROCEDURE. A routine runs from its label to the next label.

Calls create a call link from the calling program or routine. The target is found as follows:

  • CALL name and function calls name(...): the routine of the same file with this name. When a label is declared several times in the file, the last one is used. Otherwise, all the analyzed Rexx programs with this name. A data set member such as CALL 'MY.REXX.LIB(MYPGM)' is resolved by its member name (MYPGM). Calls to Rexx built-in functions (SUBSTR, DATE, …) and TSO/E external functions (OUTTRAP, LISTDSI, SYSDSN, …) are ignored.
  • SIGNAL name and SIGNAL ON condition [NAME name]: only the routine of the same file with this name (for SIGNAL ON condition without NAME, the routine named after the condition). A SIGNAL never targets another program, and a SIGNAL to the routine it is written in (a jump back to its own label) creates no link.
  • ADDRESS ISPEXEC "SELECT PGM(name)" (or a "ISPEXEC SELECT PGM(name)" command): only the analyzed Rexx programs with this name, never a routine of the same file.

When a CALL, a function call or an ISPF SELECT PGM matches no routine and no Rexx program, a Call to Generic Program object is created, which can be linked to programs of other languages (see Calls to other languages).

SQL support

The extension creates a SQL Query object for each SQL statement run through the DB2 REXX interface (DSNREXX): CALL SQLEXEC, CALL SQLXCMD and EXECSQL commands. The query is linked from the program or routine that runs it. Links from the queries to the tables, views and procedures are created by the SQL Analyzer extension.

Dynamic SQL is supported: for PREPARE ... FROM :variable and EXECUTE IMMEDIATE :variable, the query text is the value assigned to the variable, with one query for each possible value. A part whose value is not known at analysis time is replaced by {}.

For example:

/* REXX - reorganize a department */
CALL REORG
EXIT

REORG: PROCEDURE
ADDRESS DSNREXX
"EXECSQL UPDATE DSN8C10.DEPT SET MGRNO = NULL WHERE DEPTNO = 'E21'"
SQLSTMT = "DELETE FROM DSN8C10.EMP WHERE WORKDEPT = 'E21'"
"EXECSQL EXECUTE IMMEDIATE :SQLSTMT"
RETURN

rexx_sql_queries.png

File access (EXECIO)

EXECIO commands create a Rexx File object for each DD name, with an access read link (DISKR), an access write link (DISKW) or both (DISKRU) from the program or routine that runs the command.

For example:

/* REXX - copy the input records to the output file */
"EXECIO * DISKR INDD (STEM REC. FINIS"
"EXECIO" REC.0 "DISKW OUTDD (STEM REC. FINIS"
EXIT

Calls to other languages

Rexx programs are linked to and from programs written in other languages (COBOL, PL/I, Assembler, …) by the Web Services Linker extension. For example, the Rexx program below is linked to the COBOL program COBPGM, and a COBOL CALL 'MAINPGM' is linked to the Rexx program MAINPGM:

/* REXX - run the COBOL report program */
PARSE ARG MEMBER
CALL COBPGM MEMBER
EXIT

Objects

Type Object Name Creation rule
Rexx Program Rexx Program Created for each .rexx source file, named after the file.
Rexx Function Rexx Routine Created for each name: label that is not followed by PROCEDURE. Its code runs from the label to the next label.
Rexx Procedure Rexx Protected Routine Created for each name: PROCEDURE label. Its code runs from the label to the next label.
Rexx File Rexx File Created once per program for each DD name read or written with EXECIO ... DISKR, DISKRU or DISKW.
CAST_Rexx_SqlQuery Rexx SQL Query Created for each SQL statement run with CALL SQLEXEC, CALL SQLXCMD or an EXECSQL command of ADDRESS DSNREXX, attached to the program or routine that runs it. For PREPARE ... FROM :var and EXECUTE IMMEDIATE :var, one query is created for each value assigned to the variable.
REXX Call to Generic Program Rexx Call to Generic Program Created when a program or routine calls a program that is not analyzed. There is one object per caller and called name, attached to the caller.
Caller type Caller description Link Callee type Callee description Creation rule
Rexx Program Rexx Program call Link Rexx Function Rexx Routine Created when the program calls a routine of the same file with CALL name, name(...) or SIGNAL name.
Rexx Program Rexx Program call Link Rexx Procedure Rexx Protected Routine Created when the program calls a protected routine of the same file with CALL name, name(...) or SIGNAL name.
Rexx Program Rexx Program call Link Rexx Program Rexx Program Created when the program calls another analyzed Rexx program with CALL name, name(...) or ISPEXEC SELECT PGM(name). For CALL 'HLQ.LIB(MEMBER)', the member name is used.
Rexx Program Rexx Program call Link REXX Call to Generic Program REXX Call to Generic Program Created when the program calls, with CALL name, name(...) or ISPEXEC SELECT PGM(name), a name that is not a label of the file, a Rexx or TSO built-in function, or an analyzed Rexx program.
Rexx Program Rexx Program call Link CAST_Rexx_SqlQuery REXX SQL Query Created when the program runs SQL with CALL SQLEXEC, CALL SQLXCMD or an EXECSQL command.
Rexx Program Rexx Program accessRead Link Rexx File Rexx File Created when the program reads the file with EXECIO ... DISKR or DISKRU.
Rexx Program Rexx Program accessWrite Link Rexx File Rexx File Created when the program writes the file with EXECIO ... DISKW or DISKRU.
Rexx Function Rexx Routine call Link Rexx Function Rexx Routine Created when the routine calls a routine of the same file with CALL name, name(...) or SIGNAL name.
Rexx Function Rexx Routine call Link Rexx Procedure Rexx Protected Routine Created when the routine calls a protected routine of the same file with CALL name, name(...) or SIGNAL name.
Rexx Function Rexx Routine call Link Rexx Program Rexx Program Created when the routine calls another analyzed Rexx program with CALL name, name(...) or ISPEXEC SELECT PGM(name). For CALL 'HLQ.LIB(MEMBER)', the member name is used.
Rexx Function Rexx Routine call Link REXX Call to Generic Program REXX Call to Generic Program Created when the routine calls, with CALL name, name(...) or ISPEXEC SELECT PGM(name), a name that is not a label of the file, a Rexx or TSO built-in function, or an analyzed Rexx program.
Rexx Function Rexx Routine call Link CAST_Rexx_SqlQuery REXX SQL Query Created when the routine runs SQL with CALL SQLEXEC, CALL SQLXCMD or an EXECSQL command.
Rexx Function Rexx Routine accessRead Link Rexx File Rexx File Created when the routine reads the file with EXECIO ... DISKR or DISKRU.
Rexx Function Rexx Routine accessWrite Link Rexx File Rexx File Created when the routine writes the file with EXECIO ... DISKW or DISKRU.
Rexx Procedure Rexx Protected Routine call Link Rexx Function Rexx Routine Created when the protected routine calls a routine of the same file with CALL name, name(...) or SIGNAL name.
Rexx Procedure Rexx Protected Routine call Link Rexx Procedure Rexx Protected Routine Created when the protected routine calls a protected routine of the same file with CALL name, name(...) or SIGNAL name.
Rexx Procedure Rexx Protected Routine call Link Rexx Program Rexx Program Created when the protected routine calls another analyzed Rexx program with CALL name, name(...) or ISPEXEC SELECT PGM(name). For CALL 'HLQ.LIB(MEMBER)', the member name is used.
Rexx Procedure Rexx Protected Routine call Link REXX Call to Generic Program REXX Call to Generic Program Created when the protected routine calls, with CALL name, name(...) or ISPEXEC SELECT PGM(name), a name that is not a label of the file, a Rexx or TSO built-in function, or an analyzed Rexx program.
Rexx Procedure Rexx Protected Routine call Link CAST_Rexx_SqlQuery REXX SQL Query Created when the protected routine runs SQL with CALL SQLEXEC, CALL SQLXCMD or an EXECSQL command.
Rexx Procedure Rexx Protected Routine accessRead Link Rexx File Rexx File Created when the protected routine reads the file with EXECIO ... DISKR or DISKRU.
Rexx Procedure Rexx Protected Routine accessWrite Link Rexx File Rexx File Created when the protected routine writes the file with EXECIO ... DISKW or DISKRU.
Caller type Caller description Link Callee type Callee description Creation rule
JCL Step JCL Step call Link Rexx Program Rexx Program Created when a JCL step, analyzed by com.castsoftware.mainframe, runs IRXJCL or IKJEFT* and names an analyzed Rexx program in PARM='...' or in its SYSTSIN input (%name or ISPSTART CMD(name)).

Quality rules

Known limitations

The following common constructs are not supported yet:

  • Programs started through a TSO command are not linked: "%NAME", "EX 'HLQ.LIB(NAME)'" (or EXEC), an exec run as an implicit TSO command (ADDRESS TSO "NAME ..."), and ISPEXEC SELECT CMD(...). Only CALL name, name(...) and ISPEXEC SELECT PGM(name) are linked.
  • Load modules started with ADDRESS LINKMVS, LINKPGM, ATTCHMVS or ATTCHPGM are not linked.
  • Dynamic code is not analyzed: INTERPRET, SIGNAL VALUE, and host commands held in a variable (for example ADDRESS DSNREXX CMD).
  • SQL: only DB2 through DSNREXX is supported. IMS DL/I calls (ADDRESS REXXTDLI) are not.
  • Files: only EXECIO is supported. ALLOC/FREE are not analyzed, so a Rexx File is named after its DD name and is not linked to the dataset. Stream I/O functions (LINEIN, LINEOUT, CHARIN, …) are not supported.
  • JCL: in the SYSTSIN input, EX/EXEC commands are not supported, and a PARM using a symbolic parameter (&NAME) is not resolved.