Previous Topic: Receive Data

Next Topic: Receive Data into an MDO

Receive Data into NCL Tokens

Either a list or range of NCL tokens can be specified as the target variables for a receive operation. For example:

&APPC RECEIVE_AND_WAIT VARS=$* RANGE=(1,20)
&APPC RECEIVE_AND_WAIT VARS=(A,B,C,D)

The contents of each variable will be set depending upon the data mapping for the conversation. If no mapping is supported, or if the map name is other than $NCL, then the received GDS variable (which is the unit transmitted) is segmented according to the maximum token size by default. You can specify individual segment sizes when using the list form by specifying a parenthesized integer after each variable name, for example:

&APPC RECEIVE_AND_WAIT VARS=(A(10),B(8),C(4),D(32))

If mapping is supported and the map name is $NCL, then the received GDS variable, which is the unit transmitted, is assumed to be correctly formatted by the sending NCL system. Its structure maintains the contents of the individual tokens that were specified on the send operation, and the target variables are reconstructed identically.

In any case, no data transformation takes place. If the transmitted data contains characters that cannot be displayed, subsequent processing might require its conversion to hexadecimal characters (through the &HEXEXP built-in function). This is your responsibility.

If insufficient variables are supplied to receive all the data transmitted in the data unit, the residual data is lost.

Note: The received map name is in the &ZAPPCRM system variable.