| Author |
small value problem
|
|
| Szymon 2007-09-25, 7:55 am |
| Hi,
I keep on trying to compile this part of a program:
000121 WORKING-STORAGE SECTION.
000122 01 NUMBER_1 PIC 9(2) VALUE 23.06.
000123 01 NUMBER_2 PIC 9(2) VALUE 543.07.
and still get the same error about the second and third line:
NUMERIC LITERAL OF VALUE CLAUSE IS SPECIFIED FOR VALUE WHICH IS
TRUNCATED TO EXCEPT ZERO. FIGURATIVE CONSTANT 'ZERO' ASSUMED SPECIFIED.
| |
| HeyBub 2007-09-25, 7:55 am |
| Szymon wrote:
> Hi,
> I keep on trying to compile this part of a program:
>
>
> 000121 WORKING-STORAGE SECTION.
> 000122 01 NUMBER_1 PIC 9(2) VALUE 23.06.
> 000123 01 NUMBER_2 PIC 9(2) VALUE 543.07.
>
>
>
> and still get the same error about the second and third line:
>
> NUMERIC LITERAL OF VALUE CLAUSE IS SPECIFIED FOR VALUE WHICH IS
> TRUNCATED TO EXCEPT ZERO. FIGURATIVE CONSTANT 'ZERO' ASSUMED
> SPECIFIED.
You can't fit 543+ pounds of stuff in a 99-pound bag.
Think: PIC 9(3)V9(2).
| |
| Doug Miller 2007-09-25, 7:55 am |
| In article <fdarcu$533$1@inews.gazeta.pl>, Szymon <alpha@skynet.org.pl_WITHOUT> wrote:
>Hi,
>I keep on trying to compile this part of a program:
>
>
>000121 WORKING-STORAGE SECTION.
>000122 01 NUMBER_1 PIC 9(2) VALUE 23.06.
>000123 01 NUMBER_2 PIC 9(2) VALUE 543.07.
You need to review the description of the PICTURE clause in your
textbook. You appear to be under the impression that PIC 9(2) describes a
numeric item with two decimal places. It does not.
--
Regards,
Doug Miller (alphag at milmac dot com)
It's time to throw all their damned tea in the harbor again.
| |
|
| In article <fdarcu$533$1@inews.gazeta.pl>,
Szymon <alpha@skynet.org.pl_WITHOUT> wrote:
>Hi,
>I keep on trying to compile this part of a program:
Please do your own homework.
DD
| |
| donald tees 2007-09-25, 7:55 am |
| Szymon wrote:
> Hi,
> I keep on trying to compile this part of a program:
>
>
> 000121 WORKING-STORAGE SECTION.
> 000122 01 NUMBER_1 PIC 9(2) VALUE 23.06.
> 000123 01 NUMBER_2 PIC 9(2) VALUE 543.07.
>
>
>
> and still get the same error about the second and third line:
>
> NUMERIC LITERAL OF VALUE CLAUSE IS SPECIFIED FOR VALUE WHICH IS
> TRUNCATED TO EXCEPT ZERO. FIGURATIVE CONSTANT 'ZERO' ASSUMED SPECIFIED.
You have defined them as two digit integers, and then given a fractional
value in one case, and a three digit fractional value in the second.
Donald
|
|
|
|