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
 

 

JCL Loop that delays the job

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: JCL Loop that delays the job
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: 2360
Location: Israel

PostPosted: Tue Dec 23, 2008 11:36 am    Post subject:
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

Site Director


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

PostPosted: Tue Dec 23, 2008 11:39 am    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10210
Location: italy

PostPosted: Tue Dec 23, 2008 1:42 pm    Post subject: Reply to: JCL Loop that delays the job
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
http://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: 7929
Location: Bellevue, IA

PostPosted: Tue Dec 23, 2008 5:21 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts save SAY var loop. italo_pm CLIST & REXX 3 Sun Sep 04, 2016 3:06 am
No new posts print out the correct info in LOOP? jackzhang75 CLIST & REXX 7 Wed Dec 23, 2015 10:39 pm
No new posts Using different values for Skeleton d... venksiv CLIST & REXX 8 Thu Sep 03, 2015 5:28 pm
No new posts Issue with Do Loop. santosh_g CLIST & REXX 5 Tue May 12, 2015 9:24 am
No new posts A cursor within a multi-fetch cursor ... Rohit Umarjikar DB2 1 Thu Mar 06, 2014 9:43 am


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