Range Check Conversion (R) |
![]() ![]() ![]() |
The R conversion code checks whether a numeric value is within a specified range.
The full format of this conversion code is
Rn,m{;n,m...}
where
The R conversion code tests whether the input data is an integer value in the range n to m. If the value is within the specified range, the conversion returns the input data. If the value is outside the range, a null string is returned.
If more than one n,m pair is provided, the input value is tested against each in turn.
A null input value always returns a null result regardless of the values of n and m.
A non-numeric data item will return the original data. The STATUS() function would then return 1 to indicate an error.
Examples
|