Hello,
I have some programs that use multiple subscripts.
The one using 7 subscripts compiles and runs fine, but the one with 16 passes a syntax check yet seems to never finish a compile.
Micro Focus compiles it in about 5/10 seconds. After 3 minutes I pressed Ctrl+C and I see it says unknown (signal) followed by cobc: aborting codegen for fsx16.cbl, last statement at line 61831 (unknown: unknown).
And that is the last line in the program (the blank line after the Stop Run).
Zip file is supplied.
Thanks, Vince
Try running it as :
cobc -x -j FSX.CBL
works here but a bit quicker is :
cobc -x FSX.CBL
./FSX16
and doing time ./FSX16 gives time as :
real 0m1.154s
user 0m0.201s
sys 0m0.201s
but I run an old AMD FX8350 8 core under Mageia v9 Linux.
On 10/06/2024 20:45, Vince Esparza wrote:
Related
Bugs:
#973Thanks! i will try it. I run Windows 11
Noted. That adds another dimension to the issue :)
Hello, The -j directive allowed the program to compile but I am uncertain why it was required. I see a difference in the output because Micro Focus defaulted to output SYSOUT to a record length of 132 while GnuCobol treats the output as one continuous data stream. I will write the output to a fixed length file of 132 for both compilers and check once more. Thanks, Vince
See the Programming Guide or Reference at 10.1.1 cobc - The GnuCOBOL
Compiler but according to it :
-j [<args>]</args>, --job[=<args>]</args> run program after build, passing <args></args>
So you compile program then run it although that said it runs slightly
slower than executing it after the compile, at least on my system for
some reason !
Yes the display after a while just comes out as a complete stream - So
yes you might want to consider restructuring your displays etc. or using
a text file as o/p.
Vince
On 11/06/2024 13:05, Vince Esparza wrote:
Hello, Strange. I changed the program to end with
close Subsout
move Function Current-Date to DateTime
display ' End Time = ' DateTime
stop run.
and it compiles in about 22 seconds. It now writes to a line sequential file. but I think the program has a user coding error in its counting. It runs in this time:
C:\ocob\tests>fsx16
Start Time = 2024061319401557
End Time = 2024061319401565
Please close this. I will work on it. Thank You for your help! Vince