Why am I getting a Divide by zero error?

Document ID : KB000014907
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

Upgrade difference from Easytrieve 6.4 or Easytrieve r11.x-c compatibility mode, to easytrieve r11.x. 

Question:

Why is Easytrieve r11.6 abending, on a Divide by Zero?

Environment:
Running an Easytrieve r11.6 program
Answer:

S0CB or S0C9 abend is caused by a 'divide by zero' condition. 

A divide by 0 should have never been allowed, but release 6.4 did not 

abend as it should have done. From release 11.0 and upwards the 

checking is much stricter, and has tightened up on a lot of coding 

errors that previously worked but should not have done. 

 

 

Additional Information:

Adding in a check for "dividing" field being greater than zero prevents abend.