HP3000-L Archives

April 1998, Week 2

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:
"John D. Alleyn-Day" <[log in to unmask]>
Reply To:
Date:
Mon, 13 Apr 1998 15:41:31 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (40 lines)
At 02:49 PM 4/13/98 -0400, you wrote:
>Here's some fun. Under MPE 55 using COBOL II/iX HP31500A.04.16,
>compiling a program with the following inline perform, I get this
>Codegen error. Searching the LaserROM for 5705, it seems not to like the
>comparison, but I find no good solution for this.

<snip>.......

>
> 01044                D          PERFORM WITH TEST AFTER
> 01045                *              K-INDEX isn't used anywhere else,
>so I'll use it here.
> 01046                D              VARYING K-INDEX FROM 1 BY 1
> 01047                D              UNTIL K-INDEX = 10
> 01048                D                  OR C-C = ZERO
> 01049                D              CALL INTRINSIC "FCONTROL"
> 01050                D                  USING INPUT-FILE-NUMBER \4\
>DUMMY-WORD
> 01051                D              END-CALL
> 01052                D          END-PERFORM

I presume that you are using c-c as the special name for condition-code.
You have to be VERY careful when using this, because the condition code
gets changed as soon as something else is done, and you look like you are
doing "something else" with the "k-index = 10".  I would create another
variable and set it to zero when c-c is zero immediately after the
"fcontrol".  This avoids any problems with condition-code.  You could also
try:

until c-c = zero
  or k-index = 10

so that you check c-c a little close to the "fcontrol".

John D. Alleyn-Day
Alleyn-Day International
408-286-6421   408-286-6474 (Fax)
[log in to unmask]       http://www.Alleyn-Day.com
"The man that never made a mistake never made anything"

ATOM RSS1 RSS2