Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-114
SEND MESSAGE Statement
SEND MESSAGE Statement
The SEND MESSAGE statement sends a message to an intelligent device, receives a
reply from that device, or both sends a message and receives a reply. The message
data structure can be identified by either a message template in the Message Section
or a level 01 data item in the Working-Storage Section.
send-message
specifies a message template in the Message Section or an 01 level data item in
the Working-Storage Section. In either case, it specifies data to be sent to an
intelligent device.
If you omit
send-message
, no data is sent, but a reply message is returned.
CODE FIELD [ IS ]
code-field
defines the location, length, and data type of the
reply-code
field in the
reply-message
.
The absence of this clause causes the default to be used:
•
Offset—0 bytes offset from beginning of the record
•
Length—2 bytes
•
Data type—COMPUTATIONAL numeric data item
You need to specify this clause when the location, length, and data type of the
reply-code
field is other than the default.
The
code-field
parameter in this clause specifies a field name in the
Working-Storage Section.
SEND MESSAGE {
send-message
}
{ [
send-message
]
reply-spec
}
[ ESCAPE ON UNSOLICITED [ MESSAGE ] ]
[ USER [ CONVERSION ]
numeric-literal
]
[ TIMEOUT
timeout-value
]
[ ON ERROR
imperative-statement
]
reply-spec
syntax:
REPLY [ CODE FIELD [ IS ]
code-field
]
{YIELDS
reply-message
}
{{CODE
reply-code
[,
reply-code
]... YIELDS
reply-message
}...}










