To execute a RXS program, write the program in any dataset on the mainframe using ISPF edit, write rxs in the command line in the edit screen (==> rxs) and press the enter key. No allocation of the dataset containing the program is necessary. It is not necessary to 'save' the program before execution: the RXS interpreter works as an ISPF-macro. The dataset may have COBOL numbers, these are ignored in the interpretation of the program, but output will be generated using COBOL numbers in this situation.
In case of errors, error messages from RXS will pop up over the line in error in the program.
ISPF command ==> hilite rexx will syntax colour what is on the screen, and that can be very handy, especially because quotes are used quite intensive in RXS. This syntax colouring highlights unbalanced quotes.
RXS programs also may be executed as TSO commands. The prerequisite is that these RXS programs are members in a dataset allocated to the TSO session as file RXSLIB (Section 35).
RXS programs may also be executed from JCL (Section 36).
RXS programs must execute inside TSO + ISPF environment.
When debugging is needed, note the following:
If execution of a RXS program has to be stopped, press the 'Esc' button, which starts a termination dialogue. Now enter hi for 'halt immediate', or he for 'halt execution'. 'Halt execution' will kill any sub process from the RXS program as well - 'halt immediate' will not kill activities in SQL for instance, and not stopping such activities might block the RXS program from stopping.
RXS do not discriminate between upper and lower case.. NUMB and numb is the same variable name and )action and )ACTION works the same. Strings used in general orders don't discriminate either: FUNC='SQL' and FUNC='sql' will work identically. But for user variables case does matter: a='B' and a='b' are not identical assignments.
RXS programs may be written in a dataset using COBOL line numbering (columns 1 thru 6 numeric). These line numbers are ignored (but influences the allocation of stdout - see Section 32)
Input datasets for RXS program having last qualifier of the name equal to 'COBOL', and having column 1 thru 6 numeric or blank, will be read ignoring column 1 thru 6.
If columns 73 thru 80 are numeric, if column 72 is not entirely numeric, and if the record length of the file is 80, then columns 73 to 80 are ignored. This principle applies to both the RXS program itself and to input files used in the program.
Any statement may be continued on the next line by ending the first line with a comma:
"Alas my love, you",
"do me wrong"
"to cast me off discour",
Alas my love, you do me wrong
to cast me off discourteously...
If || (the concatenation operator) is written in front of the continued line, the two parts of the line are concatenated without an interleaving blank. Otherwise an interleaving blank is placed between the two parts of the line. In some european ebcdic (Nordic...) , use !! instead of ||.
Blanks are allowed in front of )action, )endaction and the other RXS delimiters. Readability is augmented when intending is used for marking the logical nesting of blocks.
Comments surrounded by /* and */ may be written anywhere inside action blocks - also in general orders.
Any line starting with ) is interpreted as a special RXS delimiter. Even if it is inside a comment block.
Outside action blocks (in text blocks and outside blocks) lines are not interpreted. Accordingly comments are not recognized as comments, but are written to output.
To place comments outside action blocks, use the special RXS marker )nop:
)nop "This is just a comment"
)nop lines are always ignored in the interpreting and do never qualify for output.
RXS programs may be executed using parameters. If in an IPSF edit session on a RXS program, you write rxs what's up doc in the command field on the edit screen, RXS will receive the string "what's up doc" in the RXS variable rxsparm.
The parameter is not allowed to start with characters | or ?