Unix command for clearing datastage job logs.
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 21
- Joined: Mon Jul 12, 2010 2:05 am
- Location: India
Unix command for clearing datastage job logs.
I built a script which ckecks the status for all datastage jobs in a project and clears the log if the status of the job is successful. I used the "CLEAR.FILE RT_LOG" $project_name $job_name which is throwing an error as "Unable to clear file RT_LOG." I heard that CLEAR.FILE command resets the auto purge properties for the job which we want to clear the log.Can anyone help me by providing the command for clearing the job log with out resetting the auto purge properties?
You are missing the job number from the clear command. Each job has a unique number assigned to it that all of the internal structures are tagged with:
CLEAR.FILE RT_LOG1234
You can get the number by querying DS_JOBS:
I'm not aware of any command to purge logs without losing the auto-purge values.
CLEAR.FILE RT_LOG1234
You can get the number by querying DS_JOBS:
Code: Select all
SELECT JOBNO FROM DS_JOBS WHERE NAME = 'YourJobName';
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I still use this command to get the job ID:
Code: Select all
LIST DS_JOBS WITH @ID=job_name
Choose a job you love, and you will never have to work a day in your life. - Confucius
Thanks Eric.
going forward i will use this:
going forward i will use this:
Code: Select all
LIST DS_JOBS WITH @ID=job_name
pandeeswaran