NET/MASTER Network Control Language (NCL) Reference Manual
Using PARSE and SEGMENT
Verb Syntax and Variable Access Methods
11–26 106126 Tandem Computers Incorporated
The PARSE keyword is also used by the PARSE verb for the same reason: to specify
whether to delimit a message by words or by bytes. The PARSE verb is discussed later
in this section in “Using the PARSE Verb.”
Using the SEGMENT
Keyword
The SEGMENT keyword is used by verbs that read messages such as EMSREAD,
INTREAD, LOGREAD, and MSGREAD. The setting of the SEGMENT keyword in
these verbs specifies how much of each delimited section of the message to put into a
variable.
SEGMENT requires a number. If PARSE=YES, then SEGMENT determines how many
characters of each word are put into a variable. If PARSE=NO, then SEGMENT
determines how many bytes are put into a variable. The default length is 256 for
PARSE=NO and 32,000 for PARSE=YES. The following examples delimit the message
This is a message:
INTREAD ARGS PARSE=YES SEGMENT=1
The results are:
&1 = T
&2 = i
&3 = a
&4 = m
INTREAD ARGS PARSE=NO
The result is:
&1 = This is a message
INTREAD ARGS PARSE=NO SEGMENT=1
The results are:
&1 = T
&2 = h
&3 = i
&4 = s
&5 = space
&6 = i
&7 = s
&8 = space
&9 = a
&10 = space
&11 = m
&12 = e
&13 = s
&14 = s
&15 = a
&16 = g
&17 = e