What is happening in this " PIC" and without the "PIC"?
Robert J.M. Edis
robert.edis@creatcomp.com
Sun, 2 Apr 2000 11:18:37 -0400
G'day Valerie
Have you tried using 'OUTPUT SCALE 2' when displaying the field?
Blue
-----Original Message-----
From: Scott, Valerie
To: powerh-l@lists.swau.edu
Sent: 3/31/00 6:15 PM
Subject: What is happening in this " PIC" and without the "PIC"?
We have a item def as num*4, it is the receiver of the result of a
computation, and then should be displayed as a percent of that result.
we have tested it several ways as you will see below, but we are baffled
by
the results:
-The resultant value in our example is larger than the defined size of
the
item
-If we do not specify a pic in the Report statement, it will display the
value although because of no formatting, there is no way for the
audience to
know it is a percent
-if we use a pic, then we get an overflow error
How can we display the value properly as "3.18"?
Thank you,
Valerie Scott
>SET DIC DD011101.DOC.SCIPS
> ACC B41301-COMMINDST
> SET REP LIMIT 1000
> DEFINE ACTUALGRM NUM*4 = ROUND ((ADJPRICE / AGI) * 100)
> SORT ON GRM
> REP SALEAPN ADJPRICE AGI GRM ACTUALGRM ACTUALGRM PIC "^^.^^"
> SEL IF ACTUALGRM > 9999
> GO
00/03/31 PAGE 1
Parcel Number Adjusted Price Annual Gross G.R.M. ACTUALGRM
ACTUALGRM
Income
0089372250 760,000 2,389 3.18 31812
#####
Records selected: 1
Records sorted: 1
Lines printed: 4
Pages printed: 1
>SEL IF SALEAPN = "0113490070"
> GO
00/03/31 PAGE 1
Parcel Number Adjusted Price Annual Gross G.R.M. ACTUALGRM
ACTUALGRM
Income
0113490070 820,400 63,760 12.86 1287
12.87
Records selected: 1
Records sorted: 1
Lines printed: 4
Pages printed: 1
> ACC *SDUPCOMM
> SHOW ITE
INPUT OUTPUT
SDUPCOMM TYPE SCALE SCALE DEC PICTURE
IDSALE CHAR X(4)
IDCHNGSAL CHAR X(4)
DATECHNGSAL DATE YYYY/MM/DD
SALEUSE NUM 0 0 0 ^^^^
LOCATION CHAR X(30)
SALERMRK1 CHAR X(30)
SALERMRK2 CHAR X(30)
SALERMRK3 CHAR X(30)
SALEREF CHAR X(12)
NPISP NUM 0 0 0 ^^^^
RAWPRICE NUM 0 0 0
^^^,^^^,^^^,^^^
ADJPRICE NUM 0 0 0
^^^,^^^,^^^,^^^
SPSQBL NUM 0 0 0 ^,^^^.^^
PROJECT CHAR X(30)
AREAFRST NUM 0 0 0 ^^^,^^^
AREASCND NUM 0 0 0 ^^^,^^^
AREATHRD NUM 0 0 0 ^^^,^^^
AREAOTHR NUM 0 0 0 ^^^,^^^
AREABLDG NUM 0 0 0 ^^,^^^,^^^
CONDITION CHAR X(2)
YEARBLT NUM 0 0 0 ^^^^
AGI NUM 0 0 0 ^^,^^^,^^^
RENTAL NUM 0 0 0 ^^.^^
GRM NUM 0 0 0 ^^.^^
SALEBOOK CHAR X(4)
SALEAPN CHAR X(10)
DATESALE DATE MM/DD/YYYY
ACTUALGRM NUM 0 0 0 ^^.^^
> SEL IF ACTUALGRM > 9999
> REP SALEAPN ADJPRICE AGI GRM ACTUALGRM
> GO
00/03/31 Solano County Integrated Property System
PAGE
1
Parcel Number Adjusted Price Annual Gross G.R.M. ACTUALGRM
Income
0089372250 760,000 2,389 3.18 #####
Records selected: 1
Lines printed: 4
Pages printed: 1
>REP SALEAPN ADJPRICE AGI GRM ACTUALGRM ACTUALGRM PIC "^^^.^^" &
> ACTUALGRM PIC "^^.^^"
> GO
00/03/31
PAGE 1
Parcel Number Adjusted Price Annual Gross G.R.M. ACTUALGRM
ACTUALGRM
Income
ACTUALGRM
0089372250 760,000 2,389 3.18 #####
318.12
#####
Records selected: 1
Lines printed: 6
Pages printed: 1
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
= =
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.
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
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.