Hi All,
Is there any practical way to purge all logs for all jobs in the project?
Thanks,
Robert
Purge all job logs
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes, but it involves writing DataStage BASIC.
Do you want the purge to heed the project-default and job-specific purge settings, or just clear all log files?
Please ignore responses that suggest the use of CLEAR.FILE - this command also destroys the control records in the log file and may lead to run time errors.
The algorithm, in essence, is as follows.
For each job in the project
determine the job's log file name (it's a hashed file)
preserve the control entries
clear the hashed file (this is very fast)
place a "zero" entry in the log file
update the control entry //SEQUENCE.NO
update the control entry //JOB.STARTED
write the control entries back to the file
(end of loop)
Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
Do you want the purge to heed the project-default and job-specific purge settings, or just clear all log files?
Please ignore responses that suggest the use of CLEAR.FILE - this command also destroys the control records in the log file and may lead to run time errors.
The algorithm, in essence, is as follows.
For each job in the project
determine the job's log file name (it's a hashed file)
preserve the control entries
clear the hashed file (this is very fast)
place a "zero" entry in the log file
update the control entry //SEQUENCE.NO
update the control entry //JOB.STARTED
write the control entries back to the file
(end of loop)
Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
CleanupJob suffers from the same problems I described above - it deletes the control records from the log, so you lose any purge settings. Further, it clears the jobs' status file too, which may not be what is required. And it clears the &PH& directory, which may result in the loss of important diagnostic information.
What the world really needs is a new, improved version of CleanupJob.
Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518
What the world really needs is a new, improved version of CleanupJob.
Ray Wurlod
Education and Consulting Services
ABN 57 092 448 518