NET/MASTER Network Control Language (NCL) Programmer's Guide

Options for Specifying Message Structure
Working With Pathway Server Classes
15–18 106160 Tandem Computers Incorporated
Options for Specifying
Message Structure
Request and reply messages can be either mapped or unmapped, but both types of
messages must have the same type of structure when communicating with a certain
server class. That is, messages can be mapped and mapped, unmapped and
unmapped, but not mapped and unmapped.
This subsection describes in detail the options for specifying request and reply
message structures.
Mapped Message Structure A mapped message is a message that contains data structures Mapping Services can
understand using a map. You can use either a standard or user-defined map to
describe and interpret the data structures in a mapped message: typically, you would
use a user-defined map. Different maps can be used for request and reply messages.
A mapped message is sent and received in an MDO variable.
See Section 10, “Working With Mapping Services,” for more information on Mapping
Services. Section 11, “Standard and User-Defined Maps,” discusses the structure of
the maps $MSG, $NCL, $SEC, and $SPI, and how to create and use a user-defined
map.
Mapped Request Messages
The structure of a mapped request message is not specified using the PSEND verbs.
However, the structure must be specified before a request message is sent using the
PSEND SEND verb. How to do this is outlined in the following steps:
1. Use the ASSIGN verb to create an MDO variable and specify the map to be used to
interpret the data structures in the message. The following example creates an
MDO variable &REQMDO. mapped using the user-defined map REQMAP:
ASSIGN MDO=&REQMDO. MAP=REQMAP
2. Obtain the request message in variables that Mapping Services can interpret using
the map. The following code segment uses a series of assignment statements to
explicitly assign values to fields in the MDO variable &REQMDO.:
&REQMDO.NAME = "John Smith"
&REQMDO.ADDRESS = "99 SMITH STREET, SMITHTOWN, SMITHCITY"
&REQMDO.PHONE = "123 4567"
This code segment assumes that the user-defined map recognizes NAME,
ADDRESS, and PHONE as valid data structures in the MDO variable.
3. Use the PSEND OPEN verb to make the required Pathway server class available
for use by an NCL process. Use either the PSEND OPEN verb or the PSEND SET
verb to specify that reply messages are mapped. The following example makes a
Pathway server class available for use by an NCL process, using the PSEND OPEN
verb to specify that reply messages are mapped:
PSEND OPEN ID=PSC_1 FORMAT=MAPPED MAP=REPMAP