Previous Topic: &CNMREAD

Next Topic: &CNMVECTR


&CNMSEND

The &CNMSEND verb sends the data supplied across the CNM interface.

This verb has the following format:

&CNMSEND [ READ={ USER | CNM | BOTH } ]
         [ LINKNAME=linkname | SSCPNAME=sscpname | DOMAIN=domain ]
         [ &var &var .... &var |
           MDO=mdoname |
           VARS=... |
           ARGS [ RANGE=(start,end) ] ]

The &CNMSEND verb is used from a user procedure to request NEWS to forward the CNM RU data supplied across the CNM interface to VTAM. The data is supplied in one or more NCL variables that contain the entire record to send to VTAM.

&CNMSEND processing always sets the &RETCODE system variable and may set the &SYSMSG variable as described in the later notes.

Operands:

READ={ USER | CNM | BOTH }

Specifies where to process any reply RUs solicited by this &CNMSEND request.

READ=USER

Specifies that only the soliciting user receives the results. The &CNMREAD statement does not need to be in the same NCL procedure as the &CNMSEND statement. However, any data solicited becomes unavailable after a &CNMCLEAR is issued or the user returns to the Primary Menu. This option is useful when data is solicited for inspection by the user only, avoiding NEWS database logging (and hence the possible loss of existing database records).

READ=CNM

Specifies that any data solicited is not returned to the soliciting user but undergoes standard CNM delivery, which normally involves forwarding to CNMPROC. A subsequent &CNMREAD issued by this user completes with a no data found condition. This option is most useful for unattended solicitation where results are returned for normal analysis by the NEWS system.

READ=BOTH

Enables a user to process the returned results and also provides standard CNM delivery.

Default: BOTH

LINKNAME=linkname | SSCPNAME=sscpname | DOMAIN=domain

Directs the record to a remote system for processing. These operands are mutually exclusive. NEWS uses the Inter-System Routing (ISR) feature to communicate with other systems running on remote hosts, and therefore can route any CNM request to a remote host for processing. The link, SSCP, or domain ID uniquely identifies the destination host. For remote processing to be possible, the INMC link to the remote host must be active and the NEWS facilities in ISR must be enabled for solicited message flows. If the destination name is that of the local system, the local CNM interface is used.

Note: For more information about the ISR command, see the online help.

&var &var .... &var

Are user-specified variables that contain the CNM record to forward to VTAM across the CNM interface. Each variable contains valid hexadecimal characters that, when concatenated, form the entire CNM RU.

Where a Network Services RU (NS RU) is sent to VTAM embedded in a Forward RU, the variables must include the Forward RU with the target resource and PU vectors appended. In addition, all relevant RU byte values and length fields must be appropriately set, with the exception of the 12 bits in the CNM header comprising the procedure correlator identifier (PRID). Where NEWS recognizes from the supplied RU data that this RU is a solicitation request, it automatically generates a PRID and inserts the value in the CNM RU. The PRID, echoed by the resource in any reply RUs, is used to correlate reply data with the &CNMSEND request.

MDO=mdoname | VARS=... | ARGS [RANGE=(start,end) ]

Specifies the data to place in the alert queued to CNMPROC.

If the MDO= operand is used, the data is located as formatted in the MDO.

Specifying VARS=... or ARGS results in a $NCL MDO being built and delivered in the $MSG MDO, containing the named variables or arguments.

The MDO, VARS, and ARGS operands are mutually exclusive.

RANGE=(start,end) is specified with ARGS, to denote an argument range.

Examples: &CNMSEND

&CNMSEND &1
&CNMSEND READ=USER &REQMSRU
&CNMSEND READ=CNM &LDRU1 &LDRU2

Notes:

When control is returned to the NCL procedure following an &CNMSEND statement the &RETCODE (return code) variable is set to one of the following values:

0

The data supplied has been accepted without error by VTAM. However, VTAM or the target PU can still reject the CNM RU for various reasons, and a &CNMREAD is necessary to determine whether the request was executed successfully.

8

An error has been encountered (for example, the NEWS ACB was closed). The &SYSMSG variable is set and contains text explaining the actual error. An &CNMCLEAR is not required following such an error, as an implicit clear is performed when the &CNMSEND is complete. A subsequent &CNMREAD completes with a no data found condition.

More information:

&CNMREAD

&CNMCLEAR