Page 1 of 1

clear log

Posted: Tue Apr 05, 2005 11:40 pm
by przytula
We had a job that called different jobs. This job has aborted and now we have some subjobs for which we can not clear the log any more. When selecting : view log, the selection : clear log is not selectable. Is there any other possibility to clear this log. Even the output of latest run can not be cleared.
Thanks for all help/info
Best Regards, Guy Przytula
IBM DB2/ORA/SQL services

Posted: Wed Apr 06, 2005 12:00 am
by ray.wurlod
Revert to status view in Director. What is the status of the job? The usual reason for the Clear Log facility being disabled is that, rightly or wrongly, the status of the job remains recorded as Running.

If this is the case, and you are totally certain that the jobs are no longer running, then you can clear the job's status file. Once you have done that, then it should be possible to clear the log.

However, there is another possibility. If the log has grown too large (2GB) then it nay have been corrupted. In this case, execute the following commands from Administrator client command window.

Code: Select all

SELECT NAME, CATEGORY, JOBNO FROM DS_JOBS WHERE NAME = 'name';
Note the job number, which I will call nnn in the following commands. Substitute appropriately.

Code: Select all

COPY FROM RT_LOGnnn TO VOCLIB '//PURGE.SETTINGS' OVERWRITING
CLEAR.FILE RT_LOGnnn
COPY FROM VOCLIB TO RT_LOGnnn '//PURGE.SETTINGS' DELETING
Subsequently you should find that the Clear Log functionality is OK.

(All of the above assumes that you are not using multi-instance jobs.)

Posted: Thu Feb 08, 2007 3:03 am
by roblew
Yes! Ray, this was awesome advice. It took me two times to run, but I followed the instructions above to clear the log. The log is now able to be viewed successfully.

This is what the files looked like before and after the CLEAR.FILE:

Code: Select all

$ ls -lrt
total 2628008
-rw-rw-r--    1 mhjb     dstage   534386688 Feb  7 03:40 OVER.30
-rw-rw-r--    1 mhjb     dstage   2154053632 Feb  8 00:41 DATA.30
$ ls -lrt
total 8
-rw-rw-r--    1 mhjb     dstage       2048 Feb  8 00:46 OVER.30
-rw-rw-r--    1 mhjb     dstage       4096 Feb  8 00:47 DATA.30

Posted: Thu Feb 08, 2007 5:04 am
by ray.wurlod
roblew wrote:Yes! Ray, this was awesome advice. It took me two times to run, but I followed the instructions above to clear the log.
It appears it also took you two years to clear the log!! My post was dated Apr 2005.

Posted: Thu Feb 08, 2007 8:04 am
by roblew
ha ha. very funny. I'm not the original poster... I used the search (like I'm supposed to), and just wanted to show my appreciation. :D

Posted: Thu Feb 08, 2007 8:12 am
by DSguru2B
That is indeed excellent advice. Another post going in my favourites. Thanks Ray.

Posted: Thu Feb 08, 2007 3:28 pm
by ray.wurlod
roblew wrote:ha ha. very funny. I'm not the original poster... I used the search (like I'm supposed to), and just wanted to show my appreciation. :D
Yes, you did. Thank you. And well done for searching before asking - there are many answers floating around in DSXchange.