USAGE

Using the USAGE option, you can choose different semantics for selected built-in functions.

Read syntax diagramSkip visual syntax diagram
             .-+---+--------------------------.      
             | '-,-'                          |      
             V           .-SIZE--------.      |      
>>-USAGE--(----+-HEX--(--+-CURRENTSIZE-+--)-+-+--)-------------><
               |           .-IBM-.          |        
               +-ROUND--(--+-ANS-+--)-------+        
               |            .-STRICT-.      |        
               +-SUBSTR--(--+-LOOSE--+--)---+        
               |            .-IBM-.         |        
               '-UNSPEC--(--+-ANS-+--)------'        

HEX( SIZE | CURRENTSIZE )
Under the HEX(SIZE) suboption, when HEX is applied to a VARYING or VARYINGZ string, it will a return a hex string that represents the maximum amount of storage used by the string.

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.

ROUND( IBM | ANS )
Under the ROUND(IBM) suboption, the second argument to the ROUND built-in function is ignored if the first argument has the FLOAT attribute.

Under the ROUND(ANS) suboption, the ROUND built-in function is implemented as described in the PL/I Language Reference.

SUBSTR( STRICT | LOOSE )
Under the SUBSTR(STRICT) suboption, if x has CHARACTER type, a SUBSTR(x,y,z) built-in function reference will return a string whose length is equal to MIN( z, MAXLENGTH(x) ).

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.

UNSPEC( IBM | ANS )
Under the UNSPEC(IBM) suboption, UNSPEC cannot be applied to a structure, and if applied to an array, returns an array of bit strings.

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) ROUND(IBM) SUBSTR(STRICT) UNSPEC(IBM) )