Squish bases, 2 of 2

 BBS: Inland Empire Archive
Date: 04-07-92 (20:57)             Number: 135
From: FRANCOIS ROY                 Refer#: NONE
  To: HARVEY PARISIEN               Recvd: NO  
Subj: Squish bases, 2 of 2           Conf: (2) Quik_Bas
And the last structure, also needed to read a message:

TYPE SQMESSAGE    ' The message Header, as it appears in a Squish area
     ATTRIB     AS LONG
     FROM       AS STRING * 36
     DEST       AS STRING * 36
     SUBJ       AS STRING * 72
     ORIGZONE   AS INTEGER
     ORIGNET    AS INTEGER
     ORIGNODE   AS INTEGER
     ORIGPOINT  AS INTEGER
     DESTZONE   AS INTEGER
     DESTNET    AS INTEGER
     DESTNODE   AS INTEGER
     DESTPOINT  AS INTEGER
     BINDATES   AS STRING * 8
     UTCOFST    AS INTEGER
     REPLYTO    AS LONG
     REPLIES    AS STRING * 40
     DATEMSG    AS STRING * 20
END TYPE

Ok, now for the explanations: the two main files are
<name>.SQD and <name>.SQI.  The first structure is for the
.SQI file (you can open that one as RANDOM with a length of
12); the others are for the .SQD file (which you open as
BINARY).

There is a one-to-one correspondence between records in .SQI and the (non-
deleted) messages.  You want message #25: just read the
25th record from the .SQI file into the SQIDX-dimensioned
variable.  Then, use the offset SQI.OFFST + 1 to read the
SQHDR-dimensioned variable (the SQI offsets start at 0 but
QB treats the first byte in a BINARY file as byte 1).  This
SQHDR is 28-bytes long, and it is immediately followed by
the 230 bytes of the SQMSG-defined variable (the message
header), and SQD.MSGLEN bytes of message text.

The SQBASE structure isn't needed to read messages but
contains info about the Squish base itself.  You read it
from byte 1 of the .SQD file if you are interested in that
info.

That is about as far as I have progressed: I don't know
what all the fields do, but there is enough there to read
messages, which is all my application was designed for.

--- msgedsq 2.0.5
 * Origin: R&D BBS 'The VAX Heaven' {819/772-2952} 9600 HST/V32 (1:163/506)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET