Opened 16 months ago

Last modified 13 months ago

#75 new defect

SVN r359 and r340 Cannot sort dBase file

Reported by: herwigb Owned by:
Priority: major Milestone: Future
Component: IFS Version:
Severity: high Keywords:


It seems I am unable to sort a dBase file using RexxBase driven App on these FAT32 revisions. This works normally with FAT32 0.9.12.

The original filesize is around 640K, while the sorted file with r340 and r359 is only 4K.

Change History (5)

comment:1 Changed 16 months ago by valerius

Can you give me some test dBase files, plus explain where I could take RexxBase?? Can you also find last working version? (I have a build archive at, you can use binary search (take a [last working, last non-working] versions segment, take a middle (arithmetic average between segment ends), test the corresponding version. If it works, then use a segment [middle, previous non-working]; or if it's not working, use [previous working, middle], and so on)).

comment:2 Changed 16 months ago by herwigb

RexxBase can be found here

I will check your archive and report back

comment:3 Changed 15 months ago by valerius

2Herwig: What DBF files does it understand? dBASE III and IV? I found only FoxPro? .dbf files, which seems to not work completely. It tries to find *.mdx (indexes?) but I see only *.cdx nearby. Though, it seems to find a field list correctly. Not sure, how should I sort the records. Can you give me some example .dbf?

PS: I was able to open a record list of my .dbf (a phone book) and see the record list. But it crashed soon (it did not found the *.mdx file).

PPS: Or, you use a REXX DLL for sorting records? I tried to open a file via RexxBase?.exe. Have you an example of a REXX script, if so?

Last edited 15 months ago by valerius (previous) (diff)

comment:4 Changed 13 months ago by herwigb

Just retried the 361 version and the dbf file is still truncated after 3396 bytes of 603928 bytes

I will setup an example dbf file and give you the program that sorts the dbf. Basically this is a VX REXX application that runs the following code:

    ok = rexxbase_opendbf('dbname')
    dbname.sortfield.0 = 2
    dbname.sortfield.1 = ZUNAME
    dbname.sorttype.1 = '+'
    dbname.sortfield.2 = VORNAME
    dbname.sorttype.2 = '+'
    SortedDBF = filespec('drive',dbname)''filespec('path',dbname)'SORTED.DBF'
    BackupDBF = left(dbname,length(dbname)-4)'.BKF'
    say BackupDBF
    ok = rexxbase_sortdbf('dbname',SortedDBF)
    ok = rexxbase_closedbf('dbname')
    ok = rexxbase_CloseAllDBF()
    call SysFileDelete(BackupDBF)
    ok = VRRenameFile(dbname,BackupDBF)
    say 'Rename DBF -> BKF: 'ok
    ok = VRRenameFile(SortedDBF,dbname)
    say 'Rename Sort-> DBF: 'ok

comment:5 Changed 13 months ago by valerius

Hi, Herwig. Where is "VRRenameFile" from? Is it from REXXBASE utility DLL? Sorry, I never tried to use VXREXX yet. Is it possble to give a complete REXX program?

Note: See TracTickets for help on using tickets.