Close request (CLOSE) for the IMS catalog API

You can use an IMS catalog API CLOSE request to close any data sets that were allocated for previous IMS catalog API requests.

When you issue a CLOSE request you free any data sets that were allocated for the communication area by an OPEN request, or for subsequent GET and LIST requests.

Syntax for CLOSE requests

Read syntax diagramSkip visual syntax diagramDFS3CATQ FUNCTION=CLOSE ,TOKEN= tok-addr ,RETCODE= symbol|( 2-12),RSNCODE= symbol|( 2-12) ,EPADDR= ep-addr ,MF=I,MF=L,MF=(E, list)

Parameters for CLOSE requests

TOKEN=tok-addr | RS-type address, or register (2-12).
Specifies the address of a 4-byte field to receive the API token. Your program receives this token when a DFS3CATQ FUNC=OPEN macro is issued. This token must be supplied with all other macro calls that are associated with this instance of the OPEN request. The token is no longer valid after a DFS3CATQ FUNC=CLOSE macro call.
RETCODE=symbol | (2-12)
Saves the return code to a storage location determined by the specified symbol or register.

If a symbol is specified, the symbol must represent the label of a word of storage in which to save the return code.

If a register is specified, the register must contain the address of a word of storage in which to save the return code. Specify a register from 2 to 12 that is enclosed in parentheses.

Regardless of whether RETCODE is specified, IMS returns the return code in register 15.

RSNCODE=symbol | (2-12)
Saves the reason code to a storage location determined by the specified symbol or register.

If a symbol is specified, the symbol must represent the label of a word of storage in which to save the reason code.

If a register is specified, the register must contain the address of a word of storage in which to save the reason code. Specify a register from 2 to 12 that is enclosed in parentheses.

Regardless of whether RSNCODE is specified, IMS returns the reason code in register 0.

EPADDR=ep-addr | RS-type address, or register (2-12).
If specified as a symbol, specifies the label of a word of storage that contains the address of the load module DFS3CATQ. The application is responsible for loading module DFS3CATQ, saving its entry point address for this parameter and deleting the load module when it is no longer needed.
MF=
The macro form of the request.
I
Invokes the DFS3CATQ program with an in-line parameter list. If your program is reentrant, do not use this form of the macro because reentrant code cannot be modified.
L
Specifies the list form of the macro.
(E,list)
Specifies the execute form of the macro.

list | RS-type address, or register (2-12).

Return and reason codes for CLOSE requests

Table 1. Return and reason codes for the DFS3CATQ macro OPEN requests
Return Code Reason Code Meaning
X'00000000' X'00000000' Request completed successfully.
X'0000000C' X'0000000C' A valid address for the OUTPUT= variable or location was not provided.
X'0000000C' X'00000010' Valid address for the TOKEN= variable or location was not provided.