View previous topic :: View next topic
|
Author |
Message |
Baby Priya
New User
Joined: 06 Aug 2008 Posts: 3 Location: Bangalore
|
|
|
|
Hi
My program uses a comp variable as given:
03 A PIC S9(10) COMP.
I have initialized A to zero.In the program,I am incrementing A by just adding 1 as
ADD +1 to A.
When I execute the program I am getting S0C 9 abend at this statement.While checking in abend-aid, A contains the value -412152206158925504.
Please let me know how to resolve this.
Thanks,
Priya |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How is this related to jcl?
Is this a cobol program? If it is, suggest you put visable footprints on both sides of this field and look in the dump for the footprints. You might also define a s9(11) comp-3 variable, initialize it to zero also, and every time you add 1 to the comp field, add 1 to toeh comp-3 field.
I believe the posted value should not occur if you start at zero and add 1. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I don't think you can get a "fixed-point-divide exception" by adding 1 to a binary number. Check your coding and Abend-Aid report again. Post your exact field names and procedure division statements and the relevant parts of the Abend-Aid report. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
I've the below description for S0C9 which no where belongs to what you tell, are you hiding something?
Quote: |
System ABEND: S0C9
Description: This ABEND is caused by a fixed-point divide exception. A quotient has exceeded the register size in a DIVIDE instruction, or the result of a CONVERT TO BINARY instruction is more than 31 bits long.
(Reason Code 9)
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. |
|
|
Back to top |
|
|
|