Looking for relevant AS/400 Whitepapers? Visit the Search400.com Research Library.
Isjld | May 12 2008 3:37PM GMT
There is a command on the iSeries, CLRJOBQ JOBQ(*LIBL/XXXXXXXXXX) LOG(*JOB) , if you want to end all jobs.
Rodda | May 13 2008 1:44AM GMT
This will only cancel jobs waiting in the queue for a subsystem not the currently running jobs.
Rodda | May 13 2008 1:52AM GMT
If you want to end all jobs in the subsystem why not do:
ENDSBS SBS(QBATCH)
OPTION(*CNTRLD)
DELAY(30)
DLYJOB DLY(60) /* give enough time to end all jobs */
STRSBS SBSD(QBATCH)
Taekwondo | May 13 2008 1:41PM GMT
I have to ask. Why would you end jobs that are running? You may be creating a mess that needs cleaning up. What if you are in the middle of updating? Sounds as if you are trying to treat the system like a PC. I would look at QBATCH first to see average runtimes(assume 1 hour) then I would use a CL to put QBATCH on hold 65 minutes before I needed it shut down. Do the function you need and as a last step release the job queue. No mess worry about afterwords.