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
 

 

Running a particular step of a job in a specific time

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Thu May 24, 2007 12:16 pm    Post subject: Running a particular step of a job in a specific time
Reply with quote

Hi
Say one job has 3 steps : step-a, step-b, step-c.
step-a and step-c must run at 2 and 4 PM . The requiremnet is to run step-b at 3 pm.
Is there any way in which we can do it having all these 3 steps in a single Job itself?
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 24, 2007 12:22 pm    Post subject:
Reply with quote

Do you have a schedule package, if so, use it. That is exactly what it does.

Three jobs, allascheduled on time, and dependencies accounted for too.
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Thu May 24, 2007 12:36 pm    Post subject:
Reply with quote

They are 3 different steps of the same job. My requirement is these e steps have to be in the same job.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu May 24, 2007 12:40 pm    Post subject: Re: running a particular step of a job in a specific time
Reply with quote

To my knowledge,within a single job,three steps can't be scheduled to run at different time.This is possible only by making three seperate jobs.
Back to top
View user's profile Send private message
Mahua Mitra

New User


Joined: 26 Apr 2007
Posts: 49
Location: Delhi

PostPosted: Thu May 24, 2007 12:58 pm    Post subject:
Reply with quote

is the following condition possible?
Job runs at 2PM, 3PM and 4PM.
Step-a runs at 2(return code 'X'), 3(return code 'X') ,4(return code 'X')

Now Step-b runs at 2, 3 and 4 but abends if the return code of Step-a at 4PM is 'X'.


Thanks
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Thu May 24, 2007 1:07 pm    Post subject:
Reply with quote

Mahua ,

Quote:
Now Step-b runs at 2, 3 and 4 but abends if the return code of Step-a at 4PM is 'X'.


You mean to say at 4PM you would like to abend step-b basing on step-a RC. If this is the case, step-c never executes (I guess it is present after step-b).

Using COND parameter/IF condition, make step-b to skip.
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu May 24, 2007 1:09 pm    Post subject: Re: running a particular step of a job in a specific time
Reply with quote

Better have them as seperate jobs,In your first post ,you have mentioned as
Quote:
Say one job has 3 steps : step-a, step-b, step-c.
step-a and step-c must run at 2 and 4 PM . The requiremnet is to run step-b at 3 pm.
Is there any way in which we can do it having all these 3 steps in a single Job itself?


Have step-a and step-c as one job1 and step-b as another job2.

run job1 at 2 and 4 p.n.run job-2 at 3 p.m.keepp job-2 to run dependancies if needed.
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Thu May 24, 2007 1:24 pm    Post subject:
Reply with quote

Pls check the below . This will work in our shop.
//STEP2
//DELAY EXEC PGM=EXCMDWP,PARM='00000500,D T'
//STEP3

THIS WILL HALT 500 SEC TO START STEP3


Disadvantage: it will consume CPU Time for the delay state. u can follow this method as the worst case.

Suggestion : some experts from REXX can write code to hold the job for delay state and active this job when needed..

Bye..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 24, 2007 3:48 pm    Post subject:
Reply with quote

Quote:
THIS WILL HALT 500 SEC TO START STEP3


OK, so how are you going to know in advance exactly how long the previous step will run for as to calculate the required delay.

The requirement that it must be one job is ludicrous. If things need to run at a certain time for a given reason, which I have asked for but not yet been given, thenm three jobs is the correct way to go.

What if step1 runs until 15:20 ???
Back to top
View user's profile Send private message
balajiofcrrcoe

New User


Joined: 07 Jul 2005
Posts: 41
Location: chennai

PostPosted: Thu May 24, 2007 4:19 pm    Post subject:
Reply with quote

I have an idea icon_idea.gif

we can have a loop before to the step which needs to be run at 3

to accept the system time

if time = 3

set return code of the step


based on the above step return code we would run the step at 3
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Thu May 24, 2007 4:27 pm    Post subject:
Reply with quote

balajiofcrrcoe wrote:
I have an idea icon_idea.gif

