Features and components of REXX

REXX is a versatile programming language. It can be mixed with commands to host environments, it provides powerful functions, and it has extensive mathematical capabilities.

REXX programs can do many tasks under CICS®. These include issuing EXEC CICS commands, SQL statements, as well as commands to the CEDA (Resource Definition Online Transaction) and CEMT (Main Terminal Transaction) utilities.

Features of REXX

Some of the features of REXX are as follows:

Ease of use

The REXX language is easy to read and write because many instructions are meaningful English words. REXX instructions are common words, such as SAY, PULL, IF…THEN…ELSE…, DO…END, and EXIT.

Free format

There are only a few rules about REXX format. You do not need to start an instruction in a particular column. You can skip spaces in a line, or skip entire lines. You can have an instruction span of many lines, or have multiple instructions on one line. You do not need to predefine variables. You can type instructions in upper, lower, or mixed case. See Syntax of REXX instructions.

Built-in functions

REXX supplies built-in functions that perform various processing, searching, and comparison operations for both text and numbers. Other built-in functions provide formatting capabilities and arithmetic calculations.

Debugging capabilities

When a REXX program running in REXX/CICS encounters an error, REXX writes messages describing the error. You can also use the REXX TRACE instruction and the interactive debug facility to locate program errors.

Interpreted language

The REXX/CICS product includes the REXX/CICS interpreter. When a REXX program runs, the interpreter processes each line directly. You do not need to compile or link-edit the program before you can run it.

Extensive parsing capabilities

REXX includes extensive parsing capabilities for character manipulation, so you can set up a pattern to separate characters, numbers, and mixed input.

Components of REXX

REXX is made up of the following components, which make it a powerful tool for programmers:
Clauses
Clauses can be instructions, null clauses, or labels. Instructions can be:
  • Keyword instructions
  • Assignments
  • Commands (REXX/CICS and CICS commands and SQL).
The language processor processes keyword instructions and assignments.
Built-in functions
These functions are built into the language processor and provide convenient processing options.
External functions
REXX/CICS provides these functions that interact with the system to do specific tasks for REXX.
Data stack functions
A data stack can store data for I/O and other types of processing

Prerequisites

REXX/CICS runs under all supported releases of CICS Transaction Server. There are no other prerequisites, other than those required by CICS TS.

Runtime facility

The REXX/CICS MVS™ Runtime Facility provides a runtime environment for REXX/CICS MVS execs, so that you can run REXX/CICS execs on a CICS region that does not have the REXX/CICS MVS development system installed.

This is especially useful if a company has multiple CICS regions, where only certain regions are available for REXX-based development, but wants the ability to run those execs. You can also use the Runtime Facility to run products that have a REXX prerequisite on other regions, without purchasing a license for the full REXX/CICS MVS development system.