HP3000-L Archives

October 1998, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Ted Ashton <[log in to unmask]>
Reply To:
Ted Ashton <[log in to unmask]>
Date:
Tue, 27 Oct 1998 23:19:31 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
<*shudder*>

I'm obviously too new to this COBOL stuff.  I've got a table which is defined
as (in part):

01  PRORATED-ITEMS-LIST.
    03  PRORATED-ITEM OCCURS 200 INDEXED BY PRO-INDEX, PRO-MAX.
        .
        .
        .
        05  PRESENT             PIC S9(5)V99 COMP SYNC.

I also have:

    03  TOTAL-PRESENT-PRO    PIC -(5)9.99.

and in the code I did a

COMPUTE TOTAL-PRESENT-PRO = FUNCTION SUM(PRESENT(ALL)).

After all, it's what the manual said I could.  So now, for example, I have the
following numbers in the table:

  43.87
  79.52
 216.00
  37.50
1182.50
-443.50
-645.00

and in TOTAL-PRESENT-PRO, I get:

 470.88

Could someone spare a moment to explain to me what's going on here?  I thought
COBOL was "the language which wouldn't lose pennies" !

Ted
--
Ted Ashton ([log in to unmask]), Info Serv, Southern Adventist University
          ==========================================================
The imaginary number is a fine and wonderful recourse of the divine spirit,
almost an amphibian between being and not being.
                        -- Leibniz, Gottfried Whilhem (1646-1716)

ATOM RSS1 RSS2