bug-gnucobol
[Top][All Lists]
Advanced

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

[open-cobol-list] Re: Sort Failure with Records larger than 2023 bytes


From: Roger While
Subject: [open-cobol-list] Re: Sort Failure with Records larger than 2023 bytes
Date: Wed Mar 30 06:00:40 2005

Hi Franklin,
Weird, I cannot get it to fail whatever record size I use.
Only thing I can see is the use of --with-db1
Why not --with-db ?
I think db1 will default to the old 1.xx release instead of the
current 4.xx release if both are on the system.

Here it is with X(1995)
simsco6:/disk03/disk06 # cobc -std=ibm sorttest.cbl
simsco6:/disk03/disk06 # ./sorttest
Data-000
Data-001
Data-002
Data-003
Data-004
Data-005

HAAAAA - Just did a test - reconfigured with --with-db1
(I have both on the system) and what do you know !!!!   ------

simsco6:/disk03/disk06 # cobc -std=ibm sorttest.cbl
simsco6:/disk03/disk06 # ./sorttest
Data-005
Data-003
Data-002
Data-000
Data-001
Data-004

So, it looks like Berkeley DB version 1.xx is borked.

Maybe we should deprecate this.

Roger



At 13:17 30.03.2005 +0200, you wrote:
Hi Roger,

i did a cvs update.
I ran  "configure --with-db1" to get sort to work was this right?

I still have the problem
After changing "S-DATA PIC X(1993) to PIC X(1995),
compiled it using "cobc -std=ibm sorttest.cbl"
the display shows this:

Data-005
Data-003
Data-002
Data-000
Data-001
Data-004


Franklin

----- Original Message ----- From: "Roger While" <address@hidden>
To: "Franklin Ankum" <address@hidden>
Sent: Wednesday, March 30, 2005 1:19 PM
Subject: Re: Sort Failure with Records larger than 2023 bytes


Hi Franklin,
Can you try CVS ?
Or are you using CVS ?
With CVS I cannot reproduce this problem with your test program.

Roger


At 11:42 29.03.2005 +0200, you wrote:
I found out that when using the Cobol "SORT" Statement with Sort Records lager than 2023 Bytes that the result is not Sorted.

When in my example Program the Sort Record has a size of 2024 Bytes (1994 bytes data + 30 bytes Key) i even get a segmentaion fault. When i change the data size to 1995 bytes or more the Records are not sorted at all.

I not sure but i think that the "DB_PUT" in libcob/fileio.c is not being used correctly. Actually the key + data is being given to the API as a key.

Regards
Franklin Ankum




reply via email to

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