View previous topic :: View next topic
|
Author |
Message |
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Hi,
Can anyone help me with the below requirements.
I need to create a job which will monitor and notify about
1. the jobs running in spool for long time and
2. when more no of jobs are waiting in queue to run |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
How will your job access these details? Or, in other words, what program(s) or utilitiy(ies) will this process use? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
that' s just what schedulers and automation packages/products are for
You will find little help in reinventing the wheel! |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Hi,
Can you let me know any utilities or automation packages that help me in achieving this. We have a CA7 scheduler in our system, but currently it does not notify us of any long running jobs or when queue is heavy.
i have some experience in JCL but i am not sure how to proceed for this requirement or what pgm i should use to achieve this.
Any help will be greatly appreciated. |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
superk and enrico,
if i am not clear and more details are needed. kindly let me know. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Long running? 2 seconds, 5 minutes, 24 hours? First you have to define that, then you can for example use SMF information to get the long running jobs. The jobs waiting in queue are probably waiting for the long running jobs. Maybe long running job classes are defined, then find all the jobs with that class in SMF or jcl libraries. Just a few examples. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Peter, I believe this is a "instant analysis" type request rather than being able to get the stats from SMF at a later time.
But once again, an ill defined request. As you have said - we have no idea of what is long running. Come to think of it, when did jobs start to run in the spool anyway, I usually use an initiator. |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
expat,
splitting hairs huh? (about the spool thing) |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
nahh
the proper term is... tetrapyloctomy |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
PeterHolland wrote: |
splitting hairs huh? (about the spool thing) |
Or was it spitting feathers
Well, yes and know. I guess I was brought up to use the correct terminology and if everyone does, it just makes life easier for all concerned. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What do you want that cannot be seen in sdsf? (note, sdsf can be used in batch)
There are some sdsf/jcl topics in the forum.
You might also consider RMF. . . |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Hi all,
Long running jobs meant jobs that go into looping due to some data issue or table contention.
In our system we have thruput agents defined for job names, so only one job can run at a time. Other jobs will be on hold to avoid contention with table. So there were cases where jobs keep looping or many jobs(usually > 1000) are there in queue waiting for it to complete.
Im not asking a solution for long running job. Im asking for a alarm job or monitor job which can notify if some job is running more than 10 mins or there are more than 1000 jobs in queue waiting to execute. |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Dick,
My requirement can checked in SDSF. but it would require continuous monitoring. so i just wanted to automate it.
Any pgms or utilities or tools that i can use to achieve this. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Create a batch process that will check for what you want.
Once this works as a single submission, have it scheduled to run as needed (hourly, every 15 minutes, whatever works).
Personally, i believe time would be well spent preventing the problem rather than detecting it. Until the process(es) can be corrected, detection might help, but the best solution is to fix the processes. |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
I Posted in this forum so i can get some help in creating the batch process. Any materials u know that will help me in using sdsf in batch so i can read spool and check the data required like job running time or CPU time and no of jobs running in spool currently.
Can i achieve this using only JCL or REXX too? which one will be a better option, any idea.[/quote] |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Well, you can't do this with only jcl - because jcl does exactly nothing. . . All jcl can do is execute programs.
As i mentioned earlier, there are some sdsf/jcl topics in the forum. Look thru some of these and find somethng close to what you want to do.
If you find something in these topics that is not clear, post what you found and your doubt. Someone will be able to clarify. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Huzefa wrote: |
and no of jobs running in spool currently.
Can i achieve this using only JCL or REXX too? which one will be a better option, any idea. |
/RANT ON
Once more let us clarify exactly what JCL is.
it is Job Control Language.
By itself it does nothing. It is used to invoke the chosen program and to define which datasets are to be used by the DD names associated with the chosen program.
JCL does not have magical powers that solve all problems, JCL is merely the vehicule for telling the processor which program you want it to execute.
/RANT OFF
So, if you might just care to tell us which program you wish the JCL to execute, we might be able to help you. Dick has mentioned SDSF in batch. So what you do in terminal SDSF you can achieve in batch SDSF with a REXX driver.
Also, please note. JOBS DO NOT RUN IN THE SPOOL. They run in an initiator, the whole initiator, and nothing but the initiator.
As dick has also suggested, prevention is the better bet. Does the quality control processes in place not check for these conditions. Because if you go along with a REXX/SDSF solution you will tie up an initiator (Or maybe a sppol ) for as long as you perform the monitoring. What a WASTE of resource. |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
|
|
Expat,
thanks for your clarification. actually i posted this to know which program i should use to read SDSF in batch. As per Dick i tried searching for sdsf\jcl topics but i could not find any. May be i am searching in the wrong places. any links or materials regarding this will be of gr8 help. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
In the dark blue line near the top of the page, there is a SEARCH feature. When i use "sdsf" and "jcl" (without the quotes) as the keywords and click the "Search for all terms", i get "Search found 121 matches"
Suggest you look thru these and see if something is close to what you want to do. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Quote: |
Long running jobs meant jobs that go into looping |
Should be handled by TIME= parameter on the job card... the system will cancel if the time is exceeded. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
What - you mean TIME=1440 shouldn't be used. . . |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1248 Location: Richfield, MN, USA
|
|
|
|
dick scherrer wrote: |
What - you mean TIME=1440 shouldn't be used. . . |
Most certainly not, Dick. Use TIME=NOLIMIT instead. |
|
Back to top |
|
|
Huzefa
New User
Joined: 05 Dec 2006 Posts: 83 Location: Bangalore
|
|
Back to top |
|
|
|