MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Auto Submit of Job at required intervals

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
THRIVIKRAM
Beginner


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Fri May 05, 2006 1:14 am    Post subject: Auto Submit of Job at required intervals Reply with quote

I have a requirement.
In a Job i want a particular step to be executed at 6.00Am and the other steps to execute at 4.30PM.Is there a way to do this automatically.That is,this job must be idle for the remaining time and should wake up at that particular time and submit the required steps automatically.
Back to top
View user's profile Send private message Send e-mail
Jaya
Beginner


Joined: 02 Sep 2005
Posts: 77
Topics: 10
Location: Cincinnati

PostPosted: Fri May 05, 2006 3:42 am    Post subject: Reply with quote

Thrivikram,

You can use the CA-7 override statements #JI, #JO and #JEND or #XI,#XO and #XEND to indicate the JCL statements that are to be included or ommited based on scheduling criteria.

You need to create 2 triggers for your job JOBA with different schedule id's ( let's say they are 001 for 6.00 AM and 002 for 4:30 PM)

If your job JOBA has 4 steps STEP1,STEP2,STEP3,STEP4 and you need STEP1 to run at 6:00 AM i.e schid=001 and other steps with schid=002

Code:

//JOBA      JOB
.........
#JI,ID=001
//STEP1    EXEC PGM=
..........
#JEND
#JI,ID=002
//STEP2    EXEC PGM=
..........
//STEP3    EXEC PGM=
..........
//STEP4    EXEC PGM=
..........
//
#JEND


For schid=001, only STEP1 will be executed since it is enclosed by
#JI,ID=001 and #JEND. The JCL statements not enclosed by #JI cards like JOB statement will be taken for execution at all schids.

Quote:
That is,this job must be idle for the remaining time and should wake up at that particular time and submit the required steps automatically.


You can also insert a DELAY program between steps STEP1 and STEP2. But forcing a huge delay from 6:00 AM to 4:30 PM is unadvisable due to resource consumption.

If you can't use these override statements , create 2 different jobs and schedule at 6:00 AM and 4:30 PM respectively.

Hope this helps...

Thanks,
Jaya.
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
THRIVIKRAM
Beginner


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Fri May 05, 2006 5:42 am    Post subject: Reply with quote

Jaya,

Thanx for the response.
But the job what i was talking is not executed through any scheduler.Its a job that sends Email to the team members across the locations at the specified intervals of time.Its a project dependent and i think no client will agree to put such job in the scheduler.

As you said using Delay will not be so good as this job must run 24/7 at that particular intervals of time.
Back to top
View user's profile Send private message Send e-mail
Jaya
Beginner


Joined: 02 Sep 2005
Posts: 77
Topics: 10
Location: Cincinnati

PostPosted: Fri May 05, 2006 6:47 am    Post subject: Reply with quote

Thrivikram,

You can also achieve that by implementing a logic using Thruput manager and Internal reader.

Check this link for more information.
http://www.mvsforums.com/helpboards/viewtopic.php?t=5930&highlight=thruput+manager

Note: In JECL statement by coding DATE=+01, You can make the job to execute at the next day.

It's time for me to leave home.. If needed will give you more details of it on tuesday.

Thanks,
Jaya.
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Fri May 05, 2006 6:48 am    Post subject: Reply with quote

THRIVIKRAM,

Why not use the Windows Scheduler and FTP the necessay job to be run on the mainframe at the specified intervals?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
hariavinash
Beginner


Joined: 21 Jan 2005
Posts: 52
Topics: 7

PostPosted: Fri May 05, 2006 7:31 am    Post subject: Reply with quote

Thrivikram,
Kolusu's suggestion looks best suited for your requirement.
But dont forget to change the scheduler/mainframe passwords when you change them.

cheers
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Fri May 05, 2006 1:46 pm    Post subject: Reply with quote

If your site has cron enabled in USS, you can use that too.
Back to top
View user's profile Send private message Visit poster's website
THRIVIKRAM
Beginner


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Sat May 06, 2006 10:20 pm    Post subject: Reply with quote

Thanks Kolusu

But I dont know how to use the Windows Scheduler.I asked a few of my Team Memebers,but they are also not aware.They have not used such thing till now.
Could you please put some light on this Windows Scheduler.
Back to top
View user's profile Send private message Send e-mail
THRIVIKRAM
Beginner


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Sun May 07, 2006 12:11 am    Post subject: Reply with quote

Kolusu,

One more question.I have seen your answer regarding DELAY cobol program.In that case will the Job be delayed releasing all the resources?I mean,in the previous step before calling this program if the job uses few Datasats(I/O Mode) and a DB2 table,will these resources be left free in the mean while the job is in delay state.Also if the Datasets are used after this delay program,how about them while the job is in delay state?

I am asking this question because a Job gets control of all the Datasets before it starts executing and releases them after its execution is complete.
Back to top
View user's profile Send private message Send e-mail
hariavinash
Beginner


Joined: 21 Jan 2005
Posts: 52
Topics: 7

PostPosted: Sun May 07, 2006 1:38 pm    Post subject: Reply with quote

Goto control panel--> scheduled tasks --> add task,
create a .txt file with ur logon script to the mainframe, with a put command u can submit the job u wanted to.

lemme know if u need the logon script

cheers
Back to top
View user's profile Send private message
Jaya
Beginner


Joined: 02 Sep 2005
Posts: 77
Topics: 10
Location: Cincinnati

PostPosted: Mon May 08, 2006 11:04 pm    Post subject: Reply with quote

Kolusu,

Your solution is short and sweet Smile

Thrivikram,
Please check this link for knowing the usage of windows scheduler.

http://www.mvsforums.com/helpboards/viewtopic.php?t=4996&highlight=windows+scheduler

Thanks,
Jaya.
_________________
"Great spirits have always encountered violent opposition from mediocre minds."
-Albert Einstein
Back to top
View user's profile Send private message
THRIVIKRAM
Beginner


Joined: 03 Oct 2005
Posts: 70
Topics: 34

PostPosted: Tue May 09, 2006 4:36 am    Post subject: Reply with quote

Hello all,

Excellent!!!

Its working.Thanks Jaya,hariavinash.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group