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

How to cancel a job using JCL?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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
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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue Aug 16, 2011 1:09 pm
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
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: 1788
Location: Bloomington, IL

PostPosted: Tue Aug 16, 2011 6:44 pm
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

Moderator Emeritus


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

PostPosted: Tue Aug 16, 2011 6:52 pm
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: 8797
Location: Welsh Wales

PostPosted: Wed Aug 17, 2011 1:39 am
Reply with quote

Bill, because that is the requirement icon_rolleyes.gif
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 Aug 17, 2011 2:12 am
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: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 17, 2011 2:27 am
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

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Aug 17, 2011 3:20 am
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
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
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

Moderator Emeritus


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

PostPosted: Thu Aug 18, 2011 11:13 am
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: 1742
Location: Tirupur, India

PostPosted: Thu Aug 18, 2011 11:24 am
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
Reply with quote

yes, will try that
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: Thu Aug 18, 2011 11:40 am
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: 2481
Location: Netherlands, Amstelveen

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

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

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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts JCL JOB Cancel/Purge Not Working JCL & VSAM 6
No new posts CICS START AND CANCEL CICS 1
No new posts EDIT END(SAVE) or CANCEL? TSO/ISPF 9
No new posts Will Job in CA7 cancel automatically? CA Products 2
No new posts How to cancel jobs which recalling mi... JCL & VSAM 11
Search our Forums:

Back to Top