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

Calling abend routine directly from JCL


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

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Tue Sep 16, 2008 2:55 pm
Reply with quote

I need to abend a job based on the return code from some of the previous steps. So how can I call an abend routine direclt from jcl by checking the return code from some previous steps.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Sep 16, 2008 3:01 pm
Reply with quote

COND= detailed in the JCL manual along with IF/THEN/ELSE
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Tue Sep 16, 2008 3:16 pm
Reply with quote

Quote:
I need to abend a job based on the return code

Just curious to know why do you need to abend a job when you can bypass particular step(s) in a job based on the return-code(s) from previous steps.

Thanks,
Arun
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Tue Sep 16, 2008 3:17 pm
Reply with quote

Hi,

Based on the return code of previous step, code a step to call a program that is not actually present in your library. It will cause S804 abend. I'm not sure that this is a standardized way of creating an abend.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Sep 16, 2008 3:26 pm
Reply with quote

arcvns wrote:
Quote:
I need to abend a job based on the return code

Just curious to know why do you need to abend a job when you can bypass particular step(s) in a job based on the return-code(s) from previous steps.

Thanks,
Arun

Unfortunately a basic practice employed at quite a few sites icon_sad.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Sep 16, 2008 3:47 pm
Reply with quote

S.Selvakumar,

S804 would only occur if a module was invoked.

you should have said S806
Back to top
View user's profile Send private message
Selva-kumar

New User


Joined: 01 Mar 2007
Posts: 52
Location: chennai

PostPosted: Tue Sep 16, 2008 4:10 pm
Reply with quote

Ya. It will be S806. Sorry and Thanks Dick
Back to top
View user's profile Send private message
pjnithin

Active User


Joined: 22 Dec 2005
Posts: 116

PostPosted: Tue Sep 16, 2008 4:15 pm
Reply with quote

expat wrote:
COND= detailed in the JCL manual along with IF/THEN/ELSE


hi expat...where can i see this manual....i searched in forum; but couldn't find any..
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Sep 16, 2008 4:36 pm
Reply with quote

there is this: publib.boulder.ibm.com/infocenter/zoslnctr/v1r7/topic/com.ibm.zcourses.doc/com.ibm.zcourses.jcl.doc/com.ibm.zcourses.introjcl.doc/index.htm?noframes=true

as well as this:

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/library

enter JCL hit enter and find the manual that corresponds to your systems JES type and version number.
Back to top
View user's profile Send private message
dneufarth

Active User


Joined: 27 Apr 2005
Posts: 419
Location: Inside the SPEW (Southwest Ohio, USA)

PostPosted: Wed Sep 17, 2008 5:35 am
Reply with quote

Many shops have an in house version of a program that calls the abend macro and displays a user code. Easy way to halt scheduled group of jobs.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Sep 17, 2008 5:40 am
Reply with quote

Quote:
where can i see this manual....i searched in forum; but couldn't find any..

It is at the very top of every page for this web site. It is white letters on gray background. Click on 'IBM Manuals'

Or you can look here: www-03.ibm.com/systems/z/os/zos/bkserv/r10pdf/
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Sep 17, 2008 6:54 am
Reply with quote

Hello,

Quote:
Many shops have an in house version of a program that calls the abend macro and displays a user code. Easy way to halt scheduled group of jobs.
This also provides for generating a User abend (Unnnn) rather than forcing some phony system abend (Snnn). The result is the same (an abend), but User abends are far more managable.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Sep 17, 2008 8:00 am
Reply with quote

Hi,

All the suggestions so far talk about a CALLable abend-routine, I was also using the same concept but now I got little curious - do we have any such utility/CALLable routine which can be executed right away in JCL instead of CALLing via a program written in some programming language.
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

 


Similar Topics
Topic Forum Replies
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Calling an Open C library function in... CICS 1
No new posts Call program, directly from panel CLIST & REXX 9
Search our Forums:

Back to Top