View previous topic :: View next topic
|
Author |
Message |
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
I am using (E)JES V4R5 for JES3. As part of automating regulart tasks we need a simple scheduler(rexx exec) for Dev to submit the job and wait for its completion. Based on the previous job completion code, I want to submit its successor.
However, every job output should move to $AVRS after the completion. need to grab the return code before it moves to $AVRS.
I am able to get the JOBNAME, JOBID through OUTTRAP. But I don't know retrieving MAXCC. Tried using SDSF API but it didn't work. Does anyone have a piece of code to EJES REXX API or manual? can we access JES3 directly from REXX?
Thanks
Rags |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
It is almost never a good idea to write your own "scheduler".
To control the execution of a series of jobs depending on the successful completion of each of the predecessors, you could have job1 submit job2 at successful end, job2 submits job3 at successful end, and so on until all of the jobs in the series have been processed.
Each job would write the folowing job to the internal reader. If you are not familiar with the internal reader, there are multiple topics in the forum (use the forum SEARCH).
If you find something that is not clear, post what you found and your question about it. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
I've got EJES manuals at work -- I'll check tomorrow to see what's possible. |
|
Back to top |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
I have a different Requirement. it is not always one thread based jobs we run but we have different job sets. We submit second job set only after the completion of first set. i.e jobs in each set can run parallel to save time.
we have EJES REXX API in our shop, But I couldn't use it as we don't have its manual and googled for it too. At last, posted my question here to get expert's ideas.
Thanks
Rags |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
did You check the DJC facility of jes3 |
|
Back to top |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
I have little idea about DJC and don't know setting up DJC networks.
However, there are few restrictions with DJC. As per the manual,Once set up, the structure of a DJC network cannot be changed unless all of the jobs in the network are resubmitted.) Jobs belonging to a DJC network cannot be registered with the automatic restart manager (ARM).
we submit different dev/maintenance jobs which are not same all the time. so its tough to stick to few DJC networks. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Unless DJC has been improved since the last time I used it, the real problem with DJC is if a job fails to process correctly (security violation, JCL error, etc) the entire network must be flushed and reentered. So if you've 17 jobs networked and the third one had a JCL error, all 17 have to be flushed and resubmitted. Not a great scheduling tool! |
|
Back to top |
|
|
vijay_pampana
New User
Joined: 19 Jan 2008 Posts: 15 Location: Hyderabad
|
|
|
|
Hi Rags,
Rexx is not the best idea for sheduling the jobs because your mainframe will be locked until all the jobs are completed.
Try to create a temporary PDS including all the members which the DEV/USER want to run through your rexx program and append INTRDR step. Check the return code in the INTRDR using IF condition an if it ok run the next series job based on the DEV/USER request. Create a panel where you can get all the jobs that need to submit from the USER. In this way your mainframe will not be locked and you dont need to check for the MAXCC in the spool.
Thanks
--Vijay |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
Rexx is not the best idea for scheduling the jobs because your mainframe will be locked until all the jobs are completed. |
Please explain what you mean by 'locked'. |
|
Back to top |
|
|
vijay_pampana
New User
Joined: 19 Jan 2008 Posts: 15 Location: Hyderabad
|
|
|
|
Hi Pedro,
I mean we cannot used the mainframe until the rexx program completes.
I have gone thru some of the post related to submitting jobs through rexx and I learnt a lot from it. Dynamically chaning the INTRDR step is one of the best option according to my opinion for these cases.
Please correct me if I am wrong.
Thanks
--Vijay |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I mean we cannot used the mainframe until the rexx program completes. |
Are you referring to your tso session being locked?
This is quite different than locking the entire mainframe . . . |
|
Back to top |
|
|
vijay_pampana
New User
Joined: 19 Jan 2008 Posts: 15 Location: Hyderabad
|
|
|
|
Yes, I am reffering to TSO session being locked. I need to learn a lot for putting the things straight. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Vijay,
Not to worry - we will help
Don't be discouraged if there is some frustration
d |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
I am reffering to TSO session being locked. |
For such instances, you should create a rexx program to run from a batch job. Your personal scheduler would still work and your TSO session would be free for other uses. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
At many well-managed data centers, such a job is canceled when detected and a warning issued to whoever submitted the job. It is seldom (if ever) acceptable to tie up an entire initiator this way. If it is impoprtant enough to schedule, it is important enough to use the scheduling system.
In some rare cases, management may approve but it would be ill advised to do so without prior approval.
Just because a thing can be done does not mean everyone should do it. . .
Most often i've seen this is for someone's personal convenience - not some business requirement. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Quote: |
does not mean everyone should do it |
I was not advocating that 'everyone' do it. I do not recall anything in my post that might suggest anything even close to that. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Pedro,
Quote: |
I do not recall anything in my post that might suggest anything even close to that. |
No, you didn't
T'was I classified this with "everyone".
Personally, i believe there should be no personal schedulers (of course "sleeping" is better than the often suggested/tried/failed method of adding 1 to some counter a few zillion times). . .
From what Vijay has posted, it sounds like the internal reader will do what is needed without some "personal scheduler" idling in another initiator.
Also, as i mentioned before, this is almost always done for personal convenience rather than some actual business requirement (by some lazy, as opposed to productive, developer). I have worked in some very strict environments that have "rules" that say only turned over production may be scheduled - and they make execptions when there is a real business requirement. |
|
Back to top |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
Thanks all Guys for your Input.
I had found the code to retrieve job details from EJES. My rexx exec won't stay idle/ run all the time. It just submit the list of jobs and wait until all are completed(irrespective of completed or errored). so that next set of jobs can be submitted based on previous jobs status.
We get requests to submit jobs in non-business hours. so we need such simple schedulers to reduce personal monitoring.
/* REXX */
USER = SYSVAR('SYSUID')
DELSTACK
QUEUE "MAX;ST;PRE "USER";"
/* QUEUE "MAX;JNAME ABCD8888;ST;NOP;" */
QUEUE ""
X = EJESREXX('EXECAPI * (TERM');
SAY "TOTAL ROWS: "EJES_TCDATA.1.0
DO I=1 TO EJES_TCDATA.1.0
SAY EJES_TCDATA.1.I EJES_TCDATA.2.I EJES_TCDATA.3.I ,
EJES_TCDATA.4.I EJES_TCDATA.5.I EJES_TCDATA.8.I ,
EJES_TCDATA.10.I
END
Regards
Rags |
|
Back to top |
|
|
|