Using the USAGE option, you can choose different semantics for selected built-in functions.
.-+---+--------------------------. | '-,-' | V .-SIZE--------. | >>-USAGE--(----+-HEX--(--+-CURRENTSIZE-+--)-+-+--)------------->< | .-RESET---. | +-REGEX--(--+-NORESET-+--)---+ | .-IBM-. | +-ROUND--(--+-ANS-+--)-------+ | .-STRICT-. | +-SUBSTR--(--+-LOOSE--+--)---+ | .-IBM-. | '-UNSPEC--(--+-ANS-+--)------'
Under the HEX(CURRENTSIZE) suboption, when HEX is applied to a VARYING or VARYINGZ string, it will a return a hex string that represents the current amount of storage used by the string.
Under the REGEX (NORESET) suboption, if the locale needs to be changed to match the codepage argument, then the local value will not be saved and restored. It can be much better for performance, but it also means that if you have other code that depends on that original locale setting, then that code might not work as expected.
Under the ROUND(ANS) suboption, the ROUND built-in function is implemented as described in the PL/I Language Reference.
Under the SUBSTR(LOOSE) suboption, the same reference will return a string whose length is z.
The SUBSTR(LOOSE) suboption might be useful for those who have SUBSTR(x,y,z) references where x is a CHAR(1) BASED variable.
If STRINGRANGE is enabled, then under either setting of this option, STRINGRANGE will be raised when z > MAXLENGTH(x).
Under the UNSPEC(ANS) suboption, UNSPEC can be applied to structures, and when applied to a structure or an array, UNSPEC returns a single bit string.
Default: USAGE( HEX(SIZE) REGEX(RESET) ROUND(IBM) SUBSTR(STRICT) UNSPEC(IBM) )