<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>
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.
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.
Slack400 – if you could see our QHST logs, you might be more sympathetic to our weeding out the meaningless entries.
We “clearn” our history logs every night without problem.