Previous Topic: &ZLUTYPE

Next Topic: &ZMAIACT# or &ZMAIACTN


&ZLU1CHN

Indicates the segment position of a message received from an LU1 device.

The &PROMPT statement allows an NCL process to receive messages from LU1 devices. Up to 256 bytes of a message is delivered to &PROMPT in a single invocation.

If the incoming message is more than 256 bytes long, the data is segmented into separate elements, each up to 256 bytes. These elements are delivered to successive &PROMPT statements.

If the NCL process needs to know the position of a message within its chain of elements, for example, to ensure that all the messages in a chain have been received before the messages are processed, then it can reference the &ZLU1CHN variable after completion of the &PROMPT statement.

The &ZLU1CHN value can also be used as a branching value to control the issuing of successive &PROMPT statements. The &ZLU1CHN variable will return one of the following values:

FIC

The message just received by &PROMPT is the first element in an incoming chain. At least one more element in the chain is expected.

MIC

The message just received is not the first element in a chain, nor is it the last. At least one more element is expected. MIC stands for middle in chain and in a multi-element chain all elements except the first and the last return this value.

LIC

The message just received is the last one of the incoming chain. No more elements will follow as part of the chain. The next element to arrive will be part of a separate chain.

OIC

The message received is in a chain all by itself. It is therefore both the first in a new chain and also the last. The next element to arrive will be part of a separate chain.

Example: &ZLU1CHN

   &PROMPT ARGS Please Enter Description ==>>
    &GOTO .&ZLU1CHN 
.FIC 
.MIC
    .
    . keep reading successive messages till entire chain is received
    .
   &PROMPT ARGS AUTONL=NO
   &GOTO .&ZLU1CHN 
.OIC 
.LIC
    .
    . process complete message
    .

Note: The chaining position indication is not related in any way to any SNA-level chaining associated with the receipt of the data from the device; &ZLU1CHN values indicate only whether there is more data associated with the message being delivered and whether another &PROMPT is required for the procedure to obtain the remaining part of the message.

More information:

&PROMPT