Re: RE: Outq Managment
Ed,
Funny you should resurrect this thread now! I just finished sitting down with our operations manager of the AS/400 and showed him how to clean up the printqueue!
A little background. When we updated to SP 15, we started having an issue with random UBEs ending in an error with a "Object label badly formatted" message in the job log. After going round and round with tech support, they finally suggested that we add to our INI file "UBEUSEAdobe=1". Well, that solved our problem. However a few weeks later I noticed that the number of members of our printqueue on our AS/400 was not decreasing when I deleted jobs from the OW Work With Servers screen! It always did before. Standard JDE, fix one issue, create another. So back to tech support. Yes, they could duplicate it and issued SAR 5293703 for SP 16.1, but in the meantime I needed a solution as we run well over 2,000 UBEs a week (We may not update to SP 16.1 for months yet). And the only way I had at the time was manually from the green screen, typing in 4s. So I wrote this CL (Hope you can read it from this post):
*************** Beginning of data **************************************
PGM PARM(&STRDATE)
DCL VAR(&STRDATE) TYPE(*CHAR) LEN(6)
DCL VAR(&SELECT) TYPE(*CHAR) LEN(50)
DCLF FILE(QGPL/PQDOIT)
CHGVAR VAR(&SELECT) VALUE('MLCDAT *LE ' || '''' || +
&STRDATE || '''')
DSPFD FILE(B7332SYS/PRINTQUEUE) TYPE(*MBRLIST) +
OUTPUT(*OUTFILE) OUTFILE(QGPL/PQPURGE)
OPNQRYF FILE((QGPL/PQPURGE)) QRYSLT(&SELECT)
CPYFRMQRYF FROMOPNID(PQPURGE) TOFILE(QGPL/PQDOIT) +
MBROPT(*REPLACE) CRTFILE(*YES)
CLOF OPNID(PQPURGE)
RUNQRY QRY(QGPL/PQDOIT)
LOOP: RCVF
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END))
SBMJOB CMD(RMVM FILE(B7332SYS/PRINTQUEUE) +
MBR(&MLNAME)) JOBQ(QGPL/QBATCH)
GOTO CMDLBL(LOOP)
END: ENDPGM
****************** End of data *****************************************
The query is pretty straight forward. Based on the file created from the DSPF command, it selects out the members older than the date passed in. BEWARE: THERE IS NO ERROR CHECKING! The date format is 'YYMMDD' and needs single quotes around it to work. So today is PARM('010725'). If you inadvertently typed in '072501', 'MMDDYY' format, it would delete EVERY member of the printqueue. SO USE WITH CARE!
I also find it necessary to clean up 2 other areas.
The Integrated File System is where the job and job debug logs are kept. These are often times orphaned when deleting jobs from OW and there are logs in there from the kernals which you will never see in the submitted job search screen. So I use Windows Explorer to select out all old logs from there to delete after deleting jobs from OW.
I also review all the output queues (WRKOUTQ) on the AS/400 - our QPRINT que loads up as well and I manually purge from here - but I shouldn't have to and my operations manager is looking into that issue.
Hope this helps,
Dave Schlieder
B7332 SP 15 AS/400 NT