OpenTP1 Version 7 Programming Reference COBOL Language
RECEIVE - Accept temporarily-stored data
Format
DATA DIVISION (communication description entry) specification
CD communication-description-name
FOR {INPUT|I-O} STORAGE
[STATUS KEY IS data-name-1] .
01 unique-name-1.
02 data-name-2 PIC 9(4) COMP.
02 data-name-3 PIC X(4).
02 data-name-4 PIC X(n).
|
PROCEDURE DIVISION specification
RECEIVE communication-description-name {MESSAGE|SEGMENT}
INTO unique-name-1.
|
Description
RECEIVE enables the following CALL interface facility:
Items specified in the communication description entry
Specify INPUT STORAGE or I-O STORAGE.
Specify this clause to receive a status code. If this clause is omitted, a status code cannot be received.
Items specified in the communication statement
Specify MESSAGE or SEGMENT.
Specify the data item indicating the area for receiving temporary-stored data. The following figure shows the format of unique-name-1 after the message is received:
Status codes
| Status codes | Status codes |
|---|---|
| 00000 | Normal termination. |
| 72000 | The RECEIVE statement that receives temporary-stored data cannot be used from an SPP. |
| 72013 | Temporary-stored data exceeding the receive area length was received. The excess portion was truncated because the data exceeds 32,761 bytes. |
| 72036 | The value specified for the receive area length is less then 7 bytes. |
| 72101 | RECEIVE statement that receives the temporary-stored data was used by an MHP which is not continuous-inquiry-response type (type=cont). |
| 72106 | RECEIVE statement that receives the temporary-stored data was used before RECEIVE statement that receives the first segment. |
| 72107 | RECEIVE statement that receives the temporary-stored data was used after DISABLE statement that terminates the continuous inquiry response. |
| Other than the above | An unprecedented error (e.g., program damage) occurred. |
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.