Previous Topic: Receive Data into NCL Tokens

Next Topic: Respond to a Confirmation Request

Receive Data into an MDO

As an alternative to the use of NCL tokens an MDO can be specified as the target for a receive operation, for example:

&APPC RECEIVE_AND_WAIT MDO=APPCREC

The MDO is structured depending upon the data mapping for the conversation. If no mapping is supported, or if the map name is unknown to Mapping Services, then the data from the received GDS variable which is the unit transmitted forms the entire contents of the MDO. The MDO is unmapped, but the MDO name refers to the entire data transmitted.

If mapping is supported and the map name is known, then the data from the received GDS variable which is the unit transmitted, is assigned into the MDO, specified according to the map name received. If the map name consisted of more than one name segment, then the first name segment is assumed to be the actual map name, and the remaining segments qualify the data in the usual Mapping Services manner.

For example, if the map name received was:

CORPORATE.PAYROLL.EMPLOYEE

and the receive specified was:

&APPC RECEIVE_AND_WAIT MDO=USER

then the MDO structure named USER.PAYROLL.EMPLOYEE and mapped by the Mapping Services map name CORPORATE, is assigned the received data. However if the map name CORPORATE was unknown to Mapping Services then the MDO structure named USER contains all the data and it is unmapped.

You can determine the received map name through the &ZAPPCRM system variable and process the MDO contents accordingly. For example, if a transmitted map name is unknown to Mapping Services, or is an invalid Mapping Services map name, the data can be placed into an unmapped MDO. The map name is then examined and the MDO assigned to a new structure with Mapping Services mapping through the &ASSIGN verb.