View previous topic :: View next topic
|
Author |
Message |
scorp_rahul23
New User
Joined: 06 May 2008 Posts: 96 Location: Delhi
|
|
|
|
Hi,
I have a step in REXX code
ADDRESS TSO
"EXEC 'ID.TOOL.JCL(EXAMPLE2)'"
In EXAMPLE2 , we have JCL for doing sorting.
In next step we are allocating the output file for EXAMPLE2 program.
But since our JOB was running at that time, so while executing rexx it is saying dataset not catalogued.
So how should I make next step wait, till iutput file is generated or JOB is completed. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
I'd suggest you re-think your process. There is no guarantee that any job you submit from a REXX exec will execute in a timely manner. It would be poor design to have a process 'hanging around' for a job to finish - what if the initiators are 'held'?
You could, for example, invoke SORT directly from REXX so that the SORT is complete before you execute the next bit of REXX code. Depending on processing, another option might be to add the extra processing to the JCL being submitted.
Garry. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
How big is the file to be sorted?
If it is not very large, I suggest you call the sort program directly from your rexx program rather than to submit a batch job. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
scorp_rahul23 wrote: |
So how should I make next step wait, till input file is generated or JOB is completed. |
First, I'd say use your scheduling system for this. That's what it's there for. Otherwise, I'd say either way. It's certainly easier to check for a dataset, but then again it would be safer to check for the job completion. Just make sure you include some sort of maximum waittime checkpoint so you're not needlessly tying up an initiator. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Kevin, this is another of those "lock a terminal" requests where the OP wants to submit a job and then wait for that to finish before continuing with the foreground processing.
Ho Hummmmmmmmmmmmmmmm |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
enrico-sorichetti wrote: |
I see that the use of the topics no longer eligible has been less frequent lately, even if there are many many posts eligible for non eligibility |
That's what happens when you take a vacation Enrico, the standards just drop soooooooooo much. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
expat wrote: |
Kevin, this is another of those "lock a terminal" requests where the OP wants to submit a job and then wait for that to finish before continuing with the foreground processing. |
Could be. The default assumption for this forum that I stated many, many years ago is that the code in question would be considered to be running in batch unless the poster explicitly mentions otherwise. |
|
Back to top |
|
|
|