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
 

 

Retriving the MAXCC from a JOB from EJES in Rexx

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Thu Nov 13, 2008 2:44 am    Post subject: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

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

dick scherrer

Site Director


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

PostPosted: Thu Nov 13, 2008 2:59 am    Post subject:
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Thu Nov 13, 2008 4:52 am    Post subject:
Reply with quote

I've got EJES manuals at work -- I'll check tomorrow to see what's possible.
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Thu Nov 13, 2008 7:16 pm    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Nov 13, 2008 7:22 pm    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

did You check the DJC facility of jes3
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Thu Nov 13, 2008 7:45 pm    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

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

Global Moderator


Joined: 06 Jun 2008
Posts: 7914
Location: Bellevue, IA

PostPosted: Thu Nov 13, 2008 8:44 pm    Post subject:
Reply with quote

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

New User


Joined: 19 Jan 2008
Posts: 15
Location: Hyderabad

PostPosted: Sun Nov 16, 2008 6:51 am    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

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

Senior Member


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

PostPosted: Sun Nov 16, 2008 7:57 am    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

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

New User


Joined: 19 Jan 2008
Posts: 15
Location: Hyderabad

PostPosted: Sun Nov 16, 2008 11:12 am    Post subject:
Reply with quote

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

Site Director


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

PostPosted: Sun Nov 16, 2008 11:28 am    Post subject:
Reply with quote

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

New User


Joined: 19 Jan 2008
Posts: 15
Location: Hyderabad

PostPosted: Sun Nov 16, 2008 11:33 am    Post subject:
Reply with quote

Yes, I am reffering to TSO session being locked. I need to learn a lot for putting the things straight.
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: Sun Nov 16, 2008 11:55 am    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

Hi Vijay,

Not to worry - we will help icon_smile.gif

Don't be discouraged if there is some frustration icon_wink.gif

d
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Sun Nov 16, 2008 10:00 pm    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

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

Site Director


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

PostPosted: Mon Nov 17, 2008 5:38 am    Post subject:
Reply with quote

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

Senior Member


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

PostPosted: Mon Nov 17, 2008 6:56 am    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

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

Site Director


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

PostPosted: Mon Nov 17, 2008 8:44 am    Post subject:
Reply with quote

Hi Pedro,

Quote:
I do not recall anything in my post that might suggest anything even close to that.
No, you didn't icon_smile.gif

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

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Mon Nov 17, 2008 9:13 pm    Post subject: Reply to: Retriving the MAXCC from a JOB from EJES in Rexx
Reply with quote

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

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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