View previous topic :: View next topic
|
Author |
Message |
sejal214
New User
Joined: 08 Nov 2006 Posts: 5
|
|
|
|
Hi,
I want to cancel/purge a job using JCL. Please help me with this.
Thanks,
Sejal |
|
Back to top |
|
|
gylbharat
Active Member
Joined: 31 Jul 2009 Posts: 565 Location: Bangalore
|
|
|
|
You can use TSO CANCEL <JOBNAME> to cancel the job... |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
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 |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
If your job is triggered from scheduler like CA7.. You can cancel that from facility available in scheduler as well.. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Like Akatsukami, I wonder why you want to cancel a job using JCL. Please let us know. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Bill, because that is the requirement |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
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 |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
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 |
|
|
sejal214
New User
Joined: 08 Nov 2006 Posts: 5
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
And you can't just telephone OPS? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
sejal214
New User
Joined: 08 Nov 2006 Posts: 5
|
|
|
|
yes, will try that |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
|