Accessing resource table data

Because of the way CICSPlex® SM supplies resource table data to REXX, two additional commands are provided as part of the REXX function package:

TPARSE
Extracts individual resource table attributes from a record and places them into standard REXX variables. The resource table record itself can be supplied in any valid REXX variable, including a stem variable.

You can use TPARSE to break down and access the attribute data in a resource table record.

TBUILD
Builds a CPSM Definition or CICS® Definition resource table record from a set of variables that you supply. Each variable must contain an individual resource table attribute.

You can use TBUILD to build the resource table record for a definition that you want to create, update, or remove in the CICSPlex SM data repository.

Note:
TBUILD only uses attributes that you specify; it does not assume any default values for optional attributes. If you do not supply a variable for an attribute that is optional, the corresponding field in the resource table record is initialized according to its data type (that is, character fields are set to blanks, binary data and EYUDA values are set to zeroes).

The variables that represent the resource table attributes are created either by CICSPlex SM, in the case of TPARSE, or by you, in the case of TBUILD. The variable names are formed by adding a prefix to the attribute name, like this:

  prefix_fieldname

where:

prefix
Is a text string that you supply. The maximum allowable length for a prefix is determined by REXX and the environment in which the program runs.
fieldname
Is the name of an attribute in the resource table.

An underscore character (_) must be inserted between the prefix and the attribute name.

When a program written in REXX passes resource table records to the API, the format and layout of the record must be exactly as it is defined by CICSPlex SM.

For complete descriptions of the TBUILD and TPARSE commands, see CICSPlex System Manager Application Programming Reference.

Translating attribute values

The TBUILD and TPARSE commands use the TRANSLATE API command when processing certain resource table attributes. For example, EYUDA and CVDA values are maintained in a resource table record in their numeric form. By default, the TPARSE command converts these values into a displayable character form. TBUILD, on the other hand, converts any EYUDA or CVDA character values that you supply into their numeric equivalents.

However, if you use the ASIS option on these commands, attribute values are not converted. If you specify ASIS on the TPARSE command, you must also specify ASIS on the TBUILD command when you rebuild the record so that the API does not try to reconvert the values.

If you specify ASIS on the TPARSE command and then decide you want to convert the attribute values, you can use the TRANSLATE API command.

Processing CHANGETIME and CREATETIME attributes

The first 8 bytes of every CPSM Definition and CICS Definition resource table record contain an attribute called CHANGETIME, which reflects the date and time at which the record was last modified. CICS Definition records also include a CREATETIME attribute, which is the date and time at which the definition was created. The CHANGETIME and CREATETIME attributes are maintained internally by CICSPlex SM; you should not attempt to modify these attribute values. When you update a resource table record, the CHANGETIME and CREATETIME values you pass to the TBUILD command must be the same values you received from TPARSE.

By default, the TPARSE command translates the CHANGETIME and CREATETIME values into displayable, character values. However, the character forms of these values cannot be passed back to TBUILD. So, if you plan to update a definition and then rebuild the resource table record, you should use the ASIS option on the TPARSE and TBUILD commands. When you use ASIS, the CHANGETIME and CREATETIME values appear as 16-byte hexadecimal values.

Start of change

Processing FEEDBACK attributes

Having used a TPARSE command to extract the individual resource table attributes additional processing may be required before the data can be used in subsequent API commands.

The ERR_RESULT error result set token is returned in decimal format and must be converted to character format before it can be used in a RESULT() option. To do this you can use the D2X() and X2C() REXX built-in functions, for example:

var = X2C(RIGHT(D2X(FEEDBACK_ERR_RESULT),8,'0'))
End of change [[ Contents Previous Page | Next Page Index ]]