OpenTP1 Version 7 Programming Reference COBOL Language

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

CBLDCRAP('DISCNCT ') - Release a connection with a RAP-processing listener

Format

PROCEDURE DIVISION specification

CALL 'CBLDCRAP' USING unique-name-1

DATA DIVISION specification

01  unique-name-1.
    02  data-name-A   PIC X(8) VALUE 'DISCNCT '.
    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.

Description

CBLDCRAP('DISCNCT ') releases a connection established between a RAP-processing listener and a RAP-processing client.

Data areas whose values are set in the UAP

data-name-A

Specify VALUE 'DISCNCT[Figure]' for the request code indicating the request for release of a connection with a RAP-processing listener.

data-name-C

Specify 0.

data-name-D

Specify the service ID that was received for CBLDCRAP('CONNECT ').

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. The connection with the RAP-processing listener was released.
05501 Either the value specified in a data area is invalid, or a data area has not been set. Check the following items:
  • Values of data-name-A and data-name-C ('CONNECT ' and 0, respectively)
  • Data area data-name-D
05502 The protocol is invalid. Possible causes are as follows:
  • CBLDCRPC('OPEN ') was not called.
  • Although the rpc_rap_auto_connect operand in the user service definition had been set to Y, the function CBLDCRAP('DISCNCT ') was called.
  • The -w option was not specified in the dcsvgdef definition command in the user service network definition.
05503 The memory became insufficient.
05505 A network error occurred during communication with the RAP-processing listener.
05506 A timeout occurred during communication with the RAP-processing listener.
05521 The RAP-processing listener is being terminated.
05522 An error which prevents continuation of processing occurred. Possible causes of the error are as follows:
  • An unexpected message was received.
  • A message was received unexpectedly from a remote system.
05523 An unexpected error occurred during system call.

Note

If the CBLDCRAP('DISCNCT ') function returns with an error and the status code is a value other than 05501 or 05502, the connection with the RAP-processing listener was released.

The error code acquired by the UAP trace is as follows:

0: No error

1: No value was specified for unique-name-1.

2: The request code (data-name-A) is invalid.