NCONVERT Output

John Pearce jlpearce at adelphia.net
Fri Dec 2 18:22:57 CST 2005


At 08:08 AM 12/2/2005, John Stires wrote:
>One of my coworkers has been rather perplexed with NCONVERT.  He is 
>attempting to convert a number with a decimal component.  Instead of 
>getting a numeric with the decimal component still intact, he is getting 
>in integer number.  He has tried using NUM and FLOAT for the receiving 
>defined field.  Both with the same results.
>

It would be helpful to see the NCONVERT construct.  I've used it in PH 8.39 
on HP, typically in a define something like this:

         DEFINE D-AMOUNT CHAR*12 = NCONVERT(AMOUNT /100, 
"#,###,###.##","-####,###.##")

Dividing AMOUNT by 100 is necessary on the HP due to the numbers being 
stored as integers.  If your storage format includes the decimal value, you 
don't need to do the division.

John

------------------------------------------------------------------
John Pearce  <jlpearce at adelphia.net>
Colorado Springs, CO  USA 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sowder.com/pipermail/powerh-l/attachments/20051202/fbe4475c/attachment.htm


More information about the powerh-l mailing list