Page 1 of 1
DBAS Database Documentation - Now available in PDF format.
Posted: Tue May 27, 2025 3:17 pm
by NormanDunbar
I've been doing a bit of DBAS work in Assembly recently---for certain values of "recently"---and decided to convert the myriad of Quill files into a single PDF manual. It should be attached somewhere for your delectation and delight.
I have still not tracked down why the FSD.SEL (Select records) function doesn't seem to work as documented, results are still fairly random no matter what I do. I will get to the bottom of it though.
Currently, using FSD.SEL works for some queries but not for others, or works partially, which is no good. In SuperBASIC (I'm told) and C68 (as I found out in 1993) in order to
select records, you have to supply a user procedure and
deselect all the records you don't want. This is arse about face!
Anyway, I hope the attached is useful. It's had a few minor corrections, but it's mainly as per the original docs.
EDIT 27 May. Due to a smattering of escape characters in some program listings, I've re-uploaded the document. If you see things like "flp1\_" then you should download the latest version. There should not be a backslash before the underscore. Apologies for the foul up, I didn't spot them in proof reading. Sigh.
EDIT 28 May. Fixed a typo. Added an explanation of how INCLUDE and EXCLUDE work to make it a lot less confusing as they are not exactly obvious, even though they could be. Fixed a type in the original example code in the doc for excluding dogs, cats and no pet people from a database of households!
- DBAS.pdf
- (468.19 KiB) Downloaded 29 times
Cheers,
Norm.
Re: DBAS Database Documentation - Now available in PDF format.
Posted: Tue May 27, 2025 7:27 pm
by Tesla
A very useful job, Norman.
Thank you very much!
Greetings.
Marco
Re: DBAS Database Documentation - Now available in PDF format.
Posted: Tue May 27, 2025 8:16 pm
by NormanDunbar
Thanks Marco.
Unfortunately, I've spotted a couple of foibles with the version you have downloaded. Please download again, I've uploaded a corrected version. See my original post for the problems.
Cheers,
Norm.
Re: DBAS Database Documentation - Now available in PDF format.
Posted: Wed May 28, 2025 6:08 am
by bwinkel67
Found a typo in the May 2025 forward:
There are bugs in the record selection operation as described in the documentation.
I am working on finding out whet needs to be done or documented to fix it.
...and a blank page (16) which may be on purpose...dunno.
...and, this is a bit confusing:
INCLUDE #C;F,C$,V *;O$;F,C$,V*
INCLUDE #C
Select any record in which the given expression is true. If no extra parameters
are supplied, then the expression is always true, so all records are de( Or selected if
using EXCLUDE).
So if the expression is always true you de-select?
[Edit: Sorry, was really interested in how the BASIC interface worked so jumped right to the select part. Perhaps this is explained somewhere else in the manual]
Re: DBAS Database Documentation - Now available in PDF format.
Posted: Wed May 28, 2025 7:31 am
by NormanDunbar
bwinkel67 wrote: Wed May 28, 2025 6:08 am
Found a typo in the May 2025 forward:
...and a blank page (16) which may be on purpose...dunno.
...and, this is a bit confusing:
INCLUDE #C;F,C$,V *;O$;F,C$,V*
INCLUDE #C
Select any record in which the given expression is true. If no extra parameters
are supplied, then the expression is always true, so all records are de( Or selected if
using EXCLUDE).
So if the expression is always true you de-select?
[Edit: Sorry, was really interested in how the BASIC interface worked so jumped right to the select part. Perhaps this is explained somewhere else in the manual]
Thanks, I'll fx it. There's always at least one typo!
Blank page is probably deliberate, but I'll check.
There's a section erlier explaining all the codes for those bits. I found them confusing too!
For INCLUDE with no params, select everything. For EXCLUDE with no params, deselect everything.
Cheers,
Norm.
Re: DBAS Database Documentation - Now available in PDF format.
Posted: Wed May 28, 2025 10:57 am
by bwinkel67
NormanDunbar wrote: Wed May 28, 2025 7:31 am
For INCLUDE with no params, select everything. For EXCLUDE with no params, deselect everything.
That's what I would expect, but it seems to say the opposite...or am I just not getting the wording?
Re: DBAS Database Documentation - Now available in PDF format.
Posted: Wed May 28, 2025 11:34 am
by BSJR
bwinkel67 wrote: Wed May 28, 2025 10:57 am
NormanDunbar wrote: Wed May 28, 2025 7:31 am
For INCLUDE with no params, select everything. For EXCLUDE with no params, deselect everything.
That's what I would expect, but it seems to say the opposite...or am I just not getting the wording?
This works as expected in S*Basic in my SuQcess program.
Norman's attempts in ASM appear to do it the opposite way.
Norman, thanks for the PDF.
The BIN supplied with SuQcess is v2.13md2 but I'm not sure what the difference is with 2.12.
I did rename the RESET keyword to DBRST to avoid an accidental OpSys reset, hence the 'md2'.
There are more generic names that may conflict with other toolkits so in most cases SuQcess uses the function keyword options like FDB_SET.
BSJR
Re: DBAS Database Documentation - Now available in PDF format.
Posted: Wed May 28, 2025 5:05 pm
by NormanDunbar
Ok, here's an explanation of INCLUDE and EXCLUDE which I hope helps, because, as I've found, it's confusing!
I've added a better explanation to the SuperBASIC section on selecting records to make it less confusing, I hope. I also noted a typo in David Howell's original code in the example as it EXCLUDEs everything but staes that everything is INCLUDEd! Even he got confused.

Once again, you are advised to grab the latest version in the very first post on this thread.
TL;DR
On opening a database, all records are included.
INCLUDE does nothing at this point, because INCLUDE only adds to the current list of included records
by selecting a number of records from the currently EXCLUDED ones, to be henceforth, INCLUDEd. If you have nothing EXCLUDEd, then INCLUDE does nothing.
Example
Code: Select all
OPEN_DIN #3, "ram1_libguide_dbs"
:
REMark Record count.
PRINT COUNT(#3)
784
REMark Disc Name is field 1.
PRINT FETCH(#3, 1)
CD 01
REMark Exclude all "CD 01" records.
EXCLUDE #3; 1, "=", "CD 01"
REMark Record count.
PRINT COUNT(#3)
779
REMark Disc Name is field 1.
PRINT FETCH(#3, 1)
CT 01
REMark Only CD 01 records required.
INCLUDE #3; 1, "=", "CD 01"
REMark WRONG Record count!
PRINT COUNT(#3)
784
REMark Exclude everything that's NOT "CD 01" then!
EXCLUDE #3; 1, "<>", "CD 01"
REMark Record count.
PRINT COUNT(#3)
5
REMark ALTERNATIVELY...
REMark Exclude EVERYTHING
EXCLUDE #3
PRINT COUNT(#3)
0
REMark INCLUDE "CD 01" Only.
INCLUDE #3; 1, "=", "CD 01"
PRINT COUNT(#3)
5
CLOSE_DATA #3
In summary, if you wish to only have the records with disc name "CD 01" you must either:
EXCLUDE everything
INCLUDE the desired records
or
EXCLUDE everything
except the desired records.
HTH
Cheers,
Norm.