TERMINATE IDENTIFY function for RRSAF
The RRSAF TERMINATE IDENTIFY function terminates a connection to Db2. Calling the TERMINATE IDENTIFY function is optional. If you do not call it, Db2 performs the same functions when the task terminates.
If Db2 terminates, the application must issue TERMINATE IDENTIFY to reset the RRSAF control blocks. This action ensures that future connection requests from the task are successful when Db2 restarts.
The TERMINATE IDENTIFY function removes the calling task's connection to Db2. If no other task in the address space has an active connection to Db2, Db2 also deletes the control block structures that were created for the address space and removes the cross-memory authorization.
If the application is not at a point of consistency when you call the TERMINATE IDENTIFY function, RRSAF returns reason code X'00C12211'.
If the application allocated a plan, and you call the TERMINATE IDENTIFY function without first calling the TERMINATE THREAD function, Db2 deallocates the plan before terminating the connection.
The following diagram shows the syntax of the TERMINATE IDENTIFY function.
- function
- An 18-byte area that contains TERMINATE IDENTIFY.
- retcode
- A 4-byte area in which RRSAF places the return code.
This parameter is optional. If you do not specify retcode, RRSAF places the return code in register 15 and the reason code in register 0.
- reascode
- A 4-byte area in which RRSAF places the reason code.
This parameter is optional. If you do not specify reascode, RRSAF places the reason code in register 0.
If you specify reascode, you must also specify retcode.
Example of RRSAF TERMINATE IDENTIFY calls
The following table shows a TERMINATE IDENTIFY call in each language.
Language | Call example |
---|---|
Assembler |
|
C1 |
|
COBOL |
|
Fortran |
|
PL/I1 |
|
- For C, C++, and PL/I applications, you must include the appropriate compiler directives, because DSNRLI is an assembler language program. These compiler directives are described in the instructions for invoking RRSAF.