Program gives error if %_row > 25

  • This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
#1
Hi;
TCC 11.00.50 Windows XP [Version 5.1.2600]
TCC Build 50 Windows XP Build 2600 Service Pack 3

I have a need to run some console programs I developed many years ago using MicroFocus Visual Object COBOL 1.0 under Windows 98SE, on an XP system.

I tried running these programs in TCC, but received the following error;

Execution error : file 'AGE'
error code: 114, pc=0, call=1, seg=0
(Signal 11)

AGE.EXE was a small test program, just to see if a simple program would work, since my bigger projects all give the same error.

I ran AGE.EXE in CMD, and had no problems. Ditto for my bigger projects, they worked fine in CMD.

Well, I did a CLS in TCC, and tried again. The program worked!

Why did it work this time, when it would not before?

Did a DIR, and I ran it again. Got the error again. ???

According to the %_rows variable, the number of rows in my copy of TCC is 53.

Turns out, after testing, that the console programs I developed using MicroFocus VOC will only run if %_row <= 25.

Running from %_row = 22 works. Running from %_row > 25 does not.

Now, there is nothing in my test program stating that output must be displayed on a specific row;

Code:
PROCEDURE DIVISION.
A000-MAIN.
    MOVE FUNCTION CURRENT-DATE to W01-CURRENT-DATE.
    MOVE W01-CURRENT-DATE(1:4) TO W02-DATE.
    DISPLAY "What year where you born? " WITH NO ADVANCING.
    ACCEPT WS-YEAR-BORN.
    SUBTRACT WS-YEAR-BORN FROM W02-CCYYNUM GIVING WS-RESULT.
    DISPLAY "Your are " WITH NO ADVANCING.
    IF WS-RESULT IS GREATER THAN 99 THEN
        DISPLAY WS-RESULT(2:4) WITH NO ADVANCING
    ELSE
        DISPLAY WS-RESULT(3:4) WITH NO ADVANCING
    END-IF.
    DISPLAY " years old.".
STOP RUN.
so the problem must be in how the MicroFocus VOC compiles the .EXE

I realize that if I run TCC outside of Take Command, I can change the number of rows for TCC to 25, but I am too used to the Tabbed Interface of Take Command.

This isn't a big deal, now that I know why it does it, as I can work around it, but just passing along in the event that others have a similar problem with older applications.

Joe