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

JCL Loop that delays the job


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maragatham

New User


Joined: 23 Dec 2008
Posts: 5
Location: Bangalore

PostPosted: Tue Dec 23, 2008 11:24 am
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Tue Dec 23, 2008 11:36 am
Reply with quote

As far as I know, JES won't let you exclusive ownership on a dataset that is already taken.

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 Dec 23, 2008 11:39 am
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Dec 23, 2008 1:42 pm
Reply with quote

if Your shop is using TWS have the sheduling people look at the special resources
( it' a general enq framework to sync things without a dependency )
here is a pointer if You are interested
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/EQQTMG20/1.2.2.4?SHELF=EQQTBK20&DT=20070130154459
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Dec 23, 2008 5:21 pm
Reply with quote

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
View user's profile Send private message
vvrahul

New User


Joined: 18 Oct 2005
Posts: 3
Location: Mumbai, India

PostPosted: Fri Dec 26, 2008 12:07 pm
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
This topic is locked: you cannot edit posts or make replies. REXX - Do - Not able to LOOP CLIST & REXX 10
No new posts REXX - Dataset checking in a do forev... CLIST & REXX 6
No new posts Need to read duplicate rows from tabl... DB2 3
This topic is locked: you cannot edit posts or make replies. Cobol db2 program going in loop COBOL Programming 4
No new posts Need to loop & extract from varia... CLIST & REXX 2
Search our Forums:

Back to Top