I have a job that needs to be done weekly which is clearing an OUTQ until it stops at a certain number, usually i did it with an SBMJOB format like this :
And i didn't run them all together and just leave it there until there's nothing when i checked the WRKOUTQ
I usually need to have 2 session so that i can manually refresh to see the files slowly getting cleared and the other session to stop the SBMJOB before so that the cleared outq stopped at a certain number (i usually stopped the SBMJOB when the OUTQ reached 10.000)
Is there any way to make the SBMJOB stopped by itself once the OUTQ reached 10.000, i am aware with a CLP i can run all of this together of even interactively one by one, but i have no way of making sure that all of them will stops at acertain number(in this case 10000).
Thank you.
Code:
SBMJOB CMD(CLROUTQ OUTQ(QGPL/QPRINTPRD)) JOB(CLR_OUTQ) SBMJOB CMD(CLROUTQ OUTQ(USRBASELIB/QPRINTRTGS)) JOB(CLR_RTGS) SBMJOB CMD(CLROUTQ OUTQ(*LIBL/PRT01)) JOB(CLR_PRT01) SBMJOB CMD(CLROUTQ OUTQ(QUSRSYS/QEZJOBLOG)) JOB(CLR_QEZJOB) SBMJOB CMD(CLROUTQ OUTQ(QUSRSYS/QEZDEBUG)) JOB(CLR_QEZDEBUG)
And i didn't run them all together and just leave it there until there's nothing when i checked the WRKOUTQ
I usually need to have 2 session so that i can manually refresh to see the files slowly getting cleared and the other session to stop the SBMJOB before so that the cleared outq stopped at a certain number (i usually stopped the SBMJOB when the OUTQ reached 10.000)
Is there any way to make the SBMJOB stopped by itself once the OUTQ reached 10.000, i am aware with a CLP i can run all of this together of even interactively one by one, but i have no way of making sure that all of them will stops at acertain number(in this case 10000).
Thank you.
Comment