CIUSPTSR Stored Procedure
With the help of this CICS® IA External Interface, you can produce threadsafe reports directly from your application.
What is the CIUSPTSR Stored Procedure?
CIUSPTSR is a DB2® Stored Procedure that gathers threadsafe information for the specified programs. It queries the CICS IA interdependency database, gets all necessary data, and returns either a summary or detailed threadsafe information for the specified programs in a result set. It can be called from a user application with a SQL CALL statement.
Syntax
EXEC SQL
CALL CIUSPTSR (ctype, collid, applid, qarg, cicslevel, rc, sqlcode, errmsg);
Procedure parameters
There are several input parameters that manage the CIUSPTSR processing and several output parameters that inform about the process completion and errors, if any.
Parameter name | input/output | Type | Description |
---|---|---|---|
ctype | INPUT | CHAR(4) | Call type |
collid | INPUT | CHAR(16) | CICS IA collection identifier (COLLECTION_ID) |
applid | INPUT | CHAR(8) | CICS TS region APPLID |
qarg | INPUT | VARCHAR(8) | Query argument |
cicslevel | INPUT | CHAR(4) | Version of the CICS TS |
rc | OUTPUT | INTEGER | Return code |
sqlcode | OUTPUT | INTEGER | SQLCODE |
errmsg | OUTPUT | VARCHAR(300) | Error message text |
CIUSPTSR INPUT parameters (ctype, collid, applid, qarg, cicslevel)
Parameter | Description and values |
---|---|
ctype | Mandatory parameter. The ctype parameter defines the type of the returned program threadsafe information, either summary or detailed, and the method which is used to gather this information, that is by specified program or by transaction. Values:
|
collid | Mandatory parameter. The collection ID parameter specifies the CICS IA collection ID under which data was collected. A wildcard mask, "%", is valid only for call types PGMS and TRNS. |
applid | Mandatory parameter. The applid parameter specifies the CICS region in which the program or transaction to be reported on was running. A wildcard mask, "%", is valid only for call types PGMS and TRNS. |
qarg | Mandatory parameter. The query argument must specify either the program name or the transaction, depending on the specified ctype parameter. Wildcard masks are not permissible. |
cicslevel | Optional parameter. The cicslevel parameter defines the version of CICS TS to be used to determine the threadsafe status of the commands that are issued by the specified program. Values:
|
CIUSPTSR OUTPUT parameters (rc, sqlcode, errmsg)
Return code | Description |
---|---|
0 | CIUSPTSR procedure that completed successfully. |
4 | CIUSPTSR procedure that completed successfully, but one or more SQL warning conditions were received. |
8 | CIUSPTSR procedure that failed because of a critical error that is caused by incorrect input parameter values. |
12 | CIUSPTSR procedure that failed because of a disastrous error that is caused by SQL Exception conditions during SQL statement execution. |
Return code | sqlcode value |
---|---|
0 | 0 |
4 | Shows sqlcode for the last statement that caused the SQL warning condition. |
8 | 0 |
12 | Shows sqlcode of the failed SQL statement. |
- For rc=4, it contains the SQL message of the last SQL statement that caused the warning condition.
- For rc=8, it provides the invalid parameter value that caused the error.
- For rc=12, it provides SQL error message for the failed SQL statement.
Returned result sets
- List summary threadsafe information about specified program
- To list summary threadsafe information about the specified program,
you must set the input parameters as follows:
If you want to list summary threadsafe information for all existing collection IDs, set collid to %.ctype = 'PGMS' collid = collection ID applid = applid qarg = program name cicslevel = CICS TS level
- If you want to list summary threadsafe information for all existing applids, set applid to %.
- If you want to list summary threadsafe information for all existing programs, set qarg to %
- Set cicslevel either to a particular CICS TS version or set it to null to use the CICS TS version of the region on which the program was run and collected. Null is the default.
- This call returns one result set with all columns of the CIU_THREADSAFE_SUMMARY global temporary table.
- List summary threadsafe information about programs that are started by the specified transaction
- To list summary threadsafe information about the programs that
were started by the specified transaction, you must set the input
parameters as follows:
If you want to list summary threadsafe information for all existing collection IDs, set collid to %.ctype = 'TRNS' collid = collection ID applid = APPLID qarg = program name cicslevel = CICS TS level
- If you want to list summary threadsafe information for all existing APPLIDs, set applid to %.
- If you want to list summary threadsafe information for programs that were started under any of existing transaction set qarg to %.
- Set cicslevel either to particular CICS TS version or set it to null to use CICS TS version of the region on which the program was run and collected. Null is the default.
- This call returns one result set with all columns of the CIU_THREADSAFE_DETAIL global temporary table.
- List detailed threadsafe information about specified program
- To list detailed threadsafe information about the specified program,
you must set the input parameters as follows:
Set COLLID to existing CICS IA resources collection ID. Set APPLID to existing CICS TS region APPLID.ctype = 'DTLD' collid = collection ID applid = APPLID qarg = program name cicslevel = CICS TS level
- Set QARG to existing collected program name.
- Set CICSLEVEL either to particular CICS TS version or set it to null to use CICS TS version of the region on which the program was run and collected. Null is the default.
- This call returns one result set with all columns of the CIU_THREADSAFE_DETAIL global temporary table.