gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory Corruption? Or Something Else?


From: Robert Heller
Subject: Re: Memory Corruption? Or Something Else?
Date: Wed, 3 Jul 2024 12:52:34 -0400 (EDT)

At Wed, 3 Jul 2024 15:23:56 +0100 Vince Coen <vbcoen@gmail.com> wrote:

>
> Retry it but with the slash removed from the data files (and I would
> also remove the comma unless you have a strong reason for inclusion.
>
> Depending on the data file used (type i.e., ISAM the slash could be
> telling the file library to handle in a differing manner.
> Like wise it can be being processed by the O/S in a way you do not want.
>
> I suspect the later but I cannot use the need to slash or comma in the
> data file any way. but I only looked at the code very quickly.
>

No, the slashes and commas were something I added later and are there to make
sure I was understanding which field was which.

Adding --debug to the make, showed the problem: COBOL, like FORTRAN uses
1-based array subscripts, not 0-based...  Opps.


>
>
> On 03/07/2024 14:31, Robert Heller wrote:
> > I have written a simple little COBOL program (as a demo), but something
> > strange is going on that I just cannot figure out.
> >
> > For some reason a field in a structure is getting extra characters in it 
> > from
> > some unknown source when I assign (via MOVE) to that field. It is a TABLE
> > item. Also, when I write the structure out to a file, the data that is 
> > written
> > is scrambled some as well (for no appearent reason).
> >
> > I am using gnucobol4 on a Raspberry Pi 5 (Debian 12.5):
> >
> > ii  gnucobol4         4.0~early~20200606-6+b1 arm64        COBOL compiler
> > ii  libcob5:arm64     4.0~early~20200606-6+b1 arm64        COBOL compiler - 
> > runtime library
> > ii  libcob5-dev:arm64 4.0~early~20200606-6+b1 arm64        COBOL compiler - 
> > development files
> >
> > The code is available on GitHub here:
> > https://github.com/RobertPHeller/PiggyBank
> > There is just one source file (there is a simple Makefile there as well).
> >
> > It *looks* like a compiler or runtime bug, but it is possible there is
> > something wrong with my code (but I am not seeing it).
> >
>
>
>

--
Robert Heller             -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
heller@deepsoft.com       -- Webhosting Services




reply via email to

[Prev in Thread] Current Thread [Next in Thread]