View previous topic :: View next topic
|
Author |
Message |
maragatham
New User
Joined: 23 Dec 2008 Posts: 5 Location: Bangalore
|
|
|
|
Hi,
Is anyone aware of a JCL utility that delays the job until the specified file is free?
My thought on this is
STEP1- to use "VERIFY" command on the file and if it is being used by some other job; this step would return maxcc 12.
STEP2- Issue a wait command for 2 mins
STEP3
Go back to step1 for verifying the file again and repeat step1 and step2 until maxcc of step1 is zero.
I am struck up with the last step of looping.
Hope I am clear with my requirements.
Awaiting for a reply.
Thanks,
Maragatham |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
As far as I know, JES won't let you exclusive ownership on a dataset that is already taken.
O. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello Maragatham and welceom to the forum,
Quote: |
Is anyone aware of a JCL utility that delays the job until the specified file is free |
It is unacceptable many places to code a delay in batch jobs. All this does is unnecessarily tie up/waste system resources.
There is no JCL loop.
You need to handle this using the system schedule. Talk with the scheduling people and they can help with dependencies to get your process properly scheduled. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
If you're using JES3, the job won't be able to start executing until it can get exclusive access to the dataset. |
|
Back to top |
|
|
vvrahul
New User
Joined: 18 Oct 2005 Posts: 3 Location: Mumbai, India
|
|
|
|
Hi Maragatham,
In the systems, I have seen, the job would just sit in the spool and won't execute (or Trigger) till
the file is exclusively available.
The way to tackle this problem would be to:
1. Identify all the jobs that needs to use this file before your job.
2. Ask the scheduling team to put PREDECESSOR dependency of all jobs of step 1 to your job.
Hope this helps. Do let me know, if clarification is required.
Thanks,
Rahul |
|
Back to top |
|
|
|