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
 

 

Make REXX wait till the Jobs get executed

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

New User


Joined: 25 Feb 2006
Posts: 38
Location: chennai-india

PostPosted: Wed Jun 04, 2008 1:54 am    Post subject: Make REXX wait till the Jobs get executed
Reply with quote

Hi All,

I have created a job were it does the below process,
Step 1: Creates 10 JCL's using the SKEL.
Step 2: Submits all the JCLs using Fileaid step
Step 3: Executes a Rexx routine to create a report for the datasets created in step 2.

My problem is step 2 submits all the 10 jobs but after doing that it executes step 3 were it will try to use the files which are getting created in step 2 werer it fails.

How to make the step 3 wait till the step 2 jobs gets completed.
Back to top
View user's profile Send private message

Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Wed Jun 04, 2008 2:16 am    Post subject: Reply to: Make REXX wait till the Jobs get executed
Reply with quote

som,

Your requirement is not that clear.

Quote:
have created a job were it does the below process,
Step 1: Creates 10 JCL's using the SKEL.
Step 2: Submits all the JCLs using Fileaid step
Step 3: Executes a Rexx routine to create a report for the datasets created in step 2.


How are you creating those 10 JCL's??? Is that coded in REXX?

How are the JCl's submitted? automatically or how??

how is step2 connected to step 3 ? both the steps are in teh same job or what?
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: Wed Jun 04, 2008 2:20 am    Post subject:
Reply with quote

Hello,

You could change your process to submit 1 job rather than 10 (which may be preferable to the data center anyway). When the 10 processes complete, the rexx code could run as the last step of tghe job.

Aother possibility is to have the entire process set up with the scheduling software. The rexx process (step3) would be delendent on the other job(s) successfully completing.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Wed Jun 04, 2008 2:23 am    Post subject: Reply to: Make REXX wait till the Jobs get executed
Reply with quote

There is not really a good way to wait for the other jobs. The jobs are asynchronous with each other.

Some suggestions:
1. serialize the jobs, either by using the same job name, by using the same job class (only one initiator selecting that class), or make them into a single long multi-step job.

2. instead of printing your report in step 3, make it job 11 after your other 10 jobs.
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: Wed Jun 04, 2008 11:30 am    Post subject:
Reply with quote

And also search the forum, as this topic has been done and dusted several times before. Quick recap ...........

You want to hang your terminal until the jobs have processed
- Ok, so all initiators are in use and will be for a couple of hours. What will you do in the meantime ?
- One of the jobs fails - how are you going to know about.
- Various other points mentioned in previous topic discussion.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Jun 04, 2008 3:07 pm    Post subject:
Reply with quote

Hi,

years ago, before scheduling tools were around, I remember being confronted with a similar problem.

This is how I got around the problem.

1. Created a Control file with a flag of NNNNNNNNNN for each of the 10 jobs

2. Each of the 10 jobs that ran had 2 additional steps,

First additional step updated the control file with relevant flag set to Y and checked if all flags were set to YYYYYYYYYY, if so it returned a condition to kick off the second additional step which submitted job 11.

If not equal to YYYYYYYYYY then second additional step flushed.



Gerry
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 REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm
No new posts Determine Region with max bandwidth f... seahawk789 COBOL Programming 3 Mon Feb 27, 2017 8:26 pm
No new posts REXX compiled via RXTCOMP sergeyken CLIST & REXX 7 Tue Feb 07, 2017 9:41 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


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