OpenTP1 Version 7 TP1/Client User's Guide TP1/Client/W, TP1/Client/P

[Contents][Index][Back][Next]

6.6.5 CBLDCCLS('ASMSEND ') - Send assembled messages

Organization of this subsection
(1) Form
(2) Purpose
(3) Data area where the UAP sets values
(4) Data area for which a value is returned
(5) Status codes
(6) Notes

(1) Form

(a) In a multi-thread environment
PROCEDURE DIVISION
 
CALL 'CBLDCCLS' USING identifier-1 identifier-2 identifier-3
 
DATA DIVISION
 
01 identifier-1.
   02 data-name-A  PIC X(8)  VALUE 'ASMSEND[Figure]'.
   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 9(4) COMP.
   02 FILLER    PIC X(2).
   02 data-name-E  PIC S9(9) COMP.
   02 FILLER    PIC X(4).
   02 data-name-F  PIC X(n).
01 identifier-2.
   02 data-name-G  PIC S9(9) COMP.
   02 data-name-H  PIC X(n).
01 identifier-3.
   02 data-name-I  PIC 9(9) COMP.
 
(b) In a single-thread environment
PROCEDURE DIVISION
 
CALL 'CBLDCCLT' USING identifier-1 identifier-2
 
DATA DIVISION
 
01 identifier-1.
   02 data-name-A  PIC X(8)  VALUE 'ASMSEND[Figure]'.
   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 9(4) COMP.
   02 FILLER    PIC X(2).
   02 data-name-E  PIC S9(9) COMP.
   02 FILLER    PIC X(4).
   02 data-name-F  PIC X(n).
01 identifier-2.
   02 data-name-G  PIC S9(9) COMP.
   02 data-name-H  PIC X(n).
 

(2) Purpose

Uses the message assembly facility to send messages. When this facility is used, the statement sends four-byte message information followed by the message body specified in data-name-H. If a connection to the remote system has not been established, the function establishes the connection according to the host name specified in data-name-F and the port number specified in data-name-D before sending messages.

If Y is specified for DCCLTDELIVERYCHECK of the client environment definition, the message delivery confirmation facility is used when a message is sent or received. In this case, the size of the message information sent before the message body is 11 bytes. After sending the 11-byte message information, TP1/Client returns control to the CUP.

Before executing CBLDCCLS('ASMSEND '), make sure that you execute CBLDCRPS('OPEN ') in which 4 or 16 is specified in data-name-C.

(3) Data area where the UAP sets values

(4) Data area for which a value is returned

(5) Status codes

Status code Meaning
00000 Normal termination
02501 Invalid argument
02502 Possible causes are as follows:
  • CBLDCRPS('OPEN ') has not been executed.
  • CBLDCRPS('OPEN ') was executed, but neither 4 nor 16 was specified in data-name-C.
02504 Insufficient memory
02506 A network error occurred. The connection is released.
02507 A connection establishment request timed out. Alternatively, reception of response-only data timed out when the message delivery confirmation facility was being used. The connection is released.
02518 A system error occurred. If the error is a network error, the connection is released.
02538 Insufficient resource
02539 The host name is incorrect. Alternatively, a host name is not specified in either data-name-F or DCSNDHOST.
02541 A connection establishment request to the remote system was rejected.
02542 The connection was released by the remote system when the message delivery confirmation facility was being used.
02544 The client ID specified in data-name-I differs from the one received by CBLDCCLS('CLTIN ') or CBLDCCLS('EXCLTIN ').
02547 Port numbers that can be assigned automatically by the operating system are insufficient.
02548 An invalid message was received when the message delivery confirmation facility was being used. The connection is released.
02584 Messages collided when the message delivery confirmation facility was being used. The connection is released.

(6) Notes