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

REXX to wait until JCL execution Completes


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
prodigy

New User


Joined: 15 May 2006
Posts: 28

PostPosted: Tue Feb 13, 2007 11:24 am
Reply with quote

Hi,

Is there any possiblity for the REXX to proceed only after the JCL (that was submitted thru the REXX) completes?
I need my REXX to wait until, my JCL completes reproing the GDG version to a flat file. But unfortunately, the REXX submits the JCL and proceeds with the next step which is opening the file(created in the JCL).
At times, when the file is not yet ready(JCL not completed), i get an EXECIO error.
Any way of solving this issue?

Thanx
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Feb 13, 2007 12:15 pm
Reply with quote

There are some SLEEP programs (and even a UNIX service), and if you will search the forum you will find planty examples.

I must tell you my personal opinion that "sleeping" a foreground REXX for more the 2-3 second is a bad practice, IMHO.

O.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Feb 13, 2007 11:08 pm
Reply with quote

Hello,

To save system resources, run the repro THEN start your rexx. Why should you tie up "online" resources waiting for some batch job to run?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Wed Feb 14, 2007 12:45 am
Reply with quote

Wouldn't it make more sense to loop the exec in a STATUS check until the job completes and the STATUS becomes 'ON OUTPUT QUEUE'?
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Wed Feb 14, 2007 2:14 am
Reply with quote

Why not do the repro in your Rexx.
Back to top
View user's profile Send private message
prodigy

New User


Joined: 15 May 2006
Posts: 28

PostPosted: Wed Feb 14, 2007 10:54 am
Reply with quote

Hi,

I can't SLEEP the program, because as you suggested it is bad practice. Another prob with SLEEP is, i ve no idea bout the time because the server is overloaded and at times, it takes more than few minutes.

Regarding, starting the rexx after REPRO - The user, who uses the REXX has to give the GDG as an input. As of now, i am only aware of that fact that REXX does not support GDG. Hence the REPRO step.


Based on this, are there any other suggestions?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Wed Feb 14, 2007 12:30 pm
Reply with quote

Invoke IDCAM REPRO directly from within the REXX, as Mickeydusaor suggested.

O.
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 -> CLIST & REXX

 


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