TIP: Click on subject to list as thread! ANSI
echo: public_domain
to: Paul Edwards
from: Paul Markham
date: 1994-02-22 23:09:18
subject: what is a message

PM>> Well, personally I consider a flat file to have no indexes.



 PE> There's the flat file part of it (*.SQD) and there's an index into it

 PE> (*.SQI). The index is read totally into memory.  It's an index no matter

 PE> how you look at it!



How do you think DB2 stores tables? It uses linear VSAM files (ie flat
files); one for the data and one for the index.



 PE> One thing I don't know is how to store the text of the message.  How do

 PE> you have an unlimited field in SQL?



It depends on the implementation. With DB2 the biggest field you can have
is 32k. The PC products like Access or Paradox usually allow memo fields
that can store megabytes.



If you use a database limited field size then you have to store the text on
a different table and store chunks of it on separate records. The key to
the table would be the message ID and a sequence number to order the
chunks.



 PE> It depends what you call the message text.  If you consider the message

 PE> text to start after the last kludge line, then it isn't part of the

 PE> message text!



I don't think there's any limitation on where kludge lines can go.
Basically the name says it all: they are kludges that really should be
stored in some other way.



 PM>> You'll still need some sort of message base to store your messages in.

 PM>> This then requires a message editor and mail processor that can read

 PM>> that format.



 PE> Well seeing as I always use the external editor, it shouldn't be too hard

 PE> to display a list of areas then a list of messages, just with printf().



Yes, but you still have to store the messages somehow and unless you want
to rewrite every utility that accesses it you've probably have to use one
of the existing formats.



 PM>> Not really sure what you mean by 'manually parsing' the SQL.



 PE> Well if I had the DB2 preprocessor, it would translate the EXEC SQL into

 PE> call dbxyz().  Since my SQL is going to be pretty simple, I can manually

 PE> "translate" that, by replacing the "EXEC SQL"
with "call dbxyz()" myself.

 PE> In this case, the "call dbxyz()" will in fact be
"call msgapi()".  BFN.



That's not exactly how DB2 does it. The preprocessor strips the SQL out of
the program and stores it in a DBRM (don't remember what this stands for)
along with the line number the SQL was on. You bind all the required DBRMs
into a plan which is stored in DB2. During the bind, DB2 figures out how to
retrieve your data.



All that's left in you program is a call to the DB2 interface routine
saying to run the SQL that was on line 123 and in DBRM xyz.





Paul



--- GoldED/2 2.42.G1114

* Origin: It's life Jim, but not as we know it (3:711/934.1)
SEEN-BY: 635/514 640/305 711/809 934
@PATH: 711/934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.