Batch process to archive Smart/RESTART Db2 synchronization table entries displayed within Smart/MONITOR.
search cancel

Batch process to archive Smart/RESTART Db2 synchronization table entries displayed within Smart/MONITOR.

book

Article ID: 249033

calendar_today

Updated On:

Products

Smart Restart Smart RRSAF

Issue/Introduction

Is there a batch method to perform a mass archive of Smart/RESTART entries displayed within Smart/MONITOR?

Client has not been archiving jobs thus there are many thousands of jobs within the Smart/MONITOR display causing
it to take a long time to start and refresh. 

Requirement is to archive all jobs prior to 01-01-2022 for instance and using the Smart/MONITOR ARC line command 
thousands of times within Smart/MONITOR is not feasible due to the number of entries.

 

Environment

Release : 20.0
Component : Smart/RESTART

Resolution

There is currently no batch archival process for the Smart/RESTART 
creator.CKPT_SYNCH table.

To perform a mass archive of rows in the Smart/RESTART Db2 synchronization table,
construct a SQL request to UPDATE the table and SET the Db2 column CKPT_SKEY_RRN to -2
for any desired row using a WHERE predicate.


Utilize the following SQL to perform a mass archive process
replacing the CKPT_JOBKEY = 'smfi' values with the LPAR System ID
and 'userid' with the ID to be displayed for User ID within the Smart/MONITOR
archive display: 

UPDATE creator.CKPT_SYNCH                                           
  SET  CKPT_SKEY_RRN = -2,                                      
  CKPT_JOBKEY = 'smfiuserid  ' ||                               
                TO_CHAR(CURRENT TIMESTAMP,'YYMMDDHH24:MI:SS.') ||
                SUBSTR(CHAR(CKPT_KEYTIME),22)                   
  WHERE CKPT_START_DATE < '2022-01-01' AND                       
        CKPT_SKEY_RRN = -1;                                     
                                                                 
DELETE FROM creator.CKPT_SYNCH                                      
  WHERE CKPT_START_DATE < '2022-01-01' AND                       
        CKPT_SKEY_RRN >= 0;