How to: |
Available Languages: reporting, Maintain
The ATODBL function converts a number in alphanumeric format to decimal (double-precision) format.
ATODBL(string, length, outfield)
where:
Alphanumeric
Is the alphanumeric string to be converted, or a field or variable that contains the string.
Alphanumeric
Is the two-character length of infield in bytes. This can be a numeric constant, or a field or variable that contains the value. If you specify a numeric constant, enclose it in single quotation marks. The maximum value is 15.
Double precision floating-point
Is the name of the field that contains the result, or the format of the output value enclosed in single quotation marks.
ATODBL converts the EMP_ID field into double-precision format and stores the result in D_EMP_ID:
TABLE FILE EMPLOYEE
PRINT LAST_NAME AND FIRST_NAME AND
EMP_ID AND
COMPUTE D_EMP_ID/D12.2 = ATODBL(EMP_ID, '09', D_EMP_ID);
WHERE DEPARTMENT EQ 'MIS';
END
The output is:
LAST_NAME | FIRST_NAME | EMP_ID | D_EMP_ID |
SMITH JONES MCCOY BLACKWOOD GREENSPAN CROSS | MARY DIANE JOHN ROSEMARIE MARY BARBARA | 112847612 117593129 219984371 326179357 543729165 818692173 | 112,847,612.00 117,593,129.00 219,984,371.00 326,179,357.00 543,729,165.00 818,692,173.00 |
WebFOCUS |