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
 

 

REXX code in cpaturing whether JOB submitted complete or not

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> IBM Tools
View previous topic :: :: View next topic  
Author Message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Tue Aug 17, 2010 4:48 pm    Post subject: REXX code in cpaturing whether JOB submitted complete or not
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

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Aug 17, 2010 5:43 pm    Post subject:
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

Senior Member


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

PostPosted: Tue Aug 17, 2010 6:40 pm    Post subject: Reply to: REXX code in cpaturing whether JOB submitted compl
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

Moderator Team Head


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

PostPosted: Tue Aug 17, 2010 6:53 pm    Post subject: Re: REXX code in cpaturing whether JOB submitted complete or
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: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 17, 2010 7:15 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Aug 17, 2010 7:27 pm    Post subject: Reply to: REXX code in cpaturing whether JOB submitted compl
Reply with quote

time to invoke ...
http://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: 8593
Location: Back in jolly old England

PostPosted: Tue Aug 17, 2010 7:38 pm    Post subject: Re: Reply to: REXX code in cpaturing whether JOB submitted c
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

Moderator Team Head


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

PostPosted: Tue Aug 17, 2010 7:46 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> IBM Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts How system know which REXX to excute? jackzhang75 CLIST & REXX 14 Thu Jul 06, 2017 1:09 am
No new posts REXX - Dynamic file Creation d_sarlie CLIST & REXX 7 Tue Jun 27, 2017 7:30 pm
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm


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