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

Job should abend if a step returns RC=0012


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Shashank.kapoor

New User


Joined: 14 Jan 2009
Posts: 24
Location: Mumbai

PostPosted: Wed Feb 04, 2009 11:57 am
Reply with quote

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
View user's profile Send private message
vikramyadav

New User


Joined: 28 May 2005
Posts: 41
Location: Gurgaon

PostPosted: Wed Feb 04, 2009 12:00 pm
Reply with quote

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
View user's profile Send private message
Shashank.kapoor

New User


Joined: 14 Jan 2009
Posts: 24
Location: Mumbai

PostPosted: Wed Feb 04, 2009 12:26 pm
Reply with quote

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
View user's profile Send private message
vikramyadav

New User


Joined: 28 May 2005
Posts: 41
Location: Gurgaon

PostPosted: Wed Feb 04, 2009 12:37 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Feb 04, 2009 12:54 pm
Reply with quote

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
View user's profile Send private message
vikramyadav

New User


Joined: 28 May 2005
Posts: 41
Location: Gurgaon

PostPosted: Wed Feb 04, 2009 2:17 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Feb 04, 2009 2:56 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 04, 2009 2:57 pm
Reply with quote

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
View user's profile Send private message
vikramyadav

New User


Joined: 28 May 2005
Posts: 41
Location: Gurgaon

PostPosted: Wed Feb 04, 2009 3:51 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 04, 2009 4:09 pm
Reply with quote

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 icon_cool.gif
Back to top
View user's profile Send private message
vikramyadav

New User


Joined: 28 May 2005
Posts: 41
Location: Gurgaon

PostPosted: Wed Feb 04, 2009 4:11 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Feb 04, 2009 4:15 pm
Reply with quote

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
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 Goto page Previous  1, 2

 


Similar Topics
Topic Forum Replies
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts convert file from VB to FB and use tr... DFSORT/ICETOOL 8
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
Search our Forums:

Back to Top