Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FABS - Qbasic
#1
Has anyone ever heard of FABS Plus Net from Computer Control Systems.  We use a program at my workplace that was written specially for a handful of automotive stores in the 80's and it calls FABSMB regularly.  I have been researching and found a reference to FABS here http://www.gcssoft.de/ I am trying to debug a couple of things in the program and i need to find a copy of this FABS if it is possible to look at the index files that are in use.  Any help would be appreciated.

Thanks,

Garrett
Reply
#2
Well you're in luck!!
I have used that program for many years. Specifically until I found QB64 and converted the program to be able to use SQL databases.
What do you need specifically? I only have the program that is loaded into memory before loading the management program and creates an FSEG file with the memory address where it was loaded.
Regarding the handling of the program, yes, I can guide you.
Reply
#3
Any info about the program at all would be appreciated.  We are still using an automotive supply program custom written utilizing that program.  Currently the only thing i have is the obj file in the same folder as our source code.  Looks like it was used to keep a database of parts and sales history and we are currently losing some of the sales history so i assume there is something wrong with the database.
Reply
#4
i can see calls to fabsmb in the source code but i am not sure how to look at the database to find out what is going on.
Reply
#5
If your database is not encoded, just open it in Notepad. Does the QB program read the database as OPEN for BINARY or OPEN for INPUT?
Fake News + Phony Politicians = Real Problems

Reply
#6
I believe it is open for input. I can open the database in notepad but i have jibberish in the front of the file and some fields do not display as anything coherent, i figure partly due to difference in variable types in the program. Should the field sizes be fixed length? they seem to vary in different areas of the database. There is a key file for each database, not sure how that translates. One question i have is how to link fabs to the compiler as when i try to compile source i get illegal call error from qbasic. I apologize in advance, i am but a novice programmer with limited experience in college with basic, qbasic, visual basic, and c++. I would like to understand the commands and options of using it within qbasic. Do you know of any manual or such for the fabs?

Thanks again,
Garrett
Reply
#7
Post the line of code that won't compile.

Jibberish seems likely it is an encoded database.

Databases made without fixed length input result in data all over the place.

So far, @JuanjoGomez is the only one who seems to be familiar with this database program.

Pete
Fake News + Phony Politicians = Real Problems

Reply
#8
Hello,
I'll explain. I haven't been able to get FABS to work with QB64. Only with QB45, and on Windows XP, Vista and Windows 7 32-bit.
What FABS does is create a key file for each table, and you create the data file on your own. When you insert a new data, it adds it to your key file and tells you which position in your data file to save it to. When you look for that data, FABS tells you in which position you saved it.
There are 2 ways to use FABS. One is the one you mention, that the program is compiled with a library, and another is the one I used, since I didn't have that library.
I'll tell you how I used it:
Before loading your program you have to load the FABS.COM file. What it does is stay in memory and write a file called FSEG with 8 digits, in which it indicates in which memory address it has been loaded, so that your program can access it.
In the first line of the program you have to put:

DECLARE SUB fabs (cmnd$, recno, fseg, errf%, adrkey%)
OPEN "FSEG" FOR RANDOM AS 1 LEN = 8:
FIELD 1, 8 AS dd$
GET 1, 1
fseg = VAL(dd$)
CLOSE 1

Then comes the corresponding program and this would be the way to use it:
For example, to search for a code an article....

We first open the files:
OPEN "ARTICLE.DAT" FOR RANDOM SHARED AS 1 LEN = 24
FIELD 1, 4 as code$, 20 as name$
cmnd$ = "O\ARTICLE.KEY\1"
CALL fabs(cmnd$, recno, fseg, errf%, adrkey%)

Now we do the search:
cmnd$ = "G\1\1\" + article$
CALL fabs(cmnd$, recno, fseg, errf%, adrkey%)
IF errf% THEN
      PRINT " THERE IS NO ARTICLE WITH THAT CODE ";
    ELSE
      GET 1, recno
      PRINT "CODE:"; code$
      PRINT "NAME:";name$
END IF

The FABS routine would be this:

SUB fabs (cmnd$, recno, fseg, errf%, adrkey%)
    '------------------------------------ FABSP ROUTINE ---------------- ----------------
    DEF SEG = fseg
    offset% = &H8
    CALL ABSOLUTE(cmnd$, errf%, recno%, adrkey%, offset%)
    rnlo = recno%: IF rnlo < 0 THEN rnlo = rnlo + 65536
    cmnd$ = "X"
    CALL ABSOLUTE(cmnd$, dum%, recno%, dum%, offset%)
    rnhi = recno%: IF rnhi < 0 THEN rnhi = rnhi + 65536
    recno = rnlo + rnhi * 65536
    DEF SEG
END SUB

I don't know if this can help you.
Maybe Pete can convert to QB64 so that it works in this language as well.
Reply
#9
By the way, I don't know how to attach the program FABS.COM to a post
Reply
#10
(06-15-2022, 08:14 PM)JuanjoGomez Wrote: By the way, I don't know how to attach the program FABS.COM to a post

Use reply button at bottom right and pick Full Edit Mode.

This gives you a section to download files below the normal editor section (see attached screen shot). I don't know if .com is checked, if not allowed try putting in a zip file. There is a 2MB limit to attachments.

Here is snap of what attachment section looks like just click and should get access to your computer files for navigating to your file.

   

Notice: "Insert Into Post" that is for images to show in particular place in your post available after image is downloaded. To use that, first leave your cursor in the editor where you want attachement to go, then click Insert Into Post and if all goes well you will see attachment number enclosed in square brackets.
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)