HP3000-L Archives

September 2000, Week 1

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:
Mark Boyd <[log in to unmask]>
Reply To:
Mark Boyd <[log in to unmask]>
Date:
Fri, 1 Sep 2000 11:20:38 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (42 lines)
Well it worked, it strikes me as odd, but it worked.  Thanks.
But that begs the question, how many programs do we have merrily bouncing
around to the wrong statements because of this?

-----Original Message-----
From: Duane Percox [mailto:[log in to unmask]]
Sent: Friday, September 01, 2000 10:58 AM
To: [log in to unmask]
Subject: Re: [HP3000-L] Cobol, IF on size error question

Mark - any scope terminator terminates scope to the
most previous initiation of the scope in question.

So, if inside a compute/end-compute don't use another
compute within your on-size-error.

Change

            COMPUTE WS-WEIGHT-PCT =
 +4                (WS-ITEM-WEIGHT * 100) / WS-LEVEL-WEIGHT
 +5         ON SIZE ERROR
 +6            COMPUTE WS-WEIGHT-PCT = 0
 +7         END-COMPUTE
 +8         COMPUTE WS-PNH =
 +9                 FOB-AMT(1) * WS-WEIGHT-PCT / 100
 10         END-COMPUTE

to
            COMPUTE WS-WEIGHT-PCT =
 +4                (WS-ITEM-WEIGHT * 100) / WS-LEVEL-WEIGHT
 +5         ON SIZE ERROR
 +6            MOVE ZERO TO WS-WEIGHT-PCT
 +7         END-COMPUTE
 +8         COMPUTE WS-PNH =
 +9                 FOB-AMT(1) * WS-WEIGHT-PCT / 100
 10         END-COMPUTE

Duane Percox    wk: 650.372.0200x608  fax: 650.372.3386
[log in to unmask]
www.qss.com
qwebs.qss.com

ATOM RSS1 RSS2