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

JCL to run a job at regular interval with JES2 command


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

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Fri Dec 07, 2007 5:15 pm
Reply with quote

Can anyone tell me how to make a job submit automatically at regular intervals using JES2 commands. I saw in one of the forums that the command syntax is $TA,T=hh.mm,i=nnn,'$VS,''S JOB,N=myjob''' . Can anyone explain with an example how to give this in a job?
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: Fri Dec 07, 2007 9:48 pm
Reply with quote

Hello,

I suggest you talk with your scheduling people and have this handled by the scheduling software on your system.
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Fri Dec 07, 2007 11:23 pm
Reply with quote

The job I wanted to schedule is a report job that runs in test and not in production. Its upto me to decide what to do to get the report. I cannot get in touch with scheduling people. I just saw the following post


ibmmainframes.com/viewtopic.php?t=927&highlight=jes2

scherrer,
Would be great if you can explain me that?
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: Fri Dec 07, 2007 11:34 pm
Reply with quote

Hello,

Quote:
The job I wanted to schedule is a report job that runs in test and not in production.
Jobs are typically scheduled by name and yours could also be. . .

Quote:
I cannot get in touch with scheduling people
Someone can.

Quote:
Would be great if you can explain me that?
I believe the last part of the topic you referred to has the exlanation.
Quote:
JES2 commands are entered into the MVS system through the system console.

Alternatively, they can be entered into the MVS system by software that emulates a console (i.e. Netview, Auto Operator tools, Job Schedulers).

Also, since batch processing is in direct communication with the JES2 subsystem, commands can be entered via the JCL COMMAND parameter.


You will still need to talk with the scheduling people or the system support people to find out if you have the permissions to issue JES commands. Many (most?) sites have restrictions on who can do this. Only someone on your system can tell you the rules for your system.
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Fri Dec 07, 2007 11:47 pm
Reply with quote

Thanks a lot for the response in jiffy.
Quote:

JES2 commands can be entered via the JCL COMMAND parameter


Hypothetically speaking, I have the permission to run the JES2 commands
is there a generalised job that will have a JES2 command in it that would help us to submit the PDS member at regular intervals ?
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sat Dec 08, 2007 1:44 am
Reply with quote

What's the regular interval?

Since it's a test system, why not create a job/program that you can submit with TIME=1440 that stays in a loop and, at regular intervals, checks the time on the system clock and, when required, submits your job(s)?

Obviously, if this one main job fails or gets cancelled, then you're screwed. Outside of that, is there a reason why you're not looking at something like that?
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Sat Dec 08, 2007 9:25 am
Reply with quote

My word usage regular interval is a deceptor actually. My job is a daily job and job that runs at regualr intervals in the same day. So running with TIME=1440 is out of question for me isnt it? Also the criticallity of the report is too low. Running job and manipulating the bdatabase thru some other means to produce the report is at the sole discretion of mine. Hence no issues if the job fails. But if it runs it would be a bit better that is all.
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Sat Dec 08, 2007 9:27 am
Reply with quote

Quote:


My job is a daily job and job that runs at regualr intervals in the same day.



Thats a mistake. I wanted to convey
My job is a daily job and not a job that runs at regualr intervals in the same day.
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: Sun Dec 09, 2007 3:42 am
Reply with quote

Hello,

If this supports some activity of your organization (and the application development staff is one of these), there is no reason that this cannot be scheduled.

If this is somethng that has value, i suggest that your manager could work with the scheduling people to have this put on the schedule with instructions that if there is a problem, it is sent to you or your group for resolution.

Keep in mind that jobs of this nature are your production. Just because the output is for some Information Technology user(s) rather than client department users, the job still needs to be scheduled, not just run by hand.

Running this via the schedule may mean documenting the process more formally than it is currently documented. . .
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sun Dec 09, 2007 8:14 am
Reply with quote

Aham, I take it at this point you have what you need to perform the task you originally asked about. It looks like you're aware of the $TA JES command, and you say you have console authority to execute it. I guess that all you need to do is submit your job with TYPRUN=HOLD, issue the $TA command to execute another command at the specified time, and have that other command release your held job.
Back to top
View user's profile Send private message
Aham

New User


Joined: 24 Oct 2007
Posts: 42
Location: chennai

PostPosted: Sun Dec 09, 2007 5:24 pm
Reply with quote

For some reason, My tech heads do not want to take this to scheduling people.

Quote:
It looks like you're aware of the $TA JES command


kevin , I am not really aware of that. In fact I just saw it in your post only.I said assume that I have console right(I said hypothetically speaking). I just need a sample JCL so that I can think of talking to my tech heads with the modified JCL. Would be of great help if you can provide me with a sample JCL.

BTW , typerun=hold, will it consume CPU time for staying in the Spool? Please advice
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: Mon Dec 10, 2007 12:25 am
Reply with quote

Hello,

Quote:
BTW , typerun=hold, will it consume CPU time for staying in the Spool? Please advice
No, while on hold, it will not use cpu time - it is not yet executing.

FWIW, if you are going to submit the job with hold and then later issue some command to release it, it would be simple to merely submit the job when it is to run. . .
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Mon Dec 10, 2007 9:44 am
Reply with quote

Aham,

Have a look at this link
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci970978,00.html
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Mon Dec 10, 2007 6:33 pm
Reply with quote

Quote:

For some reason, My tech heads do not want to take this to scheduling people.


Then your tech heads are ignoring the simplest and most obvious solution and you should tell them so. We schedule test jobs all the time because it is the correct way to get things to run with consistency and it allows Operations to view the job load in one tool instead of digging through your JCL to see why a job is constantly running that isn't on the schedule.
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top