What is happening in this " PIC" and without the "PIC"?

Chris Sharman Chris.Sharman@ccagroup.co.uk
Mon, 3 Apr 2000 09:17:38 +0100


> DEFINE ACTUALGRM NUM*4 = ROUND ((ADJPRICE / AGI) * 100)
> SORT ON GRM
> REP SALEAPN ADJPRICE AGI GRM ACTUALGRM ACTUALGRM PIC "^^.^^"

>  Parcel Number   Adjusted Price  Annual Gross  G.R.M.  ACTUALGRM  ACTUALGRM
>                                     Income
>
>   0089372250            760,000        2,389    3.18     31812      #####
>   0113490070            820,400       63,760   12.86      1287      12.87

I think you've got your decimal places and/or scaling tangled.

I don't know how the G.R.M. figure is obtained, but it's inconsistent between
the two reported parcels.

760,000 is 318.12 times 2,389 - that's 31,812 % of it.
820,400 is 12.86 times 63,760 - that's 1,286 %.

The ACTUALGRM calculation appears to be adjusted either to be a percentage, or
to take account of some scaling - I think there must be some scaling in either
ADJPRICE or AGI - try 'output scale 0' to see what's really stored, but you
obviously need to display ACTUALGRM with either PIC "^^^.^^" or PIC "^^,^^^%".
You may even need to accomodate bigger numbers, if the factor ever goes over
1000.

Chris
_______________________________________________________________________
Chris.Sharman@CCAgroup.co.uk		http://www.ccastat.demon.co.uk/
CCA Stationery Ltd, Eastway, Fulwood, Preston, Lancashire, PR2 9WS.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Subscribe: "subscribe powerh-l" in message body to majordomo@lists.swau.edu
Unsubscribe: "unsubscribe powerh-l" in message to majordomo@lists.swau.edu
This list is closed, thus to post to the list, you must be a subscriber.