Focal Point
[SOLVED] Converting alpha to numeric packed

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

February 22, 2011, 09:23 AM
philippe@Nantes
[SOLVED] Converting alpha to numeric packed
Hello, i'm just loast.
I just want to convert an A5 format field to a P7.2 format field ?
I just don't remember how to do?
Thank's for your help

This message has been edited. Last edited by: philippe@Nantes,


WebFocus thru Dev Studio version 7.6.11
Dev Studio on Windows Xp, Webfocus Client on UNIX basing on TOMCAT and DB2,
Reporting Server on MVS , USS and on UNIX
February 22, 2011, 11:27 AM
GCohen
You need to first convert the Alpha to Double with the ATODBL function, then directly change numeric format P = D ;



DNUM/D9=ATODBL(ANUM,'8','D9');
PNUM/P10.1=DNUM;


Release 7.6.9
Windows
HTML
February 22, 2011, 04:15 PM
Waz
There have been similar questions recently in the forum. They have more examples.


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!