IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

REXX code in cpaturing whether JOB submitted complete or not


IBM Mainframe Forums -> IBM Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 96
Location: Delhi

PostPosted: Tue Aug 17, 2010 4:48 pm
Reply with quote

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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Aug 17, 2010 5:43 pm
Reply with quote

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

Global Moderator


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

PostPosted: Tue Aug 17, 2010 6:40 pm
Reply with quote

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

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Aug 17, 2010 6:53 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 17, 2010 7:15 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Aug 17, 2010 7:27 pm
Reply with quote

time to invoke ...
ibmmainframes.com/viewtopic.php?t=20820&highlight=

maybe ?

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 icon_biggrin.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 17, 2010 7:38 pm
Reply with quote

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 icon_biggrin.gif
That's what happens when you take a vacation Enrico, the standards just drop soooooooooo much.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Aug 17, 2010 7:46 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IBM Tools

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top