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

How to solve S0CB Abend


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kcs4u2004

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Tue Jun 16, 2009 6:42 pm
Reply with quote

I'm executing a program which gives a SOCB error, showing divisor is zero, but I'm not able to know what is that variable (divisor). Can you suggest how to get the variable name? I followed the spool and the dump, but don't know how to determine it.
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Tue Jun 16, 2009 7:21 pm
Reply with quote

Quote:

System ABEND: S0CB

Description: This ABEND is caused by a decimal divide exception. A
quotient exceeds the specified data field size.

User Action: Dividing by zero is the most common cause of this ABEND.
Correct the program logic error that caused the divide
exception and resubmit the job.
(Reason Code B)



Use internet effectively to get your answers.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Jun 16, 2009 7:25 pm
Reply with quote

the TS was perfectly able to determine and interpret the abend,
what he wants to know is how to find the culprit...

why not post the part of the jes log related to the abend ??
Back to top
View user's profile Send private message
kcs4u2004

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Tue Jun 16, 2009 7:27 pm
Reply with quote

The program which I m running is called from online screen,when i m submitting a report from online screen it gets executed at background,for all other prposals its working,only for a particular thing its showing divisor is zero error,how to get that varibale .
please tell me how i can know which is being zero in the program.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jun 16, 2009 7:31 pm
Reply with quote

arvind.m

The OP is asking how to resolve the error of a zero divisor, and not what the problem is. The OP has already established that part
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Jun 16, 2009 7:33 pm
Reply with quote

still not providing enough info
explaining the process will not help


when You get a flat tire and You have to change it,
it does not make any difference if You are traveling
from Paris to Brussels or from Vienna to Saltzburg
Back to top
View user's profile Send private message
arvind.m

Active User


Joined: 28 Aug 2008
Posts: 205
Location: Hyderabad

PostPosted: Tue Jun 16, 2009 7:36 pm
Reply with quote

Make use of DISPLAY and debug the code.
Back to top
View user's profile Send private message
kcs4u2004

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Tue Jun 16, 2009 7:40 pm
Reply with quote

The system detected a decimal-divide exception (System Completion Code =0CB).
From compile unit OSBUB830 at entry point (pgm name) at compile unit offset +00007B38 at entry offset +00007B38
at address 0000F4B8


I m getting like this,from this how I will get the varible which is the divisor being zero
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Jun 16, 2009 7:45 pm
Reply with quote

Quote:
From compile unit OSBUB830 at entry point (pgm name) at compile unit offset +00007B38 at entry offset +00007B38


look at the compilation and linkage editor listing to find to which line of Your program
the offset refer
at this point knowing the line You should be able to guess the variable and put some displays to find the why

for the details on how to proceed the best thing would be to ask Your support or one of Your peers
Back to top
View user's profile Send private message
kcs4u2004

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Tue Jun 16, 2009 7:57 pm
Reply with quote

knowing the offset hot to get the line number,if i will get the line number i can say easily which is becoming zero
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Jun 16, 2009 8:06 pm
Reply with quote

in the compile listing, if the compile options have been properly specified
You should have something along ...
<compile unit name>
line_number x offset mmmmm
...
line number y offset nnnnnnnn

the offset tells where the machine instructions related to that line start
Back to top
View user's profile Send private message
kcs4u2004

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Tue Jun 16, 2009 8:43 pm
Reply with quote

A decimal-divide exception, S0CB, occurred during execution of program X.


*******************************************
* Analysis of Error *
*******************************************


A Decimal Divide Exception was caused by data referenced at displacement
067 from the start of BLW cell 00 (X'0000'). The field contains
X'F0F0F0F0F0F0F0'. Refer to the data division map in the program
listing to locate the field name.
The field causing the exception is located in a temporary work field in
the TGT. The actual field in error is in Working-Storage of program
X.

------------------------------------------------------------------------

A decimal divide exception is caused when the divisor is zero.


*******************************************
* Error Location *
*******************************************
The next sequential instruction to be executed in program X was
at displacement 00008254.


with this information can you please tell me the line number or anything related to program to find that(i.e how to map into the program with this information)
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Jun 16, 2009 8:55 pm
Reply with quote

how in <heaven> am I supposed to tell the line number

look at the compile listing , I already suggested how to proceed,
time for You to start earning Your salary
Back to top
View user's profile Send private message
kcs4u2004

New User


Joined: 21 Apr 2008
Posts: 56
Location: Chennai

PostPosted: Wed Jun 17, 2009 2:13 pm
Reply with quote

Thanks Enrico and all.I found out the variable which is getting a zero value..
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 -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts Call an hlasm from REXX in batch and ... CLIST & REXX 4
No new posts What is the most complex abend you've... Mainframe Interview Questions 8
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
Search our Forums:

Back to Top