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 to wait until JCL execution Completes

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: REXX to wait until JCL execution Completes
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: 2360
Location: Israel

PostPosted: Tue Feb 13, 2007 12:15 pm    Post subject:
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

Site Director


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

PostPosted: Tue Feb 13, 2007 11:08 pm    Post subject:
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

Moderator Team Head


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

PostPosted: Wed Feb 14, 2007 12:45 am    Post subject: Re: REXX to wait until JCL execution Completes
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    Post subject:
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    Post subject: Re: REXX to wait until JCL execution Completes
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: 2360
Location: Israel

PostPosted: Wed Feb 14, 2007 12:30 pm    Post subject:
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    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 Passing data from REXX to C programme... chong.zhou CLIST & REXX 3 Wed Jul 26, 2017 9:11 pm
No new posts REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 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