how to clear QHST job log

120 pts.
Tags:
QHST
QHST Job Log
our qhst log needs to be cleared but don't know how to do it...

Answer Wiki

Thanks. We'll let you know when a new response is added.

<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>

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • WoodEngineer
    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.
    6,540 pointsBadges:
    report
  • slack400
    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,705 pointsBadges:
    report
  • WoodEngineer
    Slack400 - if you could see our QHST logs, you might be more sympathetic to our weeding out the meaningless entries.
    6,540 pointsBadges:
    report
  • WoodEngineer
    We "clearn" our history logs every night without problem.
    6,540 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following