How to DEFRAG the CA Jobtrac Job Management Index (IXX) data set after DELETE HISTORY?
search cancel

How to DEFRAG the CA Jobtrac Job Management Index (IXX) data set after DELETE HISTORY?

book

Article ID: 53438

calendar_today

Updated On:

Products

Jobtrac

Issue/Introduction

To reduce the CA Jobtrac JM data base space utilization, a frequent cleanup job is recommended. There are three types of records that can be deleted from the CA Jobtrac JM database: HISTORY, AUDIT and STATISTICS. Deleting these types of records frees up the Index and Data space and makes them available for later reuse. To free up the Index space for immediate reuse, the DEFRAG command is recommended.




Environment

Release:
Component: JOBTRC

Resolution

CA JOBTRAC JM SAMPJCL(HISTMANT) member contains a sample job to DELETE expired AUDIT and HISTORY records from the CA Jobtrac JM database. 

Sample history maintenance job to keep just the last 30 days of history and 100 days of audit data in the database:

//JPRG     EXEC GJTRJPRG   <- JCL procedure in the Jobtrac CAIPROC library
//SYSIN    DD  *
* DEFAULT FOR ALL EVENTS:
EVENT=*,DAYS=30,DELETE
AUDDAYS=100 
// 

After the records are deleted, run the following CA Datacom job to DEFRAG the CA JOBTRAC Index data set:

//DBDEFRAG JOB ...
//*
//*******************************************************************
//*                                                                 *
//*  SAMPLE DEFRAG OF THE CA JOBTRAC DATABASE INDEX                 *
//*                                                                 *
//*  THIS JOB PERFORMS AN ONLINE COMPRESS OF THE INDEX FOR THE      *
//*  CA JOBTRAC DATABASE USING THE CA DATACOM DBUTLTY PROGRAM.      *
//*                                                                 *
//*  THIS JOB CAN BE RUN WHILE THE CA JOBTRAC DATABASE IS OPEN      *
//*  AND ACTIVE.                                                    *
//*                                                                 *
//*  THIS JOB WILL:                                                 *
//*     1. REFRESH CXX DISK-BASED STATISTICS                        *
//*     2. RUN A CXX TYPE=A REPORT ON DBID 161                      *
//*     3. DEFRAGMENT THE INDEX BLOCKS                              *
//*     4. REFRESH THE CXX STATISTICS AGAIN                         *
//*     5. PRODUCE A FINAL CXX TYPE=A REPORT                        *
//*                                                                 *
//*******************************************************************
//*
//*   SET CUS=YOUR DATACOM CUSLIB
//*   SET CAI=YOUR DATACOM CAILIB (r11.0)  OR CAAXLOAD (V12.0 or later)
//*   SET CXX=YOUR CXX FILE NAME
//*
//DEFRAG   EXEC PGM=DBUTLTY,REGION=4M
//STEPLIB  DD   DISP=SHR,DSN=&CUS
//         DD   DISP=SHR,DSN=&CAI
//SYSPRINT DD   SYSOUT=*
//CXX      DD   DISP=SHR,DSN=&CXX
//SYSIN    DD   *
COMM   DBID=161,OPTION=STATS
REPORT DBID=161,AREA=CXX,TYPE=A
DEFRAG DBID=161
COMM   DBID=161,OPTION=STATS
COMM OPTION=STATS,DBID=161
REPORT AREA=CXX,DBID=161,TYPE=A
/*

The above DEFRAG job should be defined to CA Jobtrac JM and should run weekly after GJTRJPRG job.