OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P
CALL 'CBLDCCLS' USING identifier-1 identifier-2 identifier-3
01 identifier-1. 02 data-name-A PIC X(8) VALUE 'ASMRECV'. 02 data-name-B PIC X(5). 02 FILLER PIC X(3). 02 data-name-C PIC S9(9) COMP VALUE ZERO. 02 data-name-D PIC S9(9) COMP. 01 identifier-2. 02 data-name-E PIC S9(9) COMP. 02 data-name-F PIC X(n). 01 identifier-3. 02 data-name-G PIC 9(9) COMP.
CALL 'CBLDCCLT' USING identifier-1 identifier-2
01 identifier-1. 02 data-name-A PIC X(8) VALUE 'ASMRECV'. 02 data-name-B PIC X(5). 02 FILLER PIC X(3). 02 data-name-C PIC S9(9) COMP VALUE ZERO. 02 data-name-D PIC S9(9) COMP. 01 identifier-2. 02 data-name-E PIC S9(9) COMP. 02 data-name-F PIC X(n).
Uses the message assembly facility to receive messages. When this facility is used, the statement receives four-byte message information, and then receives data equivalent to the size set in the message information. The statement then stores the data in data-name-F. The four-byte message information is not stored in data-name-F. The length of the received message is stored in data-name-E. The message length stored in data-name-E does not include the message information length.
If Y is specified for DCCLTDELIVERYCHECK of the client environment definition, the statement also uses the message delivery confirmation facility. In this case, the statement receives 11-byte message information, and then receives data equivalent to the size set in the message information. The function then stores the data in data-name-F. The 11-byte message information is not stored in data-name-F. The length of the received message is stored in data-name-E. The message length stored in data-name-E does not include the message information length. If the received message information includes a response request, the function sends 11-byte message information, and then returns control to the CUP.
Before executing CBLDCCLS('ASMRECV '), make sure that you execute CBLDCRPS('OPEN ') in which 8 or 16 is specified in data-name-C.
If a divided message arrives, the statement repeats the receive processing until the entire message arrives. The timeout specified by this argument is applied every time the statement attempts a reception. If you want to use the value of this argument as the maximum response wait time for the client, specify the 00000002 option for DCCLTOPTION of the client environment definition.
Status code | Meaning |
---|---|
00000 | Normal termination |
02501 | Invalid argument |
02502 | Possible causes are as follows:
|
02504 | Insufficient memory |
02506 | A network error occurred. The connection is released. |
02507 | Message reception timed out. The connection is released. |
02518 | A system error occurred. If the error is a network error, the connection is released. |
02538 | Insufficient resource |
02542 | The remote system released the connection. |
02544 | The client ID specified for data-name-G differs from the one received by CBLDCCLS('CLTIN ') or CBLDCCLS('EXCLTIN '). |
02546 | The area prepared by the CUP was too small to receive the message from the remote system. The connection is released. |
02548 | An invalid message was received. The connection is released. |
All Rights Reserved. Copyright (C) 2006, 2009, Hitachi, Ltd.