Previous Topic: &CNMDEL

Next Topic: &CNMREAD


&CNMPARSE

The &CNMPARSE verb parses the MDO data supplied into user variables.

This verb has the following format:

&CNMPARSE MDO=source
        [ TYPE={ RU | SV | CV } ]
        [ MVNUM=nn ]
        [ PREFIX=prefix ]

This verb is typically used from an NCL procedure to format the CNM data into user variables as in an &CNMREAD TYPE=VECTOR operation.

Operands:

MDO=source

(Mandatory) Specifies the name of the MDO that contains the data to be formatted. The value can be a stem name or a compound MDO name.

TYPE={ RU | SV | CV }

(Optional) If omitted, the type is determined from the supplied MDO, which is assumed to be mapped by the $CNM system map. The MDO data is then formatted in the fashion of the &CNMREAD TYPE=VECTOR operation.

TYPE=RU

Indicates that the supplied data is an entire CNM RU and is to be formatted in the fashion of the &CNMREAD TYPE=VECTOR operation.

TYPE=SV

Indicates that the data to be formatted contains one or more concatenated subvectors. Each subvector comprises a 1-byte length field (l) and a 1-byte identifier field (x), followed by l-2 bytes of data. That is, the length field contains the length of the subvector (inclusive of the length byte and identifier byte).

The vectorization process parses the data into its constituent subvectors, placing each into variables prefixed by the value specified in the PREFIX= operand and with names which reflect their contents. The variables created are of the formats &prefixSVxxnn, &prefixSVxxnnX, and &prefixSVLIST, as in the &CNMREAD TYPE=VECTOR function.

TYPE=CV

Partitions SNA control vectors. Each control vector comprises a 1-byte type field (x) and a 1-byte length field (l), followed by l bytes of data. Thus the length of the control vector is l+2, that is, the length field does not include the type or length bytes.

The vectorization process parses the data into its constituent vectors, placing each into variables prefixed by the value specified in the PREFIX= operand and with names which reflect their contents. The variables created are of the format &prefixCVxxnn, where xx is the hexadecimal value of the control vector type, and nn is its occurrence number within the given data.

MVNUM=nn

(NMVT records only) Specifies the number of the Major Vector within the NMVT record to be formatted. If the specified Major Vector does not exist, no variables are created.

PREFIX=prefix

(Optional) Specifies a prefix for the variables created during the vectorization process.

Default: $CNM

Limits: 1 to 4 characters long and conformance to the standard NCL variable naming conventions

Examples: &CNMPARSE

&CNMPARSE MDO=NEWSREC.NMVT.ALERT TYPE=SV PREFIX=ALRT
&ASSIGN MDO=CNM MAP=$CNM
&ASSIGN MDO=CNM.type DATA=mdsmu
&ASSIGN MDO=CNM.mdsmu FROM VARS=CNMREC*
&CNMPARSE MDO=CNM

Notes:

When control is returned to the NCL procedure following an &CNMPARSE statement, &RETCODE is set to one of the following.

0

Request is successful.

4

No data is supplied.

8

Parse failed.

For &RETCODE 8, &ZMDORC and &ZMDOFDBK may be set if a mapping error causes the failure.