Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Jcl to check long running jobs in spool
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Fri Nov 13, 2009 7:06 pm    Post subject: Jcl to check long running jobs in spool
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Nov 13, 2009 7:10 pm    Post subject: Reply to: Jcl to check long running jobs in spool
Reply with quote

How will your job access these details? Or, in other words, what program(s) or utilitiy(ies) will this process use?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Nov 13, 2009 7:11 pm    Post subject: Reply to: Jcl to check long running jobs in spool
Reply with quote

that' s just what schedulers and automation packages/products are for
You will find little help in reinventing the wheel!
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Mon Nov 16, 2009 12:23 pm    Post subject: Reply to: Jcl to check long running jobs in spool
Reply with quote

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
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Mon Nov 16, 2009 5:27 pm    Post subject:
Reply with quote

superk and enrico,

if i am not clear and more details are needed. kindly let me know.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Nov 16, 2009 6:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 16, 2009 6:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Mon Nov 16, 2009 6:38 pm    Post subject:
Reply with quote

expat,

splitting hairs huh? (about the spool thing) icon_smile.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Nov 16, 2009 6:43 pm    Post subject: Reply to: Jcl to check long running jobs in spool
Reply with quote

nahh icon_biggrin.gif
the proper term is... tetrapyloctomy
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 16, 2009 6:45 pm    Post subject:
Reply with quote

PeterHolland wrote:
splitting hairs huh? (about the spool thing) icon_smile.gif

Or was it spitting feathers icon_lol.gif

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Nov 16, 2009 9:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Tue Nov 17, 2009 9:41 am    Post subject:
Reply with quote

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
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Tue Nov 17, 2009 9:43 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 17, 2009 9:53 am    Post subject:
Reply with quote

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
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Tue Nov 17, 2009 10:33 am    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 17, 2009 10:39 am    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 17, 2009 12:42 pm    Post subject:
Reply with quote

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 icon_cry.gif ) for as long as you perform the monitoring. What a WASTE of resource.
Back to top
View user's profile Send private message
Huzefa

New User


Joined: 05 Dec 2006
Posts: 85
Location: Bangalore

PostPosted: Tue Nov 17, 2009 4:57 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 17, 2009 9:17 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Wed Nov 18, 2009 12:45 am    Post subject: Reply to: Jcl to check long running jobs in spool
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to move a long alphanumeric data ... lind sh COBOL Programming 6 Mon Dec 05, 2016 7:51 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us