Skip to main content

Redefines mechanism

COBOL redefines are similar to choices and provide a set of alternatives.

In previous versions, you set expressions on each alternative to help the COBOL reader determine which alternative applies. With the latest implementation, the Reader tries each alternative in turn when expressions are removed.

The COBOL Reader starts with the first alternative. If it encounters an error, the Reader tries the next alternative until it finds an alternative that matches the data.

More than one alternative may match the data. In this case, the Reader picks the first one that appears. If you are unsatifisfied with the behaviour, you can set your own expressions.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!