Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Job should abend if a step returns RC=0012
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
vikramyadav

New User


Joined: 28 May 2005
Posts: 41
Location: Gurgaon

PostPosted: Wed Feb 04, 2009 11:10 am    Post subject: hi gcicchet
Reply with quote

//JS010 EXEC PGM=IEBGENER
//JS020 EXEC PGM=IEBGENER
//JS030 EXEC for FTP
//JS035 EXEC for FTP
//JS040 EXEC PGM=IEBGENER
//JS050 EXEC PGM=SORT
//JS060 EXEC PGM=SORT

The job steps are as above. The rest(all except JS)030 & JS035) of the steps will just perform normally i.e. abend if a RC=12 is issued but the FTP steps will just set the RC to 12 incase of an unsuccessful FTP but will not abend, so in effect the continuing steps will also execute. So i need to add an additional step after JS030 that will check for JS030.RC=12 & abend if it is true, so that the continuing steps will not execute. Similarly for JS035.
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Feb 04, 2009 11:24 am    Post subject:
Reply with quote

Hi,

I think you are missing the point, abending a STEP is not the only way to flush subsequent steps,
Quote:
As repeatedly suggested in the above thread, it IS possible to prevent the execution of subsequent steps by the proper usage of the COND parameter


Please test some of the suggestions

Gerry
Back to top
View user's profile Send private message
km_abdullah

New User


Joined: 03 Nov 2008
Posts: 60

PostPosted: Wed Feb 04, 2009 11:28 am    Post subject:
Reply with quote

It seems that you are stressing only your point but not paying heed to the suggestion provided in the tread. Are you not able to understand that the solution is already given to you but you have not tried?

Quote:
, so in effect the continuing steps will also execute.


Only to avoid this, COND solution is provided.

Quote:
So i need to add an additional step after JS030 that will check for JS030.RC=12


It is better that you read the JCL manual about the COND parameter. You don’t need a additional step to do this.
Back to top
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Feb 04, 2009 11:28 am    Post subject:
Reply with quote

Hello,

You continue to add on to the jobstream. . . But this should not natter - if you set up the jcl correctly.

By proper checking of return-codes you can run all, some, or no more steps depending on the setting of the rc by some previous step(s).

If you set up your jcl similar to the way i posted earlier, you should be able to handle your requirement rather straightforward. Suggest you start with 2 or 3 steps and show yourself how adding the COND= to the executes accomplishes what you want. As you become more familiar with this, it will go very quickly.

If something seems troubling, post what has happened and someoneo will be able to help.
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 11:31 am    Post subject: hi gcicchet
Reply with quote

For JS010 & JS020 i dont want to handle anything.

For JS030 & JS035 i want to abend if these issue RC=12 and as you say "flush" the rest of the steps if it abends.
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 11:57 am    Post subject:
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    Post subject: Hi Dick & Shashank
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    Post subject:
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    Post subject:
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: 8784
Location: Welsh Wales

PostPosted: Wed Feb 04, 2009 12:54 pm    Post subject:
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    Post subject: Hi Expat
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: 8784
Location: Welsh Wales

PostPosted: Wed Feb 04, 2009 2:56 pm    Post subject:
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

Senior Member


Joined: 14 Mar 2007
Posts: 10609
Location: italy

PostPosted: Wed Feb 04, 2009 2:57 pm    Post subject: Reply to: Job should abend if a step returns RC=0012
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    Post subject: Hi Expat
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

Senior Member


Joined: 14 Mar 2007
Posts: 10609
Location: italy

PostPosted: Wed Feb 04, 2009 4:09 pm    Post subject: Reply to: Job should abend if a step returns RC=0012
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    Post subject: Hi Enrico
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

Senior Member


Joined: 14 Mar 2007
Posts: 10609
Location: italy

PostPosted: Wed Feb 04, 2009 4:15 pm    Post subject: Reply to: Job should abend if a step returns RC=0012
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Having problem passing a variable to ... markzasz JCL & VSAM 12 Thu Jul 11, 2019 5:31 pm
No new posts S0C7 abend while running a Cobol Program amitc23 COBOL Programming 2 Tue May 07, 2019 4:06 pm
No new posts Any single step solution possible? Rohit Umarjikar SYNCSORT 7 Mon Apr 22, 2019 6:18 am
No new posts Additional PCB denied abend prasun007 IMS DB/DC 1 Tue Feb 26, 2019 2:46 am
No new posts Single step to take backup of multipl... Vignesh Sid JCL & VSAM 1 Thu Nov 29, 2018 8:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us