With the help of this CICS® IA External Interface, you can produce threadsafe reports directly from your application.
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.
EXEC SQL
CALL CIUSPTSR (ctype, collid, applid, qarg, cicslevel, rc, sqlcode, errmsg);
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 |
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:
|
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. |
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 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 collection
IDs, set collid to %.
ctype = 'DTLD'
collid = collection ID
applid = APPLID
qarg = program name
cicslevel = CICS TS level
Set COLLID
to existing CICS IA resources
collection ID. Set APPLID to existing CICS TS
region APPLID.