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
You can now install jBASE. This should be done as a user that has Administrative privilege.
Section 2 Installation instructions for Windows 95
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.
Section 3 - Installing the diskettes (NT and 95)
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.
set JBCRELEASEDIR=c:\jbase20 set PATH=%PATH%;c:\jbase20\bin SP-NEWTABjBASE 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.
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...
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.
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.
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