READ_MODULE procedure - Read and return module name
The READ_MODULE procedure can be used to read and return the name of the module that is currently being executed.
Syntax
Procedure parameters
- module_name
-
An expression that returns a value of the client information currently registered in Db2®’s CLIENT_APPLNAME special register. The value returned has a data type of VARCHAR(255).
- action_name
- An expression that returns a value of the client information currently registered in Db2’s CLIENT_ACCTING special register. The value returned has a data type of VARCHAR(255).
Authorization
EXECUTE privilege on the DBMS_APPLICATION_INFO module.
Example
The following example shows a procedure call of the MODULE_NAME value for the current session:
db2 " CALL DBMS_APPLICATION_INFO.READ_MODULE(?, ?)"
Value of output parameters
--------------------------
Parameter Name : MODULE_NAME
Parameter Value : <module name>
Parameter Name : ACTION_NAME
Parameter Value : <action name>