Pathway/iTS SCREEN COBOL Reference Manual (H06.10+, J06.03+)
Procedure Division
HP NonStop Pathway/iTS SCREEN COBOL Reference Manual—426750-003
6-103
SEND Statement
GOOD-REPLY-PARAGRAPH.
IF rp-cd = 15
PERFORM rp-1-paragraph
ELSE IF rp-cd = 37
PERFORM rp-2-paragraph
ELSE
PERFORM logic-err-paragraph.
The example is executed as follows, assuming that the REPLY CODE is either 15
or 37:
1. If the reply length matches the length of the corresponding YIELDS items, the reply
is stored in the corresponding items, and the ON ERROR branch is not taken.
2. If the reply length is less than the length of the corresponding YIELDS items, the
reply is stored in the corresponding items, the length of the reply is stored in the
special register TERMINATION-SUBSTATUS, and the program performs ERR-
PARAGRAPH with TERMINATION-STATUS = 11. No error 3115 is logged
because VARYING was specified.
3. If the reply is longer than the corresponding YIELDS items, the reply is truncated
and stored in the corresponding items, TERMINATION-STATUS is set to 11,
TERMINATION-SUBSTATUS is set to the actual reply length up to a maximum of
1 + max(len(msg-a),len(rp-cd)+len(rp-buf-1),len(rp-cd)+len(rp-buf-2)), and the
program performs ERR-PARAGRAPH. In this case an error 3115 is logged.
Sending to an External PATHMON Process
The following program example illustrates the two ways you can use the SEND
statement to access a server class controlled by an external PATHMON process
(a PATHMON process in a different PATHMON environment than that of the
requesting TCP).
DATA DIVISION.
WORKING-STORAGE SECTION.
:
01 WS-DEFAULT-NAMES.
05 WS-DEFAULT-SERVER PIC X(15) VALUE "SERV-1".
05 WS-DEFAULT-PATHMON PIC X(5) VALUE "$PWT".
05 WS-DEFAULT-SYSTEM PIC X(8) VALUE "\TS".
:
01 WS-SCRN1-FIELDS.
05 WS-SERV-NAME PIC X(15) VALUE " ".
05 WS-SCRN-PATHMON PIC X(5) VALUE " ".
05 WS-SCRN-SYSTEM PIC X(8) VALUE " ".
:
PROCEDURE DIVISION.
:
:
SEND MSGID, EMPLOYEE-REC TO "SERV-1"
UNDER PATHWAY "$PWT"










