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: 4648
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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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