CPADB2AD - Statistics Alert DB2 table maintenance

This JCL runs a DB2 utility to execute SQL statements to delete a row from the CICS PA Statistics Alert DB2 table. The values in the WHERE statement identify the specific alert to be deleted.

Figure 1. Sample JCL CPADB2AD - Statistics Alert DB2 table maintenance
//CPADB2AD   JOB ,CLASS=A,NOTIFY=&SYSUID
//RUNTIAD EXEC PGM=IKJEFT01,DYNAMNBR=20                             
//STEPLIB  DD DISP=SHR,DSN=db2.sdsnload                             
//         DD DISP=SHR,DSN=db2.sdsnexit                             
//SYSTSPRT DD SYSOUT=*                                              
//SYSTSIN  DD *                                                     
 DSN SYSTEM(ssid)                                                   
 RUN PROGRAM(DSNTIAD) -                                             
     LIB('db2.runlib.load') PLAN(DSNTIAD)                           
/*                                                                  
//SYSPRINT DD SYSOUT=*                                              
//SYSUDUMP DD SYSOUT=*                                              
//SYSIN    DD *                                                     
DELETE FROM schema.CPA_tablename              /* Alert table name */
  WHERE                                                             
       START_DATE ='yyyy-mm-dd' AND                                 
       START_TIME= 'hh.mm.ss' AND                                   
       APPLID = 'applid' AND                                        
       MVSID = 'mvsid' AND                                          
       INTERVAL_TYPE = 'type' AND                                   
       ALERT LIKE 'alert description%' AND                          
       SEVERITY = 'severity' AND                                    
       RESOURCE_VALUE = 'resource value';                           
COMMIT;                                                             
/*