Previous Topic: &APPC SEND_AND_FLUSH

Next Topic: &APPC SEND_DATA

&APPC SEND_AND_PREPARE_TO_RECEIVE

&APPC SEND_AND_PREPARE_TO_RECEIVE sends a single data record to the remote conversation partner and changes processing from sending to receiving data.

This verb has the following format:

&APPC { SEND_AND_PREPARE_TO_RECEIVE | SEND_AND_PREPARE }
      [ ID=id ]
      [ TYPE={ SYNC | FLUSH | CONFIRM } ]
      [ MDO=mdoname [ MAP=mapname ] |
        VARS=var | VARS=(var1, var2, ..., varn ) |
        VARS=prefix* [ RANGE=(start,end) ] ]

Operands:

ID=id

Specifies the conversation identifier (as first returned by the system variable &ZAPPCID after successful allocation) that references a particular conversation. If this parameter is omitted the current (last referenced, or only) conversation is assumed.

TYPE={ SYNC | FLUSH | CONFIRM }

Specifies the level of confirmation required for any data previously sent to the remote conversation partner as follows:

TYPE=SYNC is the default and ,if the conversation sync level is CONFIRM, it is equivalent to the PREPARE_TO_RECEIVE TYPE=CONFIRM option; otherwise a PREPARE_TO_RECEIVE TYPE=FLUSH is assumed.

TYPE=FLUSH results in all data being flushed, forcing its transmission to the conversation partner but no confirmation reply is required (see Notes for this option).

TYPE=CONFIRM results in all data being flushed and a confirmation being requested (see Notes for this option).

MDO=mdoname [ MAP=mapname ] | VARS=var |
VARS=( var1,var2,...,varn ) | VARS=prefix* [ RANGE=(start,end) ]

Indicates how the outgoing data should be formatted. If the MDO operand is used, the data is formatted into an MDO with the name mdoname. If the outgoing data is mapped (that is, a map name is sent with the data), and MAP= is not specified, then the received map name is used to connect to Mapping Services Mapping Support. If the outgoing data is not mapped, then it is the requester's responsibility to connect to Mapping Services Mapping Support, if required, using the MAP operand.

The VARS= operand is used to provide the list of NCL variables that will contain the data received on the conversation. (The usual NCL VARS definitions apply). If the outgoing data is not mapped, or the map name is other than $NCL, then the data stream received will be segmented into the variables nominated. If the data is mapped and the map name is $NCL, then each variable is reconstructed as it was on the send request in the conversation partner. Unused variables are set to null.

Examples: &APPC SEND_AND_PREPARE_TO_RECEIVE

&APPC SEND_AND_PREPARE_TO_RECEIVE TYPE=FLUSH
&APPC SEND_AND_PREPARE_TO_RECEIVE TYPE=CONFIRM

Return Codes:

The return codes are as follows:

0

Request successful

4

Request unsuccessful

8

Remote program error

12

State check

16

Request or conversation error

&ZFDBK is also set, plus all APPC system variables.

State Transition:

See &APPC SEND and &APPC PREPARE_TO_RECEIVE.

Note:

The SEND_AND_PREPARE_TO_RECEIVE is a convenient way of combining two basic APPC operations, that of sending data and of preparing to receive data. It is equivalent to issuing an &APPC SEND_DATA followed by an &APPC PREPARE_TO_RECEIVE request.

Relationship to LU6.2 Verb Set:

More information:

&APPC Return Code Information

&RETCODE and &ZFDBK