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

Is there a way to keep the second Job in a jcl WAIT for few.


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

New User


Joined: 21 Mar 2007
Posts: 28
Location: Bangalore

PostPosted: Tue Dec 09, 2008 12:24 am
Reply with quote

Hi Friends..

I have a JCL with couple of jobs in it..

Each step does has it's own usage...

is there a way to start the second job after 15 sec's the first job got submitted..and so forth to th next job..

AS below..

JOB1
---------15 SEC WAIT
JOB2
---------15 SEC WAIT
JOB3
---------15 SEC WAIT
and so on.........

i want to maintain the time gap of 15 sec between each job in the JCL..
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 09, 2008 12:28 am
Reply with quote

Hello,

Quote:
i want to maintain the time gap of 15 sec between each job in the JCL..
What business reason might there be to do such a thing. . . . icon_confused.gif
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Dec 09, 2008 12:31 am
Reply with quote

rakeshreddy,

I think you should be able to do this with the help of your scheduling team. But what is the reason behind this 15 sec "wait-tme"?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4651
Location: Raleigh, NC, USA

PostPosted: Tue Dec 09, 2008 12:54 am
Reply with quote

Rakesh, a search on the keywords "SLEEP" or "WAIT" ought to give you enough ideas to work with.
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 09, 2008 1:01 am
Reply with quote

Hello,

Quote:
is there a way to start the second job after 15 sec's the first job got submitted..and so forth to th next job..
IMHO, i believe there should be an understanding of the requirement before solutions/suggestions/alternatives are offered. . .

Notice the request asks for the ability to wait 15 seconds after submission - not 15 seconds after the job starts or ends, but after being submitted.

As i asked originally, what business requirement might be served by doing this?

It sounds (so far) like this another of the things that are technically possible, but should not be done. . .
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Dec 09, 2008 9:32 am
Reply with quote

Quote:
It sounds (so far) like this another of the things that are technically possible, but should not be done. . .
Agree completely. Wasting initiatior time is highly undesireable.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Dec 09, 2008 12:10 pm
Reply with quote

HOMEWORK ???
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Dec 09, 2008 12:15 pm
Reply with quote

Hi,

You need to re-think how to implement your requirement the requirement is not to keep initiators waiting in some step - that is your attempt to meet the requirement.

I suspect that you want to wait until some condition is met. This could be hours or worse case - never.

If several people implemented their process doing as you want to do, the mainframe would come to a complete halt because all of the initiators/partitions were "waiting".
Back to top
View user's profile Send private message
rakeshreddy
Warnings : 1

New User


Joined: 21 Mar 2007
Posts: 28
Location: Bangalore

PostPosted: Tue Dec 09, 2008 3:58 pm
Reply with quote

Hi Friends..
below is the description:

I have a JCL with multiple jobs( above 50 jobs) in it.

and the JOB Card is SAME for all the jobs (including the JOB NAME and I can't chnage the job name)

My doubt is :

Will the Job's execute in the SAME ORDER as they are in JCL (or) they will execute in RANDOM order?

My requirement is the JOBS should execute in SAME order as they are in JCL..

So i thought of using a WAIT parameter to make the second job execute after 15 sec to First Job..

If any of you can confirm that " the jobs will execute in the SAME order as they are in JCL"... i no need to use any WAIT Parameter.. i can directly submit the jcl.

Please suggest me on this...
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Dec 09, 2008 5:07 pm
Reply with quote

So why did you not spend 10 minutes setting up and testing this scenario, rather than post it on here ?

10 minutes is all that it would have took, if even that.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Dec 09, 2008 5:32 pm
Reply with quote

Aaarghh..!
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Dec 09, 2008 5:55 pm
Reply with quote

Something to be aware of in the JCL Language Reference manual (emphasis added by me):
Quote:
In a JES2 system, there are a number of factors that determine the order in which a particular job is selected for execution. Therefore, you cannot be assured that job priority (based on the PRTY you assign a job), job class, or the order of job submission will guarantee that the jobs will execute in a particular order. If you need to submit jobs in a specific order, contact your JES2 system programmer for advice based on how your system honors such requests
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 09, 2008 10:07 pm
Reply with quote

Hello,

Two ways to guarantee that the jobs run in order are to

1. Use the system scheduler
2. Have each job submit the subsequent job via the internal reader (job1 submits job2, job2 submits job3, etc.

IMHO, using the scheduler is the better choice.
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
No new posts Started transaction enters "firs... CICS 3
No new posts VSAM RLS Wait time JCL & VSAM 3
This topic is locked: you cannot edit posts or make replies. Job to wait and continue based on reply COBOL Programming 5
No new posts OMEGAMON to see In-DB2 times and Wait... IBM Tools 4
No new posts MQ message to wait for processing Java & MQSeries 1
Search our Forums:

Back to Top