View previous topic :: View next topic
|
Author |
Message |
Shashank.kapoor
New User
Joined: 14 Jan 2009 Posts: 24 Location: Mumbai
|
|
|
|
Hi Vikram,
Just curious, do you have some dependent jobs also, I mean is your concern is to stop execution of the job cycle if this job does not completed successfully.
Reason for asking the above question, as dick has already mentioned how you can By-Pass the steps by using COND then why you want to abend the job?
We usually call abend only when we don’t want the remaining jobs to come into execution.
Below are the 3 points:
1) If there are no dependent jobs, then no need to call abend. Use COND in your job.
2) If there are dependent jobs, then you can give instruction in your instruction document to not to invoke the dependent jobs.
By “instruction document” I mean to say, for every job cycle we use to give some instruction in mainframe i.e. points need to be taken care while executing the job and this is used by Job Scheduler. Every organization has a different name for it.
3) Check in your system that do you have any program to call the explicit abend as I do have in my system. Whenever we want the job to abend we call it with the COND parameter.
//ABEND EXEC PGM=ABEND,COND=(12,EQ,STEPNAME)
For point 3, this we have in our system and we don’t have the source code. We use the load lib and we use it to get the job down on some specific condition.
Please correct me if you find something and also if you got confused.
I will try to be more clear.
-------------
Shashank |
|
Back to top |
|
|
vikramyadav
New User
Joined: 28 May 2005 Posts: 41 Location: Gurgaon
|
|
|
|
Using Cond will only bypass the steps it will not actually throw an abend and step excution then and there.
My concern is to stop execution of the job cycle if this job does not completed successfully i.e. if i get an abend in PS030 then stop execution there & throw an abend. |
|
Back to top |
|
|
Shashank.kapoor
New User
Joined: 14 Jan 2009 Posts: 24 Location: Mumbai
|
|
|
|
Hi,
That’s what I thought; your concern is to stop the Job cycle not only the particular Step/Job.
Just curious, 2nd and 3rd point of my previous post could not help you?
1) Is it possible for you to add one more instruction to stop the job cycle i.e. if you receive RC other than 0, do not proceed further?
OR
2) Can you create a program to call an explicit abend and use it in your job?
Mean while I try to figure out something which can help you.
-------------
Shashank |
|
Back to top |
|
|
vikramyadav
New User
Joined: 28 May 2005 Posts: 41 Location: Gurgaon
|
|
|
|
Shashank.kapoor wrote: |
Hi,
That’s what I thought; your concern is to stop the Job cycle not only the particular Step/Job.
Just curious, 2nd and 3rd point of my previous post could not help you?
1) Is it possible for you to add one more instruction to stop the job cycle i.e. if you receive RC other than 0, do not proceed further?
OR
2) Can you create a program to call an explicit abend and use it in your job?
Mean while I try to figure out something which can help you.
-------------
Shashank |
Hi Shashank,
The particular jobstep in question cannot be stopped as only when executes will we get a RC=12 or 0. so we can just avoid the succeding job steps.
Also there is no dependeny on any other job consider this is an independent job.
I hope i answered your question. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Then do as suggested and use conditional execution. Once a RC12 is issued by either of the FTP steps then all remaining steps of the job will be flushed. i.e. they WILL NOT be executed, they WILL NOT process, they WILL be bypassed.
Why the crying need for an abend ? What is so special about an abend ?
An abend gets the same results as flushing. The following steps do not get executed unless specified by COND= or IF/THEN/ELSE statements.
If there are external job dependencies via ascheduling software, then set up the software properly to identify that RC12 from particular steps are a virtual abend, i.e. do not process any further dependant jobs until this has been resolved.
Now go and play with conditional execution. |
|
Back to top |
|
|
vikramyadav
New User
Joined: 28 May 2005 Posts: 41 Location: Gurgaon
|
|
|
|
i think if i use a cond then the steps just get bypassed but the job will not get an abnormal end.
I am looking for an abend so that the job has an abnormal end and the job stands out and it gets noticed....currently what is happening is that those steps are just giving a RC=12 but still the job doesnt end abnormally and so it is not noticed unless we go inside the job info after its execution....
In Prod Supp we can see the jobs in abend queue in CA7 so that is the main motive of doing this. Unless the job does not abed we are not able to see it in CA7 and so we will not come to know if FTP had a problem
I hope this clarifies. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
You can use #SCC cards in CA7 to show the job as having failed depending on condition codes issued. This was stated in my previous reply. This will then make the job available to view as a failed job.
Please ask the people who are responsible for CA7 for further information on how to do this. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
I do not know about CA7
in OPC(TMS) IIRC You can choose what to consider exceptions
usually anything higher than 8 will be made to stand out in the job excepion report
just a hint about something to be investigated in Your ca7 setup |
|
Back to top |
|
|
vikramyadav
New User
Joined: 28 May 2005 Posts: 41 Location: Gurgaon
|
|
|
|
expat wrote: |
You can use #SCC cards in CA7 to show the job as having failed depending on condition codes issued. This was stated in my previous reply. This will then make the job available to view as a failed job.
Please ask the people who are responsible for CA7 for further information on how to do this. |
I just have the requirement as "add a step after JS030 & JS035 to abend if Rc=12". So i just have to code this...not ask them change anything. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
Quote: |
I just have the requirement as "add a step after JS030 & JS035 to abend if Rc=12". So i just have to code this...not ask them change anything. |
If You had told in Your first post that You were required to do it
we would not have lost our time to give better advices
You have already spotted how to do it with the IF logic, so go ahead |
|
Back to top |
|
|
vikramyadav
New User
Joined: 28 May 2005 Posts: 41 Location: Gurgaon
|
|
|
|
Thanks a lot for your help..........but if i would have spotted how to do it with IF then i wouldnt have been asking..... |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
in Your fifth post there is the IF logic
to get an abend You must execute a program
and existing one for a real abend
a non existing one to get a s806 abend
all these things have already been told You
please reread carefully the whole thread |
|
Back to top |
|
|
|