Greg,
I tried your example and the compiler gives the same error. As a
workaround you could do the following. The compile doesn't seem to like
to compare CONDITION-CODE in a perform loop. This version will compile
ok and does the same thing, but a little slower.
John Zoltak
North American Mfg Co
77 C-C-RESULT PIC S9(4) COMP.
PERFORM WITH TEST AFTER
VARYING K-INDEX FROM 1 BY 1
UNTIL K-INDEX = 10
OR C-C-RESULT = ZERO
CALL INTRINSIC "FCONTROL"
USING INPUT-FILE-NUMBER \4\ DUMMY-WORD
END-CALL
IF C-C = ZERO
MOVE ZERO TO C-C-RESULT
ELSE
MOVE 1 TO C-C-RESULT
END-IF
END-PERFORM
> -----Original Message-----
> From: Stigers, Greg ~ AND [SMTP:[log in to unmask]]
> Sent: Monday, April 13, 1998 2:49 PM
> To: [log in to unmask]
> Subject: [HP3000-L] Codegen detected error (5705)
>
> 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. I have tried
> changing
> the comparison; for confirmation, I commented out 1048, and could
> compile. I edited to just test C-C = ZERO, and got the same error. I
> tried ZEROES and 0, and enclosing in parentheses, without success.
> Getting clever and defining another identifier with a value of zero is
> not legal (EXPECTING ONE OF THE FOLLOWING: <NUMERIC-LIT> ZERO). OK...
> GOTO would be messy in this context. Ideas, anyone? Is this just a
> genuine bug?
>
> 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
> ...
>
> COBOL ERRORS:
>
> LINE # SEQ # COL ERROR SEV TEXT OF MESSAGE
> ------ ------ --- ----- --- ---------------
>
> 01048 80 384 Q Codegen detected error (5705) at LOC
> 1048 in testprog Ustack underflow (5705).
> 01048 80 999 D UNABLE TO CONTINUE. COMPILATION
> TERMINATED.
>
> 1 ERROR(s), 1 QUESTIONABLE, 0 WARNING(s)
>
> *** DISASTROUS ERROR NEAR LINE 01048 ***
> *** COMPILATION TERMINATED ***
>
> CHECKED SYNTAX ONLY.
> CPU TIME = 0:00:00. WALL TIME = 0:00:05.
|