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

Cancellation of Running Job


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
AVINASH.SHARMA

New User


Joined: 18 Feb 2013
Posts: 7
Location: INDIA

PostPosted: Tue Feb 26, 2013 3:00 pm
Reply with quote

In present scenario, sometime it happens that Job A takes much time to execute i.e its execution time conflicts with prod regions timings at which these regions go live.
In present if it happens we manually terminate the job A so that it should not affect prod region.
Example:

Start time of job A is based on the completion of its predecessor job and if it does not complete before 4.55CST. We manually terminate it at 4.55 CST because prod region go live on 5.30CST

Please let us know the possible solutions for it so that we don't require to manually terminate it in case it crosses 4.55CT.

Any suggestions would be highly appreciated.

Thanks,
Avinash
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Feb 26, 2013 3:04 pm
Reply with quote

Maybe it will end normally in the remaining 35 minutes?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Tue Feb 26, 2013 3:33 pm
Reply with quote

The amount of elapsed time a job will take depends upon a great number of factors, including (but not limited to) how many other address spaces (batch jobs, TSO users, CICS regions, started tasks, Unix System Services processes) are running in the LPAR, the CPU utilization, the I/O utilization, and the Workload Manager policies. You could schedule a job to start at 4:55 that cancels the job you want out of the system; if the cancel command failed then the job has completed.
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 Feb 26, 2013 5:34 pm
Reply with quote

AVINASH.SHARMA wrote:
Start time of job A is based on the completion of its predecessor job and if it does not complete before 4.55CST. We manually terminate it at 4.55 CST because prod region go live on 5.30CST
Are you trying to say that there is some "test Job" which conflicts with Production resources?
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 Feb 26, 2013 6:58 pm
Reply with quote

Hello and welcome to the forum,

Suggest you discontinue the practice of cancelling jobs that run "too long". If the job is to be canceled and run later, just schedule the job to run After the problem time?
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Tue Feb 26, 2013 8:55 pm
Reply with quote

Are you asking for an automated way to cancel the job if it's running?

Do you have a scheduler involved, or can you get one involved?

If I had to do what you are talking about, I would schedule a job at 4:55 that checks for the test job, then cancels it if needed. You could have a whole string of job names.

Alternately, I know that Control-M has parms in the schedule that will perform tasks based on time of day. If you run the problem job(s) in the scheduler, then you could have IT start the cancellation at 4:55.

Whatever you do, DON'T run a looping job waiting until 4:55. That will tie up an initiator and CPU cycles. Not to mention it will incur the wrath and scorn of the folks here.
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: Wed Feb 27, 2013 4:24 am
Reply with quote

Quote:
Not to mention it will incur the wrath and scorn of the folks here.
As well as Your Support people . . .

d
Back to top
View user's profile Send private message
AVINASH.SHARMA

New User


Joined: 18 Feb 2013
Posts: 7
Location: INDIA

PostPosted: Wed Feb 27, 2013 3:35 pm
Reply with quote

PeterHolland wrote:
Maybe it will end normally in the remaining 35 minutes?

We can't as our start job runs at 5.00 CT icon_biggrin.gif . So job A has to complete on 4:55 CT
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Feb 27, 2013 4:11 pm
Reply with quote

AVINASH.SHARMA wrote:
PeterHolland wrote:
Maybe it will end normally in the remaining 35 minutes?

We can't as our start job runs at 5.00 CT icon_biggrin.gif . So job A has to complete on 4:55 CT


So why you are talking about 5.30 in your 1st post?
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 27, 2013 4:25 pm
Reply with quote

time to lock the topic icon_question.gif
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Feb 27, 2013 5:19 pm
Reply with quote

He said his region goes live at 5:30. That means the start up deck(s) submit at 5:00 and it takes about a half hour to gather up its skirts and get ready for business.

I do wish he would have answered my question about the scheduler instead of just explaining about the start time though.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Feb 27, 2013 5:42 pm
Reply with quote

Ed Goodman wrote:
He said his region goes live at 5:30. That means the start up deck(s) submit at 5:00 and it takes about a half hour to gather up its skirts and get ready for business.


Right Ed, I didn't consider that. But is taking 30 minutes not a bit long ?
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Feb 27, 2013 6:48 pm
Reply with quote

Seems long to me, but my guess is that's an operational target. So the published 'get out of the water' time is 5:00 and they have 30 minutes to overcome any problems and be active for the users. Problems are probably crashed logs and/or cancelling pesky test jobs that have prod resources held.

Again, I wish Avinash would answer about the availability of a test scheduler.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Feb 27, 2013 7:07 pm
Reply with quote

Isn't the "test" aspect down to Anuj's unanswered question?

Wouldn't the time be better spent on working out a secure way to ensure JOB A completes in a timely manner? If it is a planned part of Production batch operations, it should "fit" within the schedule which allows "whatever" time for availability of user-access to their "online" systems.

Then JOB A will rarely require cancelling for late start, and it will become somewhat moot as to how that is carried out in practice, but almost certainly any Scheduler software will be able to do something to assist.
Back to top
View user's profile Send private message
AVINASH.SHARMA

