Why don't you use job queues that allow multiple jobs to run? Dave
Unconfigured Ad Widget
Collapse
Announcement
Collapse
No announcement yet.
Change Job queue
Collapse
X
-
Change Job queue
srini87 wrote: > We like to identify this situation automatically and > change the job to available queue without manual intervention. > Is it possible to do it? David brings up a good point, but I'd like to take a different approach. JobQ's can specify how many of a certain run priority can run simultaneously, and how many in total can run simultaneously. So, your best solution would be to have the jobq allow multiple simultaneous jobs and then specify the appropriate number of simultaneous jobs for each run priority. Then change your jobs to run under the appropriate JobPty number. Bill
-
Change Job queue
David and Bill, it sounded to me like he was talking about identifying that some batch job(s) have a problem, and automatically moving any jobs in a backed up jobq to another jobq. Is jobq deliberately single threaded, or they encounter multiple jobs not finishing and backing up the jobs even when multiple programs are allowed to run simultaneously? I don't know, nor what the criteria of problem is, in the sense that slowly running is still running, not halted. I assume they would want this process to notify them of the problem as well. rd
Comment
-
Change Job queue
Ralph, I have been in several shops where the administrators were working under the premise that a single-threaded job queue was the only kind of job queue. I don't want to assume that this is the case here, but if it is, then a little knowledge can knock the stuffings out of a false premise. Dave
Comment
-
Change Job queue
Thanks Bill, David, Ralph. I never knew multiple jobs can be scheduled to run simultaneously from the same Job Queue. But I need to make a decision to move the job to another queue through a CL program when it sits in the JobQ for more than specified amount of time. How do I do this? Again, Appreciate all your help.
Comment
-
Change Job queue
This is easy to do from CL programs if you're willing to CPYSPLF to a physical file in QTEMP, read in a record, and substring for the data. I Google(TM)d and there are examples of the CPYSPLF to a physical file out there. Given a jobq to check, an alternate jobq to move jobs to, and a maximum specified amount of time for jobs to wait, you would in pseudocode: (I placed the pseudocode in Raw Code. The post runs the lines together.) rd
Code
Comment
-
Change Job queue
srini87 wrote: > Thanks Bill, David, Ralph. I never knew > multiple jobs can be scheduled to run simultaneously from the same > Job Queue. > > But I need to make a decision to move the job to another queue > through a CL program when it sits in the JobQ for more than specified > amount of time. How do I do this? I hope you have a good reason for wanting to do it this way because it's going to be involved. Here's the high-level of what you'll need to do: Find an API that lists jobs sitting in a specified jobq. Process the list looking for the appropriate candidates to move. Use the ChgJob command to move the job to another jobq. Bill
Comment
-
Change Job queue
We have a similar problem when we run monthend processing. We have in excess of 100 jobs and some daily jobs get 'stuck' behind. I used the code to check for the name of the job we wish to move. I think have a different looping cl with a wait to run the job every 20 minutes to move the jobs out. Because QBATCH can also be limited as to the number of jobs, I created a single-threaded jobq in subsystem QCTL (called QCTL_1) and move the jobs to there. If you do this, though, you should change the runpty because the job will run by default at 10. Hope this helps.
Code
Comment
-
Change Job queue
We got some AS400 batch programs updating some files. Our front end VB.net programs would pick up details from these files. Sometimes Batch programs sit in the Job Queue forever because of problems in the previous submitted jobs. We like to identify this situation automatically and change the job to available queue without manual intervention. Is it possible to do it? Your help will be very much appreciated. Thank you Srini
Comment
-
Change Job queue
I built a monitor based on code published in one of teh magazines that warns people if teh *JOBQ depth goes over a limit or is held with jobs waiting. I also have a utility (again from magazine article) that can move *JOBQ contents to another queue. However, getting teh wait time in the queue is complicated and I have never felt the need. I can offer you teh code if you want.
Comment
Comment