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
 

 

How to cancel a job using JCL?

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

New User


Joined: 08 Nov 2006
Posts: 5

PostPosted: Tue Aug 16, 2011 12:58 pm    Post subject: How to cancel a job using JCL?
Reply with quote

Hi,

I want to cancel/purge a job using JCL. Please help me with this.

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

gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue Aug 16, 2011 1:04 pm    Post subject:
Reply with quote

You can use TSO CANCEL <JOBNAME> to cancel the job...
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 990
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Aug 16, 2011 1:09 pm    Post subject:
Reply with quote

If your site allows .... (mine doesn't)
Code:
//STEP01   EXEC PGM=IEFBR14
// COMMAND '<first command>'
// COMMAND '<second command>'
// ...
// COMMAND '<nth command>'


(from competitor site link removed)
Garry.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Aug 16, 2011 4:12 pm    Post subject: Reply to: How to cancel a job using JCL?
Reply with quote

If your job is triggered from scheduler like CA7.. You can cancel that from facility available in scheduler as well..
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Tue Aug 16, 2011 6:44 pm    Post subject: Re: How to cancel a job using JCL?
Reply with quote

sejal214 wrote:
Hi,

I want to cancel/purge a job using JCL. Please help me with this.

You are authorized to do this, right?
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Tue Aug 16, 2011 6:52 pm    Post subject: Reply to: How to cancel a job using JCL?
Reply with quote

Like Akatsukami, I wonder why you want to cancel a job using JCL. Please let us know.
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: Wed Aug 17, 2011 1:39 am    Post subject:
Reply with quote

Bill, because that is the requirement icon_rolleyes.gif
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Wed Aug 17, 2011 2:12 am    Post subject: Reply to: How to cancel a job using JCL?
Reply with quote

I was just worried it was a "which way round do these bullets go?" and "is it best to put the muzzle against temple or bridge-of-the-nose?" sort of question. :-)

When I was a lad we weren't allowed to just up and cancel stuff on our own. OPs or Production Support did that, even for testing. They kept a log of who asked that it should be done. CYA.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


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

PostPosted: Wed Aug 17, 2011 2:27 am    Post subject: Re: Reply to: How to cancel a job using JCL?
Reply with quote

Bill Woodger wrote:
I was just worried it was a "which way round do these bullets go?" and "is it best to put the muzzle against temple or bridge-of-the-nose?" sort of question. :-)

When I was a lad we weren't allowed to just up and cancel stuff on our own. OPs or Production Support did that, even for testing. They kept a log of who asked that it should be done. CYA.

I admit that I'm torn between emphasizing to the TS that this is the sort of scheme that gets junior software engineers terminated with extreme prejudice, and solemnly handing him a loaded revolver and explaining how to use it icon_evil.gif
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: Wed Aug 17, 2011 3:20 am    Post subject:
Reply with quote

Hello,

Quote:
I want to cancel/purge a job using JCL.
Why do you think this is something you should do? How will the job be canceled be identified to the jcl?

If someone has to modify/submit jcl to cancel a job, why not do this one of the "standard" ways?

If you post a question and then disappear, no one benefits.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Aug 17, 2011 5:41 pm    Post subject:
Reply with quote

I guess this "post something and disappear" is a common problem:

Surely the OP will deliver

OP = Original Poster, instead of TS = Topic Starter
Back to top
View user's profile Send private message
sejal214

New User


Joined: 08 Nov 2006
Posts: 5

PostPosted: Thu Aug 18, 2011 10:43 am    Post subject:
Reply with quote

Thanks all for reply. I was on vacation so could not keep check on the post.

Here is the reason why i need to cancel the job from job.
> Job A gets submited from IMS
> Job A executes PROC A (which executes main program A)
> Also it put JOB B on INTRDR which sends email in case Prog A abends or return code is greater than 4
> In case Program A executes normaly i need to cancel the job B to avoid email.
> There is some utility (specific to system) used to cancel the mail job B but i am unable to find the source code for that. This utility works fine in prod but in test it is unable to cancel the job B.

I hope this will clear the confusion.

thanks
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Aug 18, 2011 11:13 am    Post subject: Reply to: How to cancel a job using JCL?
Reply with quote

And you can't just telephone OPS?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Thu Aug 18, 2011 11:24 am    Post subject:
Reply with quote

Why don't you have JOB B(email sending step) as the last step of JOB A and check for condition codes of previous steps and send email if necessary.

But if you really want a solution of cancelling the job via JCL, I think Garry Carrol's post @ Tue Aug 16, 2011 1:09 pm might be the simpler way.
Back to top
View user's profile Send private message
sejal214

New User


Joined: 08 Nov 2006
Posts: 5

PostPosted: Thu Aug 18, 2011 11:34 am    Post subject:
Reply with quote

yes, will try that
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7232

PostPosted: Thu Aug 18, 2011 11:40 am    Post subject: Reply to: How to cancel a job using JCL?
Reply with quote

sejal214,

Going around cancelling jobs is not one of the things I'd recommend just "trying".

As has previously been suggested, make sure you have permission to do this, that it is not just some idea of your own.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Thu Aug 18, 2011 1:52 pm    Post subject:
Reply with quote

It looks like me this is the same question from the TS.

http://ibmmainframes.com/viewtopic.php?t=55599&highlight=
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
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts EDIT END(SAVE) or CANCEL? Steve Coalbran TSO/ISPF 9 Sat Feb 06, 2016 7:11 pm
No new posts Will Job in CA7 cancel automatically? thisak CA Products 2 Thu Aug 29, 2013 10:54 am
No new posts How to cancel jobs which recalling mi... shankar.v JCL & VSAM 11 Mon Jul 30, 2012 3:03 pm
No new posts JOB cannot be Cancel or Purge Nicolas Tuan Yu TSO/ISPF 5 Wed Jul 25, 2012 2:27 pm


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