Page 1 of 1
uv command to clear all the log files for a project
Posted: Wed Oct 12, 2011 6:17 am
by dstechie
Hi All,
I want to clear all logfiles and status with universe command for a particular project.
As of now I am able to clear logfiles for only one job with the command-
clear.file RT_LOG24 . It clears only job 24 .
Can any one help out with a single command which will clear all the logfiles for all jobs in a project.
Regards
dstechie
Posted: Wed Oct 12, 2011 6:32 am
by chulett
There isn't one. You could build a routine that selects a list of job numbers from DS_JOBS and then issues a CLEAR.FILE for each one in a loop.
Code: Select all
SELECT NAME, CATEGORY, JOBNO FROM DS_JOBS WHERE NAME NOT LIKE '//%' AND NAME NOT LIKE '\\%' ORDER BY CATEGORY, NAME;
There are extra columns you can remove from the select or you can use them to log what you are doing. You could also do something strictly from UNIX by listing out the directory names matching RT_LOGnnn, cutting out the number portion and then issuing the matching clear in a do loop.
I'm curious why the need for something like this. You are taking advantage of the auto-purge functionality, are you not?
Posted: Thu Oct 13, 2011 5:05 am
by dstechie
Hi Chullet,
Thanks a lot for your reply.
The question came from another team. So I am not aware of the need of this requirement.
Please let me know if we are not supposed to use the above functionality.
Regards
dstechie
Posted: Thu Oct 13, 2011 6:30 am
by chulett
There's no "not supposed to" here. Just curious why the question was asked. Many times we see questions like this asked because of an underlying problem when people should be explaining their problem to us rather than starting with their perceived solution, which many times... isn't.
If you find out, let us know.