Start of change

CIUSPDPG Stored Procedure

By using the CIUSPDPG stored procedure you can list and then delete records from CICS® IA DB2® tables, which might contain information about old version of programs.

The CIUSPDPG stored procedure works with the following DB2 tables:
  • CIU_CICS_DATA
  • CIU_DB2_DATA
  • CIU_IMS_DATA
  • CIU_MQ_DATA
  • CIU_NATURAL_DATA

What is the CIUSPDPG Stored Procedure?

Use the CIUSPDPG stored procedure to list CICS TS applications for which you have collected data. Then, you can delete the redundant records that are identified by the CIUSPDPG stored procedure when using the list option.

Syntax

You can invoke the CIUSPDPG procedure with the following SQL CALL statement:
EXEC SQL
CALL CIUSPDPG (calltype, collid, applid, program-name, table-name, count, return-code, error-message); 

Procedure parameters

There are several input parameters that can help you to manage the CIUSPDPG processing. The output parameters inform you about the process completion and if there are any errors.

The following table lists all of the CIUSPDPG parameters.
Table 1. CIUSPDPG parameters
Parameter name input/output Type Description
calltype INPUT CHAR(1) Type of call (L or D)
collid INPUT VARCHAR(16) Collection ID
applid INPUT VARCHAR(8) Application ID
program-name INPUT VARCHAR(8) Program Name
table-name INPUT VARCHAR(20) Table Name
count OUTPUT INTEGER Count of records to be deleted
return-code OUTPUT INTEGER Return code
error-message OUTPUT CHAR(300) Error message text

CIUSPDPG INPUT parameters (calltype, collid, applid, program-name, table-name)

The following table describes the parameters and their matching values.

Table 2. Input parameters
Parameter Description and values
calltype Mandatory parameter

Defines the type of CIUSPDPG usage

Values: L D

collid Mandatory parameter if calltype is L

The collection ID parameter specifies the CICS IA collection ID under which data was collected.

Wildcard masks are not permitted.

applid Mandatory parameter if calltype is L.

The applid parameter specifies the CICS region in which the program to be analyzed was running.

Wildcard masks are not permitted.

program-name Mandatory parameter if calltype is L.

The program-name parameter specifies whether the program Wildcards % and _ can be used.

table-name Mandatory parameter if calltype is L

The table-name parameter defines the CICS IA DB2 table to be analyzed.

Wildcard masks are not permitted.

Values: CIU_CICS_DATA CIU_DB2_DATA CIU_IMS_DATA CIU_MQ_DATA CIU_NATURAL_DATA

CIUSPDPG OUTPUT parameters (count, return-code, error-message)

The count parameter contains the number of record to be deleted.

The return-code parameter contains the value of the CIUSPDPG return code. Possible return-code values are listed in the following table.
Table 3. return-code values
Return code Description
0 CIUSPDPG procedure completed successfully.
4 CIUSPDPG procedure completed successfully, but one or more SQL warning conditions were received during SQL statements execution.
8 CIUSPDPG procedure failed because of a critical error caused by incorrect parameter values.
12 CIUSPDPG procedure failed because of a disaster error caused by SQL exception conditions during SQL statement execution.
The error-message parameter contains message text that describes the error or warning:
  • For return-code = 4, it returns the last SQL warning that occurred during the CIUSPDPG run time.
  • For return-code = 8, it returns the invalid parameter value that caused the error. The incorrect parameter can also be found in SQLSTATE (SQLCA):
    • 99999: Invalid calltype specified
    • 99997: Invalid table_name value specified
  • For return-code = 12, it returns the SQL error message for the failed SQL statement.
End of change