Page 1 of 2

Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 1:56 pm
by Delli
Hi,

I am trying to write jcl/pgm which will let us know the status of a Job in Spool automatically.
If the job is in running status, then display message as it is in Running.
If the job is not in running status, then display the message as it is not Running.

Thank you!
Delli

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 2:07 pm
by enrico-sorichetti
and ... what will be the added value compared to the standard tools which could be used ???

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 2:10 pm
by prino
Who told you to write such crap?

To use such a program you would have to look in the spool for its output anyway, so why not look directly into the spool. Most sites us SDSF, why the fluffing 'ell don't you use that?

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 2:39 pm
by Delli
I agree, going to spool and checking the status is very simple. But, I am not only working on this status, there are other checks I need send to the group of people. If i get some inputs how to check the status of a job in spool, then i no need to look it manually again.

Thanks!

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 2:41 pm
by Delli
I just need to check the status of the job in spool. I am not going to look any output. Only status - it is in running status or not!

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 3:34 pm
by steve-myers
The question, as stated, does not really have an answer.

"Running" has several interpretations.

What level of detail do you need?

What skills do you have?

Does your environment use Multi Access Spool? If so, do you need data if the job you are checking is 'running" (what ever that means) on a different system than the system where the inquiry is being made?

If the search key is a job name, what do you do if there are multiple instances of this job?

Is the job being managed by a vendor supplied job manager? If so, you should be checking the documentation for the product.

Until you can provide answers for all these questions, no one can provide much assistance.

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 4:21 pm
by Delli
My requirement is:

I use OPC as scheduler. Once we release an application(which has 100 jobs), then there are 100 jobs will be in running status. Need to know how many jobs are in running status and how many are not in running (failed). Need to know only the jobs are in running status instead of checking manually in spool or opc scheduler? Can we write some JCL/Pgm which will show only the jobs those are in running status.

What i was requesting could not be achieved?

Thanks!

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 4:37 pm
by Robert Sample
If you are looking for a simple way to accomplish what you want, then the answer is no, you cannot do it. However, if you want to invest the time to learn the product interface, then the answer will be yes, it probably can be done. In order to do what you want, though, you need to plan on spending a few days or weeks (or months, depending upon your level of expertise) learning the program interface to OPC and TWS. Once you have spent the time learning the necessary basics, you will probably see how to accomplish your task yourself.

For example, your last post used the term "running status". What does this mean to you? Does it mean:
- the job was accepted by OPC and can be scheduled?
- the job is scheduled to execute in OPC?
- the job is actively executing right now?
- something else you have not explained?
There are multiple ways to interpret "running status" and which interpretation is used will determine further questions and as well if your original question can be answered at all.

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 4:37 pm
by Blackthorn
Just becuase it's not running, why do you make the assumption that it will have failed? It might have just finished.

The easiest way would be to write your new job to run the enqury in TWS.

Re: Automatic JCL/PGM to know the status of job in spool

PostPosted: Tue Jul 02, 2013 6:00 pm
by NicC
And JCL will not do what you want but it will allow you to implement your solution. As you have OPC I would suggest we move the topic to the OPC section. If no one objects to that I will do so after I come home home from work this evening.