Converting numbers to alphanumeric strings using a Built-In function
|Product/Release:||LANSA - All Platforms|
|Abstract:||Sometimes negative numbers do not convert successfully to alphanumeric strings. There is a Builtin function available that will solve this.|
|Submitted By:||LANSA Technical Support|
The SUBSTRING command can be used to convert numbers to alphanumeric strings. If the numeric value is negative, however, problems may be encountered. The minus sign (-) will not be converted by the SUBSTRING command.
There is a builtin function available in LANSA that solves this problem. The function, called NUMERIC_STRING, ensures that the minus sign is also used in the conversion.
Here is an example :
USE BUILTIN(NUMERIC_STRING) WITH ARGS(#SALARY) TO_GET(#SALCHAR)