Posted: Fri Jan 13, 2006 5:07 pm Post subject: Get job information from JES
Hi all,
last days i have benn looking for a way to get job information directly from JES (e.g. max-cc, rc from each step, statistic data like cpu time, elapsed time,etc...).
Does exist any API or something, that can be "called" from an application program to interrogate JES about a job knowing his name or jobid ?
I know there are some ways to get part of information from MVS data areas, or using other approaches (eg. execute SDSF from JCL), but the problem is that there are always some limitations or possible future problems (MVS only knows about jobs that are executing, data areas can change, SDSF panels can change, etc ...).
I read about a macro called "IEFSSCS" but i dont't know if it can help me, and if so, how to use it.
I read also about sub-system interface but i just can't find what i'm looking for.
I am not sure if there are any JES API which can be used... but the products like JMR, $VARS, SAR are basically to log the job information. I would like to explore if something is really available.
We have an application that runs the server code on a z/OS V1.R4 machine under CICS TS. We have also DB2, and scheduller CTRL-M.
The client runs on Windows NT4.0 workstations (by now).
Except a few modules, all the code (server and client) is generated using Cool:Gen 5.1.
We have also a Batch infrastructure within the application.
Each time a user requests a business function that requires to run a batch job we record information in that batch infrastructure.
Daily, at evening we execute a batch job that reads the Batch Infrastructure tables (BIT) and pass to CTRL-M information that is used for job schedulling.
At this point the end-user knows that the job is "Schedulled to run".
At the beginning of each job we have a step that changes the status of the corresponding request in BIT from "Schedulled" to "Executing".
When the job executes OK, the satus is updated to "Successfull execution".
The problem arrives when for some reason the job doesn't complete execution with success.
I've tried "IF ABEND" in JCL, but it doesn't work on all situations (like operator cancelling job, JCL error, missing files).
The idea is to run each hour a CICS transaction that will check the status of jobs corresponding to requests with status "Executing" in the BIT.
When the job abends or is cancelled, etc, why do you just not have CTRL-M write this information for you? This is what we do, whenever a job abends for whatever reason, CTRL-M just raises a "Problem Record" in our change register. This is not the only way of doing things, but is quite commonly done in many shops (in my experience). There is no need for fancy coding of APIs. Just use the features which come with CTRL-M instead. I'm not a CTRL-M expert, so without researching the manuals for myself, I cannot give you fine-grain details about exactly how to accomplish this. If your CTRL-M person has even moderate skills, then this shouldn't be a problem.
Quite frankly I am flabbergasted at the reply you have received. If I was in your position, I would (and I'm not kidding) make a serious case to management that they hire someone who actually KNOWS how to use the Control-M product. What is the point of having someone in charge of a software product if their skill level is close to zero, and they are completely unwilling to engage in some basic research in order to help out the company which pays them their wages. If I was their manager, at the very least, I would immediately remove some/most of their responsibility for the product, and pass it to someone with some enthusiam to learn and assist.
In the "Control-M User Guide", chapter 1, it says that there are four types of parameters, of which the 4th is called "Post-Processing Parameters". The manual describes "Post-Processing Parameters" as, "Actions CONTROL-M performs after the job ends, depending upon the outcome of job execution. For example, CONTROL-M performs one set of actions if the job ends OK, but another set of actions if an abend occurs."
The manual (chapter 1) continues, "Once the job has executed, the CONTROL-M monitor implements the post-processing instructions defined in the job scheduling definition. Post-processing instructions can be defined for virtually any situation, such as job ended successfully, job abended, a particular condition code occurred in a particular step, and so on.
As part of post-processing, CONTROL-M can do the following:
1: add a prerequisite condition to, or delete a prerequisite condition from, the IOA Conditions file. This can trigger or prevent the submission of a job in the Active Jobs file.
2: force the placement of a job scheduling definition into the Active Jobs file, regardless of the basic scheduling criteria of the job
3: set AutoEdit variables
4: send (shout) a specified message to a specified location through the SHOUT facility or by electronic mail
5: send a message by mail to the recipient identified by the mail name prefix
6: change the final status of a job to OK or NOTOK
7: handle the job SYSOUT. This includes changing its class, deleting it, rerouting it to another node, releasing it for printing, or copying it to another location.
8: If CONTROL-M/Analyzer is active, invoke a CONTROL-M/Analyzer rule
8a: rerun a job
8b: perform an MVS job restart
8c: Restart if CONTROL-M/Restart is active, perform a CONTROL-M/Restart job restart
8d: Restart if CONTROL-M/Restart is active, automatically archive certain portions of the job output stop recycling of cyclic jobs."
And so... one of the post-processing things set up at our shop, is that when a job abends, alot of the job details are automatically inserted into a Problem Record. Alternatively you can fire off a special "Abend Job" which will write to a log file, etc. The possibilities are endless.
In every shop in which I have worked (close to 15 shops now), I have seen the use of post-processing parameters in the scheduling product being used. Every decent scheduling product has them. This stuff is not rocket science, hence the reply you have received just blows me away!
I genuinely feel sorry for you, that you actually have to work alongside people like that. In some of the places I've worked, management would be very angry at people like this, and they would have received a formal warning, and told to pull up their socks.
I've downloaded the CTRL-M User Guide, and I'll try to read a little bit more about what you wrote.
After that, I will see if it meets my needs and how to implement it.
About your considerations on our CTRL-M guys, I wouldn't take that like this.
Please consider that:
- perhaps they just have so much to do, that they haven't time to think about it and point me a solution;
- it's possible that they didn't have training to work with CTRL-M and they are learning by themselves while supporting production job's daily for several applications;
- maybe their manager gives them other things to do;
- and last but not the least, you aren't their manager, so you don't know people involved and their commitment to work or performance;
Honestely, it isn't fair to criticise them just because you assume a couple of things, that can be wrong.
The problem i described is just one existing case where that information (job info) can be used to do useful work.
Anyway, the first question of my post still remains: "Get job information from JES".
I really want to know how to do it, if it is possible.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum