Frequently Asked Questions - jBASE for Windows

 


Here are the most frequently asked questions about jBASE for Windows NT and Windows 95/98. Please read through these carefully (if you have got this far then thanks for reading through the installation notes at least!), before sending email about a Windows problem. Please read the Installation Notes here before going anywhere else.

Unless you are desperate then please do not call and ask for support, unless you have purchased a support agreement.

 


Those questions in full:

  • What version of Visual C++ do I need?
  • Installation Notes - read this if you have not yet got going!
  • What are environment variables?
  • Why does the BASIC command not work?
  • Why does the CATALOG command not work?
  • Why do LISTF or LIST-FILES commands not exist?
  • How do I set up an MD/VOC file and Q pointers?
  • You can also review the generic FAQ for more general information or return to the home page to start again.

     


    Visual C++ Compiler

    When you compile a Basic program with jBASE, it is converted to C++. The C++ code is then compiled to machine code. For this, we use the Microsoft Visual C++ compiler. You should purchase version 6.0. Microsoft publishes 3 editions of Visual C++ 6.0. These are the Standard Edition, Professional Edition and the Enterprise Edition. Any of these can be used with jBASE. For jBASE 3.2 and later, you must use Visual C++ 6.0.

     


    Installation Notes.

    The most common problem that people have is getting going in the first place. This is almost always related to getting the compiler to work and is always related to the way in which the installation was done. In addition we have found that the Windows NT environment variables are very sensitive to typographical errors and quite often the problems are related to this. For this reason, the next release of jBASE 4 Windows will rely solely on the registry, which is much more stable. Reading through these notes first may well solve 80% of all installation problems:

    Checklist!

    1. If you are having problems with the NT version: did you create a new user to install jBASE into? Although there is no reason why you cannot use your existing login, we have found that this is often the reason things don't work as the environment variables are misconfigured. If you did not create a new user then do so now, install Visual C++ while logged in as this user, then install jBASE 4 Windows. Please create a local directory for the user such as D:\users\myhomedir and ensure that you use the User Administrator to tell the profile of the user that this directory exists.
    2. If you are using Windows 95/98, did you set the HOME variable in your autoexec.bat file to a directory you wish to be your home directory. Use: set HOME=c:\users\myuser and reboot Windows 95.
    3. Did you install Visual C++ correctly, while you were logged in as your jBASE development user? It will do you no harm to install Visual C++ again and see if your problem goes away as the VC++ install will not recopy any programs that exist but will set up the users environment variables if they are wrong. Alternatively, consult the list of Environment Variables and check you have them set correctly.

     


    Why does the BASIC command not work?

    So you have installed everything correctly as far as you can see but when you try the BASIC command, nothing seems to work. What could you have done wrong? It is almost certain that your Visual C++ installation is not correct for this user in that the environment variables are not correctly installed for this user. You can reinstall Visual C++ as this user or check the list of Environment Variables below. You can go through the following list first if you like:

    1. Try the verbose option of the BASIC command [ BASIC BP Program (V ] and see if it is failing when it tries to issue the cl command. If it does, then your PATH is not set to include the Visual C++ bin directory. Before rushing off to do this though, make sure that all required variables are set by consulting the list below.
    2. To verify your PATH is not correctly configured, type the cl command directly from the shell prompt. If the shell tells you off for typing a command that does not exist, then you know that your PATH is not set up.
    3. Reinstall Visual C++ or set you Environment Variables per the instructions below.

     


    Why does the CATALOG command not work?

    Some users have found that after install, they can compile, but cannot CATALOG programs. Go through this checklist to solve this problem:

    1. Did you create a local directory for this user, using the profile option of the User Administrator when logged on as Administrator?
    2. If you type in the command lib at the shell prompt, does it tell you that this command cannot be found? If it does then you PATH is not set up correctly and you should either reinstall Visual C++ while logged in as this user, or consult the Environment Variable list below.
    3. Does the home directory for this user actually exist?
    4. Do you have write permissions on the home directory for this user?
    5. Do you have the HOME variable set in your Environment? If not, then consult the list below for more information.
    6. Try deleting the directory lib from your users HOME directory (be careful only to remove this directory).

     


    Why do LISTF or LIST-FILES commands not exist?

    These commands seem to be the first thing that anyone tries on jBASE. In fact we have decided to implement a form of these commands in a future release because of this. However, the reason that these commands do not exist is that they rely on an entry for each hashed file in the MD of an account.

    Firstly, jBASE does not require that you have an MD unless you want a file called MD in which to place PROC commands.

    Secondly, we do not have entries in an MD for files as this would mean that you could not just pick them up in the File manager or explorer and place them in a different directory or even different computer. You would have to mess around with the MD entries in all accounts where you wanted to see the file. With jBASE, you set the Environment Variable JEDIFILEPATH, to include all the directories (local or remote shares), where you think there might be hashed files and jBASE does the rest. We think that the LISTF type commands are a small price to pay for this feature.

    A future release will support the equivalent commands but for now, just use Windows Explorer or the File Manager.

     


    How do I set up an MD/VOC file and Q pointers?

    You will only require an MD/VOC file if you wish to import PROC commands from your legacy system or wish to use Q pointers. An MD file is not needed to create files or to use jBASE commands. An MD file can be used to deny use of certain commands though, should you require this. To set up an MD file, do the following:

    1. Either ACCOUNT-RESTORE into the home directory (which will import you old MD as an ordinary file called, remarkably, MD). Or in your HOME directory use the command: CREATE-FILE DICT MD 7. You can of course make this file bigger if required (see the jstat and jrf commands). Make a link from the MD]D file that is created to MD or just rename the MD]D file as MD.
    2. Create the environment variable JEDIFILENAME_MD (see instructions below) and set it to the absolute path name of the file you just imported or created. If the local directory for this user is d:\users\myuser then you would set the variable as:

    Windows95: set JEDIFILENAME_MD=D:\USERS\MYUSERS\MD

    ... in the autoexec.bat file.

    Windows NT:

    Variable: JEDFILENAME_MD

    Value: D:\USERS\MYUSERS\MD

    Then...

    1. Logout of your user on Windows NT or reboot on Windows 95, then login again;
    2. Start up a jSHELL;
    3. Type in the command: UpdateMD

    You should now find that you have an MD file that behaves like the MD/VOC on your old system. You can file PROCS and Q pointers directly in it. Note that file does not have to be called MD. It can be called anything (e.g. VOC) as long as the it is pointed to by JEDIFILENAME_MD. You will also see that there are entries for the usual LIST, SELECT etc and that if you remove one of these entries, you will disable that command. You can also set Q pointers in this directory.

    To set up Q pointers within a Windows environment you must tell jBASE what your 'account' structure looks like. The easiest way to do this, is to create a Windows users for each of the accounts on your old system and have an MD set up for each one as above. Then you choose a location in which to define a SYSTEM file. We suggest that you keep this file separate from the jBASE installation directory, although if you are repackaging your application you may require a single root directory for everything (note that names and structure of directories are entirely arbitrary and are down to you to decide).

    Assuming here that you decide to create a SYSTEM file (use the CREATE-FILE command) in D:\MyCompany\Globals you then follow the same procedure to inform jBASE of this location as you did to define the MD file. This time however, you set the environment variable JEDIFILENAME_SYSTEM to point at your system file.

    Now that you have a system file, you can use JED or ED to edit new records in it that correspond to your old account names. These records look like this:

    OldAccountName
    001 D
    002 x:\users\directoryname

    Where attribute 2 actually contains the base directory of the user corresponding to OldAccountName. So, if you have a user called Datfiles containing the data files from the old account called DATA and its local (home/base) directory is E:\users\datfiles. Then your SYSTEM entry is:

    DATA
    001 D
    002 E:\USERS\DATFILES

    Then any Q pointers that reference this account name will take attribute 2 from the SYSTEM entry and combine it with the name of the file in the Q pointer to get the actual location of the data file.

     


    What are Environment Variables?

    As in UNIX and DOS, the Windows NT and Windows 95 Systems support the concept of environment variables. In Windows 95 you set these variables from the DOS Shell or in the autoexec.bat file using the set command:

    set VARIABLE=VALUE

    In Windows NT you need to set Environment variables for each user using the System icon in the MAIN group of your logged in user. When you click on this icon you will see a dialog box containing two lists: Environment variables for the System, and Environment Variables for User YourUser. You use this dialog box to create new variables for your user and to modify existing ones by clicking on them. Please note that you will have to exit the System dialogue box and then exit and re-enter the jSHELL for any changes to be seen by jSHELL. We have seen instances where only logging off and back in will guarantee that your changes are seen. This is something we will avoid in the next release by using the NT/95 registry (consult your windows documentation) to look after the environment.

     


    The NT Environment Variables (see below for Win95)

    If your jBASE is installed correctly, then when you check the environment variables (type SET from the command line) you should see the following entries (as a minimum).  Note that the following list assumes you are using Visual C++ 6.0, if you are using a previous release, then refer to the documentation for that release. Also note that X: should be replaced with the name of your jBASE installation drive, and Y: with the installation drive of your Visual C++ system. Please adjust directory names appropriately if you have installed the products in other than their default directories.

    Variable Name
    Value
    JBCRELEASEDIR
    X:\JBASE30
    JBCGLOBALDIR		
    X:\JBASE30
    HOME
    HomeDrive%%HomePath%
    Path
    X:\JBASE30\BIN;X:\JBASE30\LIB;
    Y:\Program Files\Devstudio\vc\bin;
    Y:\Program Files\Devstudio\sharedide\bin
    Lib
    Y:\Program Files\Microsoft Visual Studio\VC98\include
    Include				
    Y:\Program Files\Microsoft Visual Studio\VC98\include
    Terminfo
    X:\JBASE30\MISC

     

     


    The Windows 95/98 Environment Variables

    The Windows 95 release of jBASE already relies on the registry for many of its environment variables. However, you should still set up the following entries in your autoexec.bat file. Note X: should be replaced with the name of your chosen home drive.

    set HOME=X:\MyHome

    Note that on Windows 95 there is no concept of defining a Home/Local directory for a user, therefore you must explicitly create a home directory and define it as above. If you still have problems, then you should use the set command in your autoexec.bat file to define the Path etc as per the NT variables described above.