Jump to content.

IFX Group


TDBS:The Database System - Source Code

This TDBS source code is provided here for educational purposes only. We cannot and do not provide technical support assistance for these demonstration programs.

TDBS is a programming language created by eSoft for the TBBS platform. It is nearly 100% compatible with dBase III+ with extensions. If you wish to use TDBS to develop your own applications, prior knowledge of the dBase language is assumed. Our Technical Support Department is unable to provide programming training services. Should you wish to learn dBase programming, we respectfully suggest obtaining one of the many dBase III+ programming guides from your bookstore or library.

This directory contains programs that show a small piece of the power of the TDBS language. Each program is complete and functional in itself. The programs have many examples of different TDBS programming techniques and features. Every effort has been made to comment each line to allow easier understanding of both the basic and advanced features. Please consult your TDBS manual for additional information about the commands or functions used. Every effort has been made to comment each line of the source code with additional comment blocks added to point out the more advanced commands and techniques.

Before you start you should understand how the programs are structured. First, the source code is stored in a standard ASCII text file. You may use a word processor (in non-document mode) or a plain text editor to modify the files.


The source code is structured with one command or comment per line. Any line that starts with an asterisk (*) character is a comment line and is ignored by the TDBS language. Some lines can have both commands and comments. Any text following a double ampersand (&&) character pair is ignored by TDBS as a comment. So a command that is followed by a double ampersand is a command line up to the double ampersand and a comment for the remainder of the line. An example of the two different types of comments are:

* This line is a comment line and may contain any information you wish.
SET ESCAPE OFF     && Everything after the first && is a comment.


There are several different types of formatting TDBS source code. The programs in this collection use the following:

  1. TDBS commands and functions are in uppercase letters.
  2. Variables and procedures are in lowercase letters.
  3. Command lines, or groups of lines, that are inside of a loop or conditional block (as in IF or CASE statements) are indented one or more spaces from the left to show relation.


    This is a program to show how to create a .DBF (database) file from a TDBS program. It is designed as a procedure that you can include in other programs. The database that it creates is a fixed or hard coded structure that means that each time you run the program it will create the same database file without user input. It would be a fairly minor change to add an interactive part to allow the user to create a custom database file using the structure in this program.

    This program shows a display of the free storage space on your system. It has a sysop mode that will allow the sysop to add drives to the list on-line while other users are accessing the display. In this program you will learn how to find available drive space and build graphs (using IBM graphic characters and ANSI codes if the user has that ability) from the information available.

    This allows the user to change the location field in their record. It shows how you can access and change information in the user account as well as a custom input routine that will only accept a limited number of characters.

    This is a replacement program for the TBBS Type 11 (Time Left) menu command. It uses full text to display the information to the user along with the location of the BBS. If the user requests the number format then the real TBBS Type 11 is called. It also shows how to pass information from TBBS to a TDBS program.

    NOTE: This program expects the menu to pass the %TIMELEFT% parameter. This is done in the format:

    Type=200 Opt Data=\path\HOWTIME /Q && %TIMELEFT% BBS location
    This is a utility to allow users to save their tagged file queue from one call to the next. It shows several advanced features including file transfer calls from TBBS and file renaming. It also shows how to pass information from TBBS to a TDBS program.

    There are three different parameters that you may pass on the Opt Data menu line; SAVE, RESTORE and SYSOP.

    Save - The SAVE parameter is used in place of the TBBS Type 10 (hang up) menu command. It checks to see if the user has a pending file tag queue and asks the user if they would like to save it. If the user selects No then a normal TBBS Type 10 is called that will ask if the user wants to download the batch.

    Restore - The RESTORE parameter is used somewhere on the 0000 (first) menu. It checks to see if the user has a saved file tag queue, restores it and asks the user if they would like to download it. If the user selects No then normal TBBS operation continues with the file queue still pending.

    Sysop - This allows the sysop (or co-sysop) to place files that they have tagged for download into a user's offline queue. The next time the user calls the BBS the file queue will be restored and they will be allowed to download the files even though the user may not have been able to access the files any other way.
    This is a replacement for the TBBS Type 7 (message write) command. It allows the user to type only part of a user name and have a list of possible matches displayed. After a name is selected it is passed to TBBS with a real Type 7 command call. This program shows text file access and direct access to the USERLOG.BBS file with the TDBS flat file routines. It also shows how to pass information from TBBS to a TDBS program.

    You can optionally pass the name of the TBBS message board that you want the user to post the message in on the Opt Data menu line. For example, if you wanted the user to write their message in the E-Mail message board the your Opt Data menu line would look something like:

    Opt Data=Mailman /q &&E-Mail

    Or if you wanted to allow the user to select the message board to write:

    Opt Data=Mailman /q
    This is a replacement for the TBBS Type 25 (password change) command. It adds a bar above the password input prompt to show the user how long the password can be as well as beeping when the user tries to enter the 9th character. This program shows custom input routines that have a limited length and echo stars instead of the key the user pressed.
    This is a replacement for the TBBS Type 23 (sysop chat request) command. It shows a fake menu of different sounds that the user can select from to use as a sysop page request. The sound on the sysop side is always the same, but the user doesn't need to know that. It shows how to change the look of internal TBBS functions and how to pass information from TBBS to a TDBS program.

    The sysop may pass a number on the menu command line (Opt Data) to have this program show the sysop as female instead of male. For example:
    For a female sysop:
    Opt Data=sbschat /q && 1
    For a male sysop:
    Opt Data=sbschat /q && 0
    Opt Data=sbschat /q
    This program checks new user accounts for valid (first and last) name. It erases accounts with bad words and wrong looking info. It also allows new user to define settings of ANSI color, IBM graphic characters and length of screen. It shows low level user account control including marking a user account deleted as well as how to pass information from TBBS to a TDBS program. This program requires passed information.

    In this case the calling menu Opt Data should look something like:

    Opt Data=Testset /q && A%CanAnsi%%Bad7Bit%

    Notice that the double ampersand is used to separate the normal menu command from the information being passed to the program. The letter option followed by two insertion parameters makes up the three pieces of information needed. The valid options are:

    A - Check for bad words and both FIRST and LAST name. Allow three names as in the case with JOHN SMITH JR., but no more.

    B - Check for bad words but don't check for number of words in name. This will allow one word names as well as many word names, but will NOT allow more than one space between any of the words in the name.

    C - This will not check the name.
    A utility to display a different text file for each day. The sysop may upload any number of text files into future dates with a calendar to display what days have text files for display or not. This program shows forced name uploads and date functions. It also shows how to pass information from TBBS to a TDBS program.

    You may set up a menu entry to allow the sysop to add or delete files to show. This is done by adding the word SYSOP to the Opt Data line. This would look like:

    Opt Data=today /q && SYSOP

IFX Group Software License

Except where otherwise noted, all software and documentation available here is copyrighted by the IFX Group and/or Casey Sprangel with all rights reserved.

This software is provided AS-IS, without any express or implied warranty. In no event shall the author be held liable for any damages arising from the use of or inability to use this software.

Unless otherwise noted in the included documentation, permission is granted to anyone to use this software for any purpose, including commercial applications, and to redistribute it, provided that the following conditions are met:

  1. All redistribution of source code files must retain all internal copyright notices that are currently in place.
  2. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software as part of a product, an acknowledgment in the product documentation would be appreciated.
  3. Modified versions in source or binary form must be plainly marked as such, and must not be misrepresented as being the original software. We suggest adding your name and the date modified in the appropriate place(s).
First published 2006-12-31. The last major review or update of this information was on 2013-07-01. Your feedback using the form below helps us correct errors and omissions on this page.