120 pts.
 how to clear QHST job log
our qhst log needs to be cleared but don't know how to do it...

Software/Hardware used:
ASKED: November 4, 2008  5:02 PM
UPDATED: November 10, 2008  5:03 PM

Answer Wiki:
<pre>Hi, The QHST logs are files in library QSYS. They can be manually deleted, but really you should use the cleanup job to automatically remove them for you. GO CLEANUP Here you can setup the parameters for thecleanup job. Regards, Martin Gilbert. You can't clean the QHST logs in qsys lib. So what I understand you like to create ne display for your sysopr messages by only display that are imported for you. Try that: (DSPMSG Message queue . . . . . . . . . > QSYSOPR Name, *WRKUSR, *SYSOPR Library . . . . . . . . . . . > QSYS Name, *LIBL, *CURLIB Output . . . . . . . . . . . . . > *PRINT *, *PRINT, *PRTWRAP Additional Parameters Messages to display first . . . > *FIRST *LAST, *FIRST Severity code filter . . . . . . > 50 0-99, *MSGQ Than: Clear Message Queue (CLRMSGQ) Message queue . . . . . . . . . > QSYSOPR Name, *WRKSTN Library . . . . . . . . . . . > QSYS Name, *LIBL, *CURLIB Clear . . . . . . . . . . . . . > *KEEPUNANS *ALL, *KEEPUNANS</pre>
Last Wiki Answer Submitted:  November 7, 2008  6:40 pm  by  Gilly400   23,625 pts.
All Answer Wiki Contributors:  Gilly400   23,625 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

We run a package that generates tons of job start and job ended messages into our QHST logs. These messages have no value at all. All this extra clutter (thousands per day) really made it difficult to find the data we needed when viewing the logs.

I wrote a program to delete these extraneous records from QHST logs, which really helped. While doing this I discovered that it was very important to ALWAYS keep the first and last records in the log. If either were deleted it seemed to break the link from one log file to the next.

We’ve been doing this for at least three years with no problems.

We also follow Martin Gilbert’s recommend method for deleting old logs entirely.

 5,525 pts.

 

Martin’s got it right.
Don’t mess with manual cleanup, turn on the auto cleanup and set for 7/14/30 + days.
I guess it depends on how often you check the problem logs.
I go for 7 days.

WoodEngineer cleaning up the QHIST Logs with a program? Really?
I guess in days of old on an F50 that sounded like a good idea.

 2,680 pts.

 

Slack400 – if you could see our QHST logs, you might be more sympathetic to our weeding out the meaningless entries.

 5,525 pts.

 

We “clearn” our history logs every night without problem.

 5,525 pts.