• ISAM variable-length demark?

    From Mike Luther@1:117/3001 to All on Thursday, March 08, 2001 00:30:18
    The simple ISAM I'm testing works. The record file is all variable length ASCII text strings. Currently in BASIC, the record has no ASC(0) characters in
    it, but in moving it to C/C++ or something else, that might change, at least for the final character for a given page. The record is a collage of many variable length strings, including CR/LF's, tabs. It's a printer text image of
    page after page of whatever was printed on the page. Essentially it's an indexed book to which the keys let you print any page on demand.

    I have to be able to scan it later and reconstruct the key(s) file(s), should they get lost or grunged.

    What record demark character (group) would be a good choice to use to break up the record parade so that I can brute force the file to reconstruct the keys? Obviously, this sort of thing has been thought about long before this,but it's new to me...

    For my curious reasons, I'd even settle, I think, for the old WordStar page break deal. It looks like:

    000BD0 20 61 73 20 74 68 65 20 61 62 6F 76 65 0D 0A 1D as the above
    000BE0 20 00 0B F0 00 37 00 00 00 90 33 01 00 00 00 00 7
    000BF0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 20
    000C00 00 1D 0D 8A 54 68 69 73 20 A0 62 65 6C 69 65 76 e This

    Looks to me like it is a chunk of code starting with ASC(1D) and ASC(20) and ending with ASC(0D) and ASC(8A). However, I don't see any FF ASC(0C) in there.
    Obviously, this 37 byte block holds information, most likely page number, things like that. In that this block quoted above is the actual page break between page one and page two, is that ASC(01) in the above the start of either
    a short or long integer for the page numher, Big Indian -Little Indian or what?

    Anyone here recall how to read W/S page break blocks or know where to get that insight?

    It would be nice to have a defined spacer block between the records from which to get the pointers to the previous record, et. al.

    Anyone have any thoughts. I've picked W/S apart years ago, but not this part of it.

    Thanks.


    Mike @ 1:117/3001

    --- Maximus/2 3.01
    * Origin: Ziplog Public Port (1:117/3001)
  • From David Noon@2:257/609.5 to Mike Luther on Tuesday, March 11, 2003 17:37:56
    Hi Mike,

    Replying to a message of Mike Luther to All:

    [snip]
    What record demark character (group) would be a good choice to use to break up the record parade so that I can brute force the file to reconstruct the keys?

    Good ISAM systems do not use demarcation characters to delimit records. If the records can be varying length they use a length prefix, typically a 16-bit or 32-bit binary integer. I would recommend same.

    Regards

    Dave
    <Team PL/I>

    --- FleetStreet 1.25.1
    * Origin: My other computer is an IBM S/390 (2:257/609.5)