OCONV Function

Performs English output conversions.

Syntax

OCONV(value, conversion)

Syntax Elements

value A DataBasic expression that evaluates to the value to be converted.

Note

The value to be converted cannot contain any system delimiters.

conversion A string containing one or more English conversion codes, separated by value marks. Multiple codes are processed left-to-right, each code acting on the result produced by the previous code.

See Also

OCONVS function, ICONV function, FMT function.

Examples

DOLLARS = OCONV("123400","MD2")

Assigns the string value 1234.00 to the variable DOLLARS.

PRICE = OCONV("3*179*7","G1*1")

Extracts 179 from the string and assigns it to PRICE.

A = "6240"
B = "D"
XDATE = OCONV(A,B)

Assigns the string value "30 Jan 1985" (the external date) to XDATE.

A = "6240"
B = "D":@VM:"MCU"
XDATE = OCONV(A,B)

Performs the same "D" conversion as in the previous example, but passes the result to the MCU conversion code, to force the date into upper case: ."30 JAN 1985".

A = "A31-1"
Y = OCONV(A,"TINV;X;3;3")
PRINT Y

Retrieves and prints the third attribute of item A31-1 in the INV file.