Job cleaning

Everything about Control-M Server installation or setup.
Post Reply
Nancy

Job cleaning

Post by Nancy » 04 Jun 2010 7:17

Hi Chaps,
Can we set up a job to remove any jobs older than n number of days in EM GUI?

Regards,
Nancy

User avatar
Walty
Nouveau
Nouveau
Posts: 473
Joined: 20 Jan 2006 12:00

Post by Walty » 04 Jun 2010 8:07

Hi,

I thinks you related jobs in AJF, for this use the <ctmpsm> utility
Create a job with this statements:

-Step 1 : select all jobs based on ORDERID related to your ODAT and eliminate jobs in DELETED status

ctmpsm -LISTALL ODAT | grep <yyyymmjj> | grep -v 'Deleted' | awk '{print $1}' > my_temp_file.$$

- Step2: HOLD and DELETE selected jobs

for job in `cat my_temp_file.$$ `
do
ctmpsm -UPDATEAJF $job HOLD
ctmpsm -UPDATEAJF $job DELETE
done
Best regards
Walty

Nancy

Post by Nancy » 07 Jun 2010 8:50

Hi Walty,
Much apprecaited.
However, is it required to set up two different jobs for the two steps you mentioned?
Where can I code those scripts?
Is it thru command line?

Regards,
Nancy

Post Reply