Close Path (QzdmClosePath) API

  Required Parameter Group:

1 Request variable Input Char(*)
2 Length of request variable Input Binary(4)
3 Format name of request variable Input Char(8)
4 Error code I/O Char(*)

  Library Name / Service Program: QSOC/QZDMMDTA

  Default Public Authority: *EXCLUDE

  Threadsafe: No

The Close Path (QzdmClosePath) API is used to close an OptiConnect path. The Close Path (QzdmClosePath) API should be performed after the path is no longer needed to free the system resources associated with the path.

The system that initiated the last transaction, by using the Send Request (QzdmSendRequest) API, should be the system that closes the path after the transaction is completed with the Receive Response (QzdmReceiveResponse) API. If the system that received the request using the Receive Request (QzdmReceiveRequest) API is the system that closes the path after issuing the Send Response (QzdmSendResponse) API, then unpredictable results may occur. This is due to the Close Path (QzdmClosePath) API being able to close the path before the response is actually received by the other system that uses the Receive Response (QzdmReceiveResponse) API.

After the Close Path (QzdmClosePath) API has been issued, the other system should complete the close sequence by issuing the Receive Control (QzdmReceiveControl) API to receive the close path message from the closing system.


Restrictions

The following restrictions apply:


Authorities and Locks

Service Program Authority
*EXECUTE

Required Parameter Group

Request variable
INPUT; CHAR(*)

The request variable structure that describes the input for the Close Path (QzdmClosePath) API.

Length of request variable
INPUT; BINARY(4)

The length of the request variable, in bytes. The length of the request variable must be at least equal to the length of the input format, and less than or equal to the maximum length of 4KB.

Format name of request variable
INPUT; CHAR(8)

The format of the information that is provided as input for the Close Path (QzdmClosePath) API. The format CPTH0100 is the only supported format used by this API for the request variable. See CPTH0100 Format for more information on the CPTH0100 format.

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error Code Parameter.


CPTH0100 Format

The following table defines the information required for Format CPTH0100.

Offset Type Field
Dec Hex
0 0 CHAR(16) Stream identifier
16 10 CHAR(8) Path identifier


Field Descriptions

Path identifier. The OptiConnect path that is to be closed. This field is provided as output with the Open Path (QzdmOpenPath) API.

Stream identifier. The OptiConnect stream that is to be used for communications. This field is provided as output with the Open Stream (QzdmOpenStream) API.


Error Messages

Message ID Error Message Text
CPF24B4 E Severe error while addressing parameter list.
CPF3C1D E Length specified in parameter &1 not valid.
CPF3C21 E Format name &1 is not valid.
CPF3C90 E Literal value cannot be changed.
CPF3CF1 E Error code parameter not valid.
CPF9872 E Program or service program &1 in library &2 ended. Reason code &3.
CPFADF0 E The OptiConnect QSOC subsystem must be active.
CPFADF1 E OptiConnect communication error.
CPFADF3 E OptiConnect path not valid or closed.
CPFADF5 E OptiConnect API internal error, function code &1, return code &2.
CPFADF6 E Request variable not valid, reason code &1.


API introduced: V3R7
Top | Communications APIs | APIs by category