ONCODE

The ONCODE built-in function provides a fixed-point binary value that depends on the cause of the last condition.

ONCODE can be used to distinguish between the various circumstances that raise a particular condition—for instance, the ERROR condition. For codes corresponding to the conditions and errors detected, refer to the specific condition.

ONCODE returns a real fixed-point binary value that is the condition code. It is in context in any ON-unit or its dynamic descendant. All condition codes are defined in Messages and Codes.

Read syntax diagramSkip visual syntax diagramONCODE()

If ONCODE is used out of context, zero is returned.