Boolean Conversion (B)

Top  Previous  Next

 

The boolean conversion code converts between the internal representation of false (0) and true (1) and the external representation Y or N.

 

The full format of this conversion code is

 

B

 

 

Used with OCONV() for output conversion, this conversion code returns N for false (zero or a null string) or Y for true (all other values).

 

Used with ICONV() for input conversion, this conversion code returns false (0) for a null string or a string containing the single character N in upper or lower case. It returns true (1) for a string containing the single character Y in upper or lower case. Any other input value returns the original data and sets an error status of 1.