jBASE 3.0 for Windows NT and Windows 95


Installation Instructions

PLEASE READ CAREFULLY

Here is all you should need to know to get going with jBASE 4 Windows. If you are installing on Windows NT then read section 1 of this document. If you are installing on Windows 95, then skip section 1 and go on to section 2.

If your read through this section and still find that your system does not work, then you should try the Windows Troubleshooting and FAQ.


Section 1 - Additional instructions for Windows NT

  1. Before installing jBASE you should create yourself a development user from which to compile your programs. Ensure that you create a local directory for the user rather than using c:\users\default, this user should set an environment variable called HOME to this directory (see Appendix A "Environment Variables"). This user should either install Visual C++ version 4.0 or higher or set up the environment variables for PATH, LIB and INCLUDE accordingly

You can now install jBASE. This should be done as a user that has Administrative privilege.

Go on to section 3.


Section 2 Installation instructions for Windows 95

  1. Before Installing jBASE on Windows 95, you should create a working (HOME) directory for jBASE using the Explorer, then edit your autoexec.bat file as so (this example assumes a directory name of HomeAccount).

set HOME=c:\HomeAccount

(see Appendix A "Environment Variables").

This is where any ACCOUNT-RESTORE etc. will take place by default. Your Programs will be compiled in this directory too. You should now reboot to ensure this variable is installed.

Note that you should not load any data into the jBASE install directory.

Go on to section 3.


Section 3 - Installing the diskettes (NT and 95)

  1. Insert Disk 1 of the installation set and then run A:\SETUP.EXE (Start->Run). Answer any questions you are asked (there is no quiz at the end ;-) ). Once the installation has completed, it is wise to log off and then back in again in order that all changes take effect.
  2. When installation is complete you will see a new Program group and a number of new icons.
  3. You can now click on the jSHELL icon, which will start a jBASE Shell window. From here, things are fairly simple: T-ATT, ACCOUNT-RESTORE, PORTBAS, BASIC, CATALOG. The only new step for you is to run the PORTBAS program against each file that contains BASIC code, see Appendix B "Compiling Programs", for further information.

When the jsh starts up, it will display a prompt of the form

jsh jBASE ~ -->

this represents

<ShellMode> <UserName> <Path> -->

The <UserName> is the name of the NT or Windows 95 user, this can be changed by setting the environment variable JBCLOGNAME, but this must be done before running the jsh (see Appendix A).

Note: if your Windows 95 machine is not part of a network, then the username will be displayed as "unknown", set the JBCLOGNAME variable if you wish to change this. The <Path> is the current Windows path, the shorthand notation of '~' is used to indicate the HOME directory (the pwd command will show you the actual path here). The <ShellMode> is the current mode that the jsh is in, see the jBASE Shell Reference for a full description.

  1. Before you start loading accounts though, please take a moment to revue the instructions in C:\jBASE20\dev\device_notes (or wherever you installed it), and check that your tape devices are configured correctly (ie they must be working correctly under Windows). The standard devices are FLOPPY0 for the 3.5" floppy, SCT0 for Cartridge tape, and DAT0 for 4mm DAT.
  2. If your application requires spooler functionality, then you should ensure that the Windows NT spooler has a default printer assigned. Then you need to initialise the spooler using the SP-NEWTAB command, for which you must be the Administrator or have Administrator privileges. From a DOS shell you would type
set JBCRELEASEDIR=c:\jbase20

set PATH=%PATH%;c:\jbase20\bin 

SP-NEWTAB

jBASE uses the native Windows spooler to actually print the jobs, and so there must be at least one printer defined, which should be set as the default printer. The SP-NEWTAB will initialise the jBASE spooler, and create a single queue called STANDARD, with the device type as NT (even on Win95). This device type will spool any print jobs directly to the Windows default printer, therfore it is not possible to have HOLD jobs on this type of Queue.

To add another Queue or change the STANDARD one, use the SP-STATUS command and set the queue definition to

PROG lp {-d PrinterName}

where PrinterName is the name of the printer on Windows, if this name contains spaces, then it must be surrounded by quotes, eg

PROG lp -d "My Printer"

If "-d PrinterName" is not specified, then the default printer is used. jobs printed to this type of queue, will go onto the jBASE spooler first before being despooled to the Windows spooler, and so it is possible to set up HOLD jobs on this type of queue.

  1. You should be able to follow the manuals for anything else. However please be aware that the manuals often assume a UNIX environment and although this is very similar there are occasions when you need to perform the NT equivalent functionality. This should be fairly obvious (such as ENVIRONMENT variables, see Appendix A).

Good Luck in your new world of Windows!


Appendix A - Environment Variables

jBASE makes extensive use of environment variables, and so it is important that they are set correctly. When jBASE looks for the value of variable, it first uses the normal environment, if this is not set, it will then use the registry to locate them (thus the registry entries are overridden by the environment). jsetkey is the utility that we use to access the jBASE registry entries, and is used to set/display and delete values, see below for a description.

