RPG (IBM i / AS/400) · File status code

Status Code 00102

What does Status Code 00102 mean in RPG (IBM i / AS/400)?

A DIV, MVR, or arithmetic expression tried to divide a value by a field or literal that evaluated to zero at run time.

Status Code 00102IBM i / OS/400 · ILE RPG

Condition

A DIV, MVR, or arithmetic expression tried to divide a value by a field or literal that evaluated to zero at run time.

Fix

Guard the divisor with an IF or %EQ(0) check before dividing, or wrap the operation with the (E) extender or a MONITOR block and supply a sensible default when the divisor is zero.

Related file status code