View previous topic :: View next topic
|
Author |
Message |
prodigy
New User
Joined: 15 May 2006 Posts: 28
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Mickeydusaor
Active User
Joined: 24 May 2006 Posts: 258 Location: Salem, Oregon
|
|
|
|
Why not do the repro in your Rexx. |
|
Back to top |
|
|
prodigy
New User
Joined: 15 May 2006 Posts: 28
|
|
|
|
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 |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Invoke IDCAM REPRO directly from within the REXX, as Mickeydusaor suggested.
O. |
|
Back to top |
|
|
|