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

Options for Specifying Message Structure
Working With Pathway Server Classes
15–20 106160 Tandem Computers Incorporated
In both code segments, the name of the current map is REPMAP. After the PSEND
SEND verb sends a request message, it receives a reply message in the REPMDO.
MDO variable, which is mapped by the map REPMAP.
Unmapped Message
Structure
An unmapped message is a message that is contained in ordinary variables. The
DATA, ARGS, VARS, and RANGE operands of the PSEND SEND verb determine how
the unmapped message is treated. Refer to the NonStop NET/MASTER NCL Reference
Manual for more information about these operands.
When unmapped message structure is specified, NCL treats the data in a message as a
sequence of contiguous bytes. NCL does not interpret the data in an unmapped
message. An unmapped message can contain any binary data.
Since NCL does not attempt to interpret the data in an unmapped message, the
structure of the data in a message is your responsibility. You must control the length
of each logical section in a message and, therefore, the length of the whole message.
For this reason, it is usual for the length of each logical section and, therefore, the
length of the whole message to be of fixed length. This allows you to apply consistent
criteria when sending a request message and receiving a reply message.
Unmapped Request Messages
The structure of an unmapped 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.
When you send an unmapped request message, NCL uses the variables you specify to
create the message. The data in all variables are written contiguously. It is good
practice, if not essential, to pad short logical sections and truncate long logical sections
to the desired length so that each request message received by the server process is the
same length. The server process must be designed to analyze the data in an
unmapped request message by correctly extracting fixed length logical sections from
the message.
Constructing and sending an unmapped request message is outlined in the following
steps:
1. Obtain the request message in ordinary variables. The following code segment
uses a series of assignment statements to explicitly assign values to ordinary
variables:
&REQUEST1 = "John Smith "
&REQUEST2 = "99 SMITH STREET, SMITHTOWN, SMITHCITY "
&REQUEST3 = "123 4567 "
Blanks are used to pad data to a fixed length, and quotes indicate the start and end
of the data. The length of &REQUEST1 is fixed at 15 bytes, &REQUEST2 at 40
bytes, and &REQUEST3 at 10 bytes. Total message length, therefore, is fixed at 65
bytes.