It should be clearing pending logs, providing the job has ended.
I have system value QLOGOUTPUT set to *PND on all 14 lpar's of IBM i.  A 
mix of 7.1 and 7.2.
I have GO CLEANUP set to 7 days.  I've no problem with you keeping yours 
for 31.  Some people would absolutely hurl over how long I keep journal 
transactions.
The oldest, on ALL lpars, job that appears using WRKJOBLOG 
JOBLOGSTT(*PENDING) PERIOD((*AVAIL *BEGIN)) is 12/31/14.  I just verified 
that.
If you are seeing joblogs for months then I suspect your cleanup jobs are 
not running or you have a PMR situation.
Let me try something...
4. End cleanup
CPC1E1A - Cleanup ended.
DSPLOG Nothing of note...
2. Start cleanup at scheduled time 
CPC1E1C - Cleanup will start at 22:00:00.
Nothing of note. 
Apparently this doesn't start or stop jobs.  This just flags other jobs to 
work or not.
Ok, let me try this:
WRKACTJOB
               Current
Subsystem/Job  User 
QCTL           QSYS 
  QSYSSCD      QPGMR 
Job:   QSYSSCD
10. Display job log, if active, on job queue, or pending
F10=Display detailed messages
Job 308366/QPGMR/QCLNSYSPRT submitted to job queue QCTL in library QSYS.
DSPLOG PERIOD((2200 010715))
CPI1E93 - Cleanup of job logs and other system output started.
From job . . . . . . . . . . . :   QCLNSYSPRT
  User . . . . . . . . . . . . :     QPGMR 
  Number . . . . . . . . . . . :     544190 
CPI1E94 - Cleanup of job logs and other system output successfully 
completed.
Let's make it really easy:
DSPLOG PERIOD((*AVAIL *BEGIN)) JOB(QCLNSYSPRT)
1 - If you do not have QSYSSCD running you have issues.  Resolve that.
2 - If QSYSSCD is running but you still have outdated joblogs (pending or 
spooled) then you have issues. Check that QCLNSYSPRT runs at the scheduled 
time with the DSPLOG command from above.
Rob Berendt
As an Amazon Associate we earn from qualifying purchases.