we can have a loop before to the step which needs to be run at 3

to accept the system time

if time = 3

set return code of the step


based on the above step return code we would run the step at 3


Yes, you can. I've written one in REXX and it eats CPU like there's no tomorrow. Is that what you want to do - use copious amounts of resource for no reason, and to impact other users on the system.

What about the JES exits that may well abend the job once a certain amount of CPU has been consumed. Did you think of that ?

I maintain that the use of a schedule package is the most efficient and foolprof way to do this.
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: Thu May 24, 2007 8:42 pm    Post subject:
Reply with quote

Hello,

Please explain what business reason there is to keep three activities that must happen 1 hour apart in the same job icon_confused.gif

There is no good reason to have the job sit idle in the initiator for multiple hours waiting for some hour to occur. Imagine if many jobs like this were submitted - your mainframe would come to a complete halt - everything would be "busy" doing nothing.

Hopefully, management there would not allow this type of job to be turned over as production.

Proper jcl and scheduling will serve you much better.
Back to top
View user's profile Send private message
shane

New User


Joined: 17 May 2007
Posts: 11
Location: Phoenix,Arizona

PostPosted: Fri May 25, 2007 1:52 am    Post subject:
Reply with quote

Hi,

I think this query is something like HOMEWORK.

Whatever may be we can use schedule package for this as also said by expat.
schedule package is meant for this things only
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri May 25, 2007 12:44 pm    Post subject:
Reply with quote

expat wrote:
Do you have a schedule package,


Expat,

A small query:
Are you talking about the package which is sechduled to be installed in production or is the above notion used for some other term.
If it is for some other term, please let me know a bit about this.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 685
Location: Earth

PostPosted: Fri May 25, 2007 1:14 pm    Post subject:
Reply with quote

expat is talking about scheduling products like CA-7.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri May 25, 2007 1:47 pm    Post subject:
Reply with quote

Quote:
expat is talking about scheduling products like CA-7.


Thank you Abhijit.

Other schedule packages include

OPC (Now known as TWS), CONTROL-M, JobTrac, Zeke
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri May 25, 2007 5:53 pm    Post subject:
Reply with quote

Thanks Abhijit.

Does that mean, I can rephrase expat line, in my perception,as :

"Do you have a schedule product(s); products which provide the facility to create/update a JOB sechduler."

Please suggest.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Fri May 25, 2007 6:12 pm    Post subject:
Reply with quote

oh ... I could not read expat reply before posting my reply. Thanks expat.
It means my thought process was right.

Thanks.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon May 28, 2007 6:29 am    Post subject:
Reply with quote

Hi MM,

You said:
Quote:
is the following condition possible?
Job runs at 2PM, 3PM and 4PM.
Step-a runs at 2(return code 'X'), 3(return code 'X') ,4(return code 'X')


This seems to indicate you have the ability to schedule the job for execution at the times you desire. If so, you can try this:

At 2PM exec the job w/this job card:

//EXEC2PM JOB (xx),'yy',MSGCLASS=X,CLASS=Y,
// RESTART=STEPA,COND=(0,LE),
// NOTIFY=ZZZZ

At 3PM exec the job w/this job card:

//EXEC3PM JOB (xx),'yy',MSGCLASS=X,CLASS=Y,
// RESTART=STEPB,COND=(0,LE),
// NOTIFY=ZZZZ

At 4PM exec the job w/this job card:

//EXEC4PM JOB (xx),'yy',MSGCLASS=X,CLASS=Y,
// RESTART=STEPC,COND=(0,LE),
// NOTIFY=ZZZZ

What this does is executes ONLY STEPA at 2PM; executes ONLY STEPB at 3PM and executes ONLY STEPC at 4PM.

The RESTART/COND allows only the RESTART step to execute; all other steps in the job are by-passed.
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
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts how to split records based on specifi... Venkata Ramayya DFSORT/ICETOOL 6 Wed Sep 28, 2016 3:20 am


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