NET/MASTER Network Control Language (NCL) Programmer's Guide
Options for Specifying Message Structure
Working With Pathway Server Classes
106160 Tandem Computers Incorporated 15–19
4. Use the PSEND SEND verb to send the request message. The following example
sends a request message in the &REQMDO. MDO variable and receives a reply
message in the REPMDO. MDO variable, which is mapped by the map REPMAP:
PSEND SEND MDO=&REQMDO. TO MDO=&REPMDO.
Mapped Reply Messages
The structure of a mapped reply message is specified using the FORMAT=MAPPED
and MAP operands in the PSEND OPEN or PSEND SET verb.
Unlike request messages, you do not have to create an MDO variable (using the
ASSIGN verb) before receiving a reply message. The PSEND SEND verb
automatically creates an MDO variable using the current map, that is, the map
specified using the MAP operand of either the PSEND OPEN or PSEND SET verb,
when it receives the reply message from the server process.
You have two options to specify the current map for a reply message: when you make
a Pathway server class available for use by NCL, or afterwards.
The first option is shown in the following code segment. The PSEND OPEN verb
makes a Pathway server class available for use by NCL and specifies the current map
for reply messages:
…
ASSIGN MDO=&REQMDO. MAP=REQMAP
…
&REQMDO.NAME = "John Smith"
&REQMDO.ADDRESS = "99 SMITH STREET, SMITHTOWN, SMITHCITY"
&REQMDO.PHONE = "123 4567"
…
PSEND OPEN ID=PSC_1 FORMAT=MAPPED MAP=REPMAP
…
PSEND SEND MDO=&REQMDO. TO MDO=REPMDO.
…
The second option is shown in the following code segment. The PSEND OPEN verb
make a Pathway server class available for use by an NCL process. The PSEND SET
verb specifies the current map for reply messages:
…
ASSIGN MDO=&REQMDO. MAP=REQMAP
…
&REQMDO.NAME = "John Smith"
&REQMDO.ADDRESS = "99 SMITH STREET, SMITHTOWN, SMITHCITY"
&REQMDO.PHONE = "123 4567"
…
PSEND OPEN ID=PSC_1 FORMAT=MAPPED
…
PSEND SET MAP=REPMAP
…
PSEND SEND MDO=&REQMDO. TO MDO=REPMDO.
…