Focal Point
[SOLVED] Converting alpha to packed-decmal

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/4497067895

February 15, 2011, 12:16 PM
Miral
[SOLVED] Converting alpha to packed-decmal
How to convert A10V to P17.2 ?

----------------------------------------
FROM
FIELDNAME=VVR05, ALIAS=VVR05, USAGE=A10V, ACTUAL=A10BV,
TO
FIELDNAME=CE15611_VVR05, ALIAS=VVR05, USAGE=P17.2, ACTUAL=P8
----------------------------------------

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6
Windows, All Outputs
February 15, 2011, 03:57 PM
<FreSte>
Assuming all characters in A10V-field are non-alphanumeric

DEFINE FILE CAR
  AAA1/A10V WITH COUNTRY = '123.56';
  AAA2/P17.2 = EDIT(AAA1);
END

TABLE FILE CAR
  PRINT 
    AAA1
    AAA2
    COMPUTE AAA3/P17.2 = AAA2 * 3;
END

February 15, 2011, 04:03 PM
Waz
Can't you just change the usage format ?

FIELDNAME=VVR05, ALIAS=VVR05, USAGE=P17.2, ACTUAL=A10BV


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

February 15, 2011, 05:14 PM
j.gross
You can use ATODBL().
February 21, 2011, 04:36 AM
Miral
Thanks master, now it works.
There was a format problem with . and , to replace. Then could i use ATODBL()


WebFOCUS 7.6
Windows, All Outputs