clear log

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
przytula
Participant
Posts: 27
Joined: Wed Apr 14, 2004 1:31 am
Location: Brussels Belgium
Contact:

clear log

Post 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
Best Regards, Guy Przytula
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roblew
Charter Member
Charter Member
Posts: 123
Joined: Mon Mar 27, 2006 7:32 pm
Location: San Ramon

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roblew
Charter Member
Charter Member
Posts: 123
Joined: Mon Mar 27, 2006 7:32 pm
Location: San Ramon

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

That is indeed excellent advice. Another post going in my favourites. Thanks Ray.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply