Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Migration Guide

Conditions raised when disabled

Under the old compiler, if a condition such as CONVERSION or SUBSCRIPTRANGE was disabled, the condition would almost never be raised.

Under the new compiler, disabling a condition asserts that the condition will not occur. However, the condition may still be raised.

For some code sequences, this allows the compiler to generate faster code. For example, for an assignment of a CHAR(1) to a FIXED BIN, if CONVERSION is enabled, the conversion will be done by a library call. But if CONVERSION is disabled, the conversion will be done by very simple inline code that "ands out" the left nibble in the CHAR(1) value. This code is possible only because NOCONVERSION asserts that a conversion condition could not occur in this statement. If this assertion is not true, your program is invalid.

However, for an assignment of a CHAR(2) to a FIXED BIN, the conversion will always be done by a library call (because there are too many possibilities for what may be held in those two characters), and even if NOCONVERSION is in effect, the CONVERSION condition will be raised if the source does not contain a valid numeric value. (Note also that if you know that the CHAR(2) source contains only numeric digits, you could avoid this library call by using an appropriate picture string in either the EDIT built-in function or in a variable declared as based on or unioned with the source.)

Similarly, if SUBSCRIPTRANGE is disabled, you are asserting that all subscripts are valid. For most statements, this means the compiler will not generate any code to check the validity of the subscripts, and if any subscripts are invalid, your program is in error. However, if a subscripted reference is used in a PUT DATA statement, a library routine will evaluate that reference, and if any subscript is invalid, the SUBSCRIPTRANGE condition will be raised - even if disabled.


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)