TPARSE

Parse a resource table record from a variable into a set of variables.

Read syntax diagramSkip visual syntax diagram TPARSE OBJECT ( data-value ) PREFIX ( data-value ) STATUS ( data-ref ) VAR ( data-area ) ASIS THREAD ( cpsm-token )

Description

This command parses a resource table record from a variable into a set of variables that represent the individual attributes of the table. You can use TPARSE with any type of CICSPlex® SM resource table.

The resource table variable can be any valid REXX variable, including a stem variable. The output variables are formed by adding a prefix to the attribute name, like this:
  prefix_attribute

where prefix is a text string that you supply and attribute is the name of an attribute in the resource table. An underscore (_) is inserted between the prefix and the attribute name.

Note: For complete descriptions of the resource tables and their attributes, see the CICSPlex SM resource tables.

Options

ASIS
Specifies that the resource table attribute values are not to be translated into their external format; they are to be returned as is. Attribute values are presented as follows:
  • Character values have trailing blanks.
  • Binary values have leading zeroes and are not converted to display format.
  • EYUDA and CVDA values are not converted to character format.
You must use the ASIS option to parse a CPSM Definition or CICS® Definition resource table that you want to rebuild (with the TBUILD ASIS command).
Note: If you use the ASIS option with EYUDA or CVDA values, you can use the TRANSLATE command to convert the coded numeric value into a character value.
OBJECT(data-value)
Identifies the resource table that is to be parsed. This value must be the 1- to 8-character name of a valid resource table.
Note: You cannot use the TPARSE command to process a resource table view that was created by the SPECIFY VIEW command. If you create a view with the same name as a supplied resource table and then specify that name on a PARSE command, the command fails.
PREFIX(data-value)
Specifies the prefix you want to use to name the attribute variables returned by TPARSE.
Note: The maximum allowable length for a prefix is determined by REXX and the environment in which the program runs.
STATUS(data-ref)
Names a variable to receive the REXX status value returned for this command. The status is returned in character form as one of the following:
OK
The TPARSE command completed processing successfully.
SYNTAX ERROR
The TPARSE command could not be processed because of a syntax error. EYUARnnnn messages that describe the error are written to the destination defined on your system for IRXSAY WRITEERR output.
FAILURE
The TPARSE command failed because some of the data it was attempting to process is invalid. Trace data is written to a REXX stem variable called EYU_TRACE. EYUARnnnn messages that describe the failure may also be written to the destination defined on your system for IRXSAY WRITEERR output.
Note: For more information about the EYUTRACE stem variable, see Developing CICSPlex SM applications.
THREAD(cpsm-token)
Identifies the API thread to be used for this operation. The cpsm-token value that identifies a thread is returned by the CONNECT command.
VAR(data-area)
Names a variable that contains the resource table record to be parsed.