Using the REXX Interface to Unicenter CA-JCLCheck Utility/JCLNEAT

Document ID : KB000055681
Last Modified Date : 14/02/2018
Show Technical Document Details

An interface has been provided in both Unicenter CA-JCLCheck and JCLNEAT that allows clients to use a REXX exec for more customized processing. To facilitate the writing of these REXX execs, we have further made available both the "raw" jcl and most individual jcl parameters and sub-parameters. This data is provided in REXX "stem-variables". Stem-variables allow data to be used and manipulated within a REXX exec as well as be passed back and forth between REXX and Unicenter CA?JCLCheck/JCLNEAT. Stem-variables in REXX take the form of stem.varname, where stem is a common base name and varname identifies unique variables within the base, e.g. DD.DSN - DD is the stem and DSN is the varname. In addition to these stem-variables, REXX allows the use of simple variables like VOLNAME or NUMTAPES. One common problem encountered when writing a REXX exec and using the stem-variables supplied by us is that the writer will incorrectly use a simple variable to save and/or manipulate the value of one of our stem-variables. In this case, the writer will try to use the varname portion of a stem-variable as the simple variable, e.g. DSN = DD.DSN. This will result in the simple variable being assigned the original value of the stem-variable. However, subsequent to the assignment, the value of the stem-variable will be altered by prefixing the "stem" portion to the original value. The following example demonstrates this:

Values before assignment statements:

DD.DSN = ABC.DS1
DD.VOLUME = VOL1

Code fragment:

DSN = DD.DSN
DS1 = DD.DSN
DASD = DD.VOLUME

Values after assignment statements:

DD.DSN = DD.ABC.DS1
DD.VOLUME = VOL1

DSN = ABC.DS1
DS1 = DD.ABC.DS1
DASD = VOL1

In conclusion, follow this rule:

Do not create a simple variable with a name that matches "ANY" level of a stem-variable name.