A normal environment variable can be set on a temporary basis using the set command:

set EnvVar=value

The values of all environment variables can be displayed by typing the set command without any arguments, or individual ones with the echo command, although the variable name must be surrounded by '%' chars when referencing it eg:

echo %JBCRELEASEDIR%

To set them up on a more permanent basis depends on which operating system you are using...

 

Windows 95

Environment variables are set by adding an entry to the AUTOEXEC.BAT file, this file is read when the system is booting up, and so you must reboot in order for any changes you have made to take effect. Locate the AUTOEXEC.BAT file using Explorer, click the right button, and select EDIT. For each variable enter SET EnvVar=Value on a separate line, save the file and reboot.

 

Windows NT

From the Control Panel select the System icon (The control panel is in My Computer, or Start->Settings), and select the Environment tab. There are two types of variables "System" and "User". The system entries are global and apply to all users (you must be an administrative user to update these), the user ones as you would expect are the current user. Enter the EnvVar name in the Variable box, and the Value into the Value box (now there's a suprise), and click set. The new setting should become effective when you next start us a shell.

 

jBASE registry settings

When jBASE is loaded, it creates a registry key in

HKEY_LOCAL_MACHINE\Software\JAC\3.0\CURRENT_CONFIG

and then sets some default values such as JBCRELEASEDIR and JBC_PATCH_LEVEL. The first time a user uses any jBASE command, a second registry key is created in

HKEY_CURRENT_USER\Software\JAC\3.0\CURRENT_CONFIG

and all the values from HKEY_LOCAL_MACHINE are copied. From then on, jBASE commands will use the HKEY_CURRENT_USER values which are based on the NT/Win95 user account.

In its normal operation jsekey will display/set/delete entries in HKEY_CURRENT_USER (ie your own values), "jsetkey -?" will show the options,

Usage:

jsetkey <KeyName>=<Value> // set Key to the specified value

jsetkey -b <KeyName>=<DataFile> // set binary Key to data from a file

jsetkey <KeyName> // display value

jsetkey -d <KeyName> // delete Key

jsetkey // display all keys

However, admin users can set the HKEY_LOCAL_MACHINE (the "master" copies), by also specifying the "-m" option

Eg

jsetkey -m JBASE="is GREAT"	// set a value

jsetkey -m -d OLDVALUE	// delete a value

jsetkey -m	// display all values


Appendix B - Compiling your programs

Once you have loaded your files into your account you are then ready to compile the programs. However, there before you start it is necessary to run a programs called PORTBAS (type PORTBAS ? for the options). This utility will scan through the specified file, and attempt to convert anything that may not compile under jBASE. The main incompatibility issue, is that jBASE does not allow the use of keywords as variables for example,

CRT = "Hi"

is illegal. PORTBAS therefore converts variables of this form into capitalised names

Crt = "Hi"

The original file will be copied into a subdirectory called PortSave.

You can then run BASIC and CATALOG on the ported file. To aid this conversion/compilation process there are two utilities that can be used jConvertFile, which will save the file into PortSave, and then run PORTBAS on the file. This will produce a report and write a record into PortSave called "key_rpt_<FILENAME>

-->jConvertFile MYFILE

-->jed PortSave key_rpt_MYFILE

The next utility will compile the ported file, and again produce a report in PortSave jbc_rpt_<FileName>. It also produces a list of all files that had compilation errors in PortSave jbc_err_<FileName>, thus you can select this and manually check each file that failed to compile

-->jConvertFile MYFILE			// compile the files

-->jed PortSave jbc_rpt_MYFILE		// review the report

-->FORM-LIST jbc_err_MYFILE		// select the files that failed

-->jed MYFILE				// edit the programs

From jed you can then do an "<Esc>FIB" file and BASIC, and then check through the compilation errors.

When this is complete, you can then CATALOG your programs. The CATALOG command, will take the object file produced by the compilation, and in the case of a main program, it will produce an executable in the bin subdirectory of %HOME%

CATALOG MYFILE TEST

This will produce an executable file (assuming HOME is c:\users\jBASE)

c:\users\jBASE\bin\TEST.exe

Which you should then just be able to run.

In the case of a subroutine, the CATALOG command will combine it with other subroutines into a DLL (Dynamic Link Library), in the lib subdirectory. This will then be automatically loaded by jBASE when called from a program, and is shared among all users.

CATALOG MYFILE SUB1

this will produce a dll (assuming HOME is c:\users\jBASE)

c:\users\jbase\lib\lib0.dll

Note: a number of subroutines will be placed into each DLL, see the file jLibDefinition that is created in the lib subdirectory for more details.


http://807199.827977/r5/knowledgebase/howto/general/windows/wininstall.htm last modified on 06/19/09 05:29 AM