New User


Joined: 18 Feb 2013
Posts: 7
Location: INDIA

PostPosted: Wed Feb 27, 2013 8:18 pm
Reply with quote

As per your suggestions can the actvity be preformed in Schedular ?
If my job A completes successfully then new job B won't perform anything . In case job A is crossing the threshold i.e 4.55 CT, then job B will cancel the running job A . Pls let me know Robert if I am correct..
Back to top
View user's profile Send private message
AVINASH.SHARMA

New User


Joined: 18 Feb 2013
Posts: 7
Location: INDIA

PostPosted: Wed Feb 27, 2013 8:34 pm
Reply with quote

Anuj Dhawan wrote:
AVINASH.SHARMA wrote:
Start time of job A is based on the completion of its predecessor job and if it does not complete before 4.55CST. We manually terminate it at 4.55 CST because prod region go live on 5.30CST
Are you trying to say that there is some "test Job" which conflicts with Production resources?

No there is no Test job which is conflicting the production resources.

Job A deletes the rows from various tables and sometimes it crosses the 4.55 CT. In that case we have to manually terminate the job.
Back to top
View user's profile Send private message
AVINASH.SHARMA

New User


Joined: 18 Feb 2013
Posts: 7
Location: INDIA

PostPosted: Wed Feb 27, 2013 8:49 pm
Reply with quote

dick scherrer wrote:
Hello and welcome to the forum,

Suggest you discontinue the practice of cancelling jobs that run "too long". If the job is to be canceled and run later, just schedule the job to run After the problem time?

We can't do beacuse after completion of job A our regions go live.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 27, 2013 8:52 pm
Reply with quote

16 posts and getting nowhere icon_evil.gif

don' t they have an operations/scheduling support in the TS organization icon_question.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Feb 27, 2013 9:13 pm
Reply with quote

enrico-sorichetti wrote:
don' t they have an operations/scheduling support in the TS organization icon_question.gif

Technically, they probably do. However, as seems to be increasingly common judging by the traffic on this and our sister board, it's likely staffed by inexperienced analysts with no knowledge of their environment.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Feb 27, 2013 9:29 pm
Reply with quote

Yes, you are correct. You schedule a job that starts at 4:55. That job will run a command to cancel the OTHER job.

So...do you, or do you not, have access to a scheduler that can run a job at 4:55?

If you do, then we can help you set up the cancel job.
Back to top
View user's profile Send private message
AVINASH.SHARMA

New User


Joined: 18 Feb 2013
Posts: 7
Location: INDIA

PostPosted: Thu Feb 28, 2013 1:48 am
Reply with quote

Ed Goodman wrote:
Yes, you are correct. You schedule a job that starts at 4:55. That job will run a command to cancel the OTHER job.

So...do you, or do you not, have access to a scheduler that can run a job at 4:55?

If you do, then we can help you set up the cancel job.
.

Yes our application uses ESP Schedular .Pls let me know how can I acheive it through ESP?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Feb 28, 2013 2:07 am
Reply with quote

AVINASH.SHARMA wrote:
Yes our application uses ESP Schedular .Pls let me know how can I acheive it through ESP?

Is not ESP a proprietary product, formerly offered by Cybermation and now incorporated into CA's Workload Automation? If your shop is licensed for the product, ought it not to have manuals? To repeat Dr. Sorichetti's question, does your shop not have an operations and/or scheduling workgroup that handles such matters? Are you trying to evade controls and proper processes to make your life easier in the short term?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


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

PostPosted: Thu Feb 28, 2013 1:51 pm
Reply with quote

AVINASH.SHARMA wrote:
Job A deletes the rows from various tables and sometimes it crosses the 4.55 CT. In that case we have to manually terminate the job.
Apart from what has been susggested about scheduler(s), I also like to enquire about - is there no business logic involved in here - if you cancel the job in between, arbitrarily, where rows from some tables are deleted and not from others -- will not that be a problem?

Having other jobs to wait until the delete is over, would not that be a better solution?

PS. Okay, I've made enough assumptions for today!
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Fri Mar 01, 2013 5:40 pm
Reply with quote

AVINASH.SHARMA,

Rather than PM's, why don't you go back to your technical people.

You have a scheduler. It can schedule jobs.

A job can contain a JES command to cancel a job.

Schedule a job to run at 04.55 which contains the appropriate cancel command.

IF your site standards do not allow JES commands to be submitted from batch jobs and IF your scheduler as no facility to assist, get your boss to give the task to the technical team's boss to resolve in a timely manner. If you cannot submit JES commands from batch, it doesn't matter what you use to attempt it (Cobol, JCL, Rice Pudding) it still won't work.

Since the limits to your task are posed by your scheduler software and its set-up, and your site standards, there really is nothing we can suggest unless you want some paid consultation from someone here.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Running a Job with the Default User ID JCL & VSAM 2
No new posts Error while running web tool kit REXX... CLIST & REXX 5
No new posts Ca7 long running jobs report All Other Mainframe Topics 1
No new posts Cobol-db2 : SQL query is running for ... DB2 4
Search our Forums:

Back to Top