View previous topic :: View next topic
|
Author |
Message |
sejal214
New User
Joined: 08 Nov 2006 Posts: 5
|
|
|
|
Hi!
In my application, main job A submits the job B (which sends email to user) in case there is an abend to the program executed by job A.
Actually job B gets submitted and held. Later Proc A gets executed. Inside PROC A, there is a step which cancels the job B in case everything is fine and no abend.
Now the issue is even in case of no ABEND job B gets executed and hence unnecessary emails are going.
I tried changing the job name for JOB B, it worked fine (successfully cancelled). Then i tried abending the prog A (from proc A) manually. this also worked fine and JOB B got executed. Again when there was no abend, still JOB B got executed..
In the Spool display of JOB A, i can see the message that JOB B got cancelled but it does not get cancelled actually.
Kindly let me know the solution for this problem. is there anything to do with DEVE environment? |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Instead of trying to cobble together something together, doing this, and that until it works, why not investigate the possibilities with your scheduler? Job fails, do this, job completes, do that, job ends with rc ne 0, do the other? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
the whole setup is clear as mud...
who is going to release job B in case of <abend> of job A ?
why not use Your scheduler facilities
the topic almost fall under the wrath of what you deserve if You try to write Your own job scheduler
www.ibmmainframes.com/viewtopic.php?t=20820&highlight=
unless the TS clarify the topic will be locked and moved |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello and welcome to the forum,
Before implementing something convoluted like this, it would have been better to talk with your scheduling, operations, or seniors to learn what is already available on your system.
This needs to be set aside and something usng the scheduling or automation software should be considered. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
as an aside from using the scheduling or automation software, why not submit job B only when there is an abend in job A and remove the TYPRUN=HOLD.
Gerry |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1042 Location: Richmond, Virginia
|
|
|
|
Why not send the e-mail from job A using COND? |
|
Back to top |
|
|
sejal214
New User
Joined: 08 Nov 2006 Posts: 5
|
|
|
|
Thank you all for the reply!
The system is very OLD and i can not make any major changes as of now. I have to find out the reason and solution for the problem.
JOB A
Step1 - copy the JOB B to INTRDR
Step2 - Execute PROC A
PROC A
step1 - Execute prog A
Step2 - cancel Job B if everything is fine. (using COND)
I dont understand inspite of the message in JESMSGLG for JOB A as
JOB47174 +A --> B CANCELLED
the jobB is not getting cancelled and getting executed.
/BR |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
With respect, chopping out some old JCL is not the same as digging into a 15-year-old DB update program written by a "programmer" with a heightened sense of the bizarre.
If you want to hunt it down, try google. Try the manuals (look up the Canceled message) look specifically at all references to the internal reader, as you could find a clue anywhere. Try collleagues, support personnel, sysprogs, etc.
I don't know the answer myself. Are the job numbers the same? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Quote: |
I dont understand inspite of the message in JESMSGLG for JOB A as
JOB47174 +A --> B CANCELLED
the jobB is not getting cancelled and getting executed.
|
That is not JES output, if you want help give the real world JES
output not some edited line. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
sejal214 wrote: |
[...]
JOB A
Step1 - copy the JOB B to INTRDR
Step2 - Execute PROC A
PROC A
step1 - Execute prog A
Step2 - cancel Job B if everything is fine. (using COND)
I dont understand inspite of the message in JESMSGLG for JOB A as
JOB47174 +A --> B CANCELLED
the jobB is not getting cancelled and getting executed.
[...] |
Can you post the messages from the job doing the cancel, and the same Job B succeeding?
Why you'd not want to use the scheduler I don't know, but if you delete Step1 of Job A and change Step2 of Proc A to do the work of Job B (using COND), won't you get what you want (as has previously been suggested)?
I don't like the idea of you issuing cancel commands. Can you do other "serious" jes commands?
What could happen if a previously gruntled employee with access to the prod JCL became disgruntled? Literally Bedlam. What about the fraudster who cancels the job sending the e-mails unconditionally. I, and Auditors I know, are somewhat concerned at this. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
You could have the problem of 2 jobs on the queues with the sam jobname - then JES does not know which job to cancel. |
|
Back to top |
|
|
Ed Goodman
Active Member
Joined: 08 Jun 2011 Posts: 556 Location: USA
|
|
|
|
Any chance the format of the cancel command is now different? Like, did you just upgrade your OS or the version of JES? Or maybe even switch spool programs?
The old job is probably still sending its cancel command as appropriate, but it's now using the wrong format.
Try canceling a job by hand. What command did you use? Is the same one the old job is using? |
|
Back to top |
|
|
|