OpenTP1 Version 7 Programming Reference COBOL Language

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

CBLDCRPC('CLTSEND ') - Report data to CUP unidirectionally

Format

PROCEDURE DIVISION specification

CALL  'CBLDCRPC'  USING unique-name-1 unique-name-2

DATA DIVISION specification

01  unique-name-1.
    02  data-name-A  PIC X(8)  VALUE 'CLTSEND '.
    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.
    02  data-name-E  PIC X(n).
01  unique-name-2.
    02  data-name-F  PIC S9(9) COMP.
    02  data-name-G  PIC X(n).

Description

CBLDCRPC('CLTSEND ') sends data to the CUP unidirectionally. CBLDCRPC('CLTSEND ') sends data specified for data-name-G of the length specified for data-name-F to the process (CUP) corresponding to the port number of the host specified for data-name-D and data-name-E. The possible sending data length is in the range of bytes from 0 to DCRPC_MAX_MESSAGE_SIZE#.

#: If you used the rpc_max_message_size operand, the value of this data area is the value specified in the rpc_max_message_size operand and not the value of DCRPC_MAX_MESSAGE_SIZE (1 megabyte).

Data sent by CBLDCRPC('CLTSEND ') is received by the TP1/Client library function dc_clt_chained_accept_notification() or dc_clt_accept_notification(). For the function dc_clt_chained_accept_notification() or dc_clt_accept_notification(), see the OpenTP1 TP1/Client User's Guide TP1/Client/W, TP1/Client/P manual.

Data areas whose values are set in the UAP

data-name-A

Specify VALUE 'CLTSEND' for the request code indicating that data is reported to UAP unidirectionally.

data-name-C

Specify 0.

data-name-D

Specify the number of the port to which data is sent.

data-name-E

Specify the name of the host to which data is sent. The specified host name must be a 1 to 255 byte character string. End the character string with space.

data-name-F

Specify the length of data to be sent.

data-name-G

Specify data to be sent.

Data area whose value is returned from OpenTP1

data-name-B

A status code of 5 digits is returned.

Status codes

Status code Explanation
00000 Normal termination.
00301 The value specified for the argument is invalid. This error also occurs if the status code (data-name-A) is invalid.
00306 A network error occurred.
00302 CBLDCRPC('OPEN ') was not called.
00304 The memory became insufficient.
00308 The length of data to be sent exceeds DCRPC_MAX_MESSAGE_SIZE#.
00314 There is no process at the destination.
A network error occurred.

#: If you used the rpc_max_message_size operand, the value of this data area is the value specified in the rpc_max_message_size operand and not the value of DCRPC_MAX_MESSAGE_SIZE (1 megabyte).

Notes

  1. Use CBLDCRPC('CLTSEND ') only when the calling of the TP1/Client function dc_clt_chained_accept_notification() or dc_clt_accept_notification() by the process of destination is obvious. If the process of the destination is not active, CBLDCRPC('CLTSEND ') returns with an error, giving the status code 00314.
  2. Normal return of CBLDCRPC('CLTSEND ') indicates that sending at RPC communication protocol (TCP/IP) level is completed. Therefore, normal termination of CBLDCRPC('CLTSEND ') does not guarantee that the data is received normally by the CUP using the function dc_clt_chained_accept_notification() or dc_clt_accept_notification().
  3. CBLDCRPC('CLTSEND ') can report data only to the function dc_clt_chained_accept_notification() or dc_clt_accept_notification() used by the CUP. Data cannot be sent to SPP processes and local processes.
  4. To specify a host name consisting of 80 to 255 characters in TP1/Server Base for AIX, recompile and relink the UAP using libbetran2.a.