This advisory details the installation procedure for jBASE version 3.3 on Linux A short guide to getting started with jBASE is included.
jBASE 3.4 is the current release of jBASE. Support for previous versions of jBASE on Linux is now withdrawn unless you have paid for a support contract. For installation of jBASE 3.4 view the jBASE 3.4 Installation Advisory
All support and bug reports should be emailed to devsup@jBASE.com
All trademarks are Acknowledged.
Pre-requisites
Installation
Tape Devices
User Configuration
Imported Applications
Systems Housekeeping
Performance Tuning
Spooler Installation
Documentation
Getting started with jBASE
To load jBASE on Linux 6.2 the following requirements must be met:
Unless you have purchased the AT&T version of ksh, you must download pdksh, a korn shell clone that is in the public domain.
If you have RedHat or Mandrake, you can download the Intel version of pdksh.
For other Linux distributions and platforms, try searching for "pdksh" on http://www.rpmfind.net
or http://rpmfind.net/linux/rpm2html/search.php?query=pdksh
Or try the pdksh home page .
If you have not already done so you will download the appropriate '*tar.gz' file from the downlad site below. The Red Hat Linux file, for example is 'jbase.3.3.10.LINUXRH6.2.tar.gz' This is a gzipped tar of the jBASE system. Once you have this file on Linux somewhere, you may follow this advisory.
jBASE for Linux is currently only available at the jBASE Software Web site http://www.jBASE.com/download/
There needs to be an administrative user created to hold the jBASE files. This can be created using the /usr/sbin/useradd command as the root user. The details of the user are:
For the remainder of this installation advisory, we will assume that the user name chosen was 'jbase'. Further examples later on will use this name explicitly. If you choose an alternate name, simply substitute the name you chose with 'jbase'.
Create this admin user now…
Once the jbase user has been created, login to this account and copy or move the archive file that was loaded from the web site to the home directory of this user. Then run the following commands for the file you have downloaded ( the example uses the Red Hat Linux 6.2 file):
These commands will extract the jBASE executables, and perform some initial set-up. The set-up basically consists of the following steps:
In order to access the devices from jBASE it is necessary to modify a few files. These files can be found in the sub-directory dev of the jBASE admin account. Notes on the Layout of these files are given in the file DEVICE_NOTES in this directory.
You may want to create a default device "0" to be referenced by the T-ATT command. For example, to make the Streaming Cartridge Tape (SCT0) the default device, type the following commands as user jbase:
cd $HOME/dev
cp SCT0 0
Thus, when you execute either of the following commands:
T-ATT 0
T-ATT
The tape will be attached according to the file in /usr/jbc/dev/0. Further details can be found in the man page for the T-ATT command. User accounts that have been set up with the iju command (see next section), should have their MANPATH set up automatically to access the jBASE man pages.
Alternatively type the following:
MANPATH=/usr/jbc/man; export MANPATH
man T-ATT
It may also be necessary to modify the permissions of the Linux device files. To do this, log in as root and type the following:
ln -s /dev/fd0 /dev/rfd0
chmod a+rw /dev/*fd0 // for the 3.5" floppy diskette
chmod a+rw /dev/*st0 // for a 0.25" tape cartridge
Any UNIX user can begin to use jBASE with only the minimum number of changes to their environment.
The best way to configure a user is to amend the login script, usually .profile. There is a program called IJU supplied with jBASE that will create or modify a .profile script. This program is usually copied to /usr/bin so that it is normally in the users default PATH. So, from your users login shell prompt, perform the following:
% IJU
This will create or append an existing .profile script with all the required environment variables. The IJU program will describe each question in full, allowing you to configure a user as you require. If you edit the new or modified .profile later, comments in the script will show you for what purpose each environment variable is used. Users upgrading to a new release should re-execute the IJU script.
The user simply needs to set the following environment variables as a minimum if they do not wish to use the IJU script:
PATH should be changed to include directories /usr/jbc/bin and $HOME/bin.
LD_LIBRARY_PATH should be set to /usr/jbc/lib
MANPATH should be set to include /usr/jbc/man
These variables need to be exported. For example, if running the bash shell, you would enter:
% export PATH=$PATH:/usr/jbc/bin:$HOME/bin
% export LD_LIBRARY_PATH=/usr/jbc/lib
% export MANPATH=$MANPATH:/usr/jbc/bin
The environment variable JBCCONNECT needs setting at some point to enable data to be passed between jBASE applications. This is normally set up in the start-up script (usually .profile) as follows :
export JBCCONNECT=`jbcconnect`
There are other environment variables you can change for things such as Spooler directories and so on. The best way to learn about these is to examine the output of the IJU script or look at the man pages for jbc.
Users importing applications, i.e. accounts restored from account saves, should execute the following command in the imported directory. This will overlay the imported MD/VOC with the jBASE MD entries.
This command should also be executed for users upgrading to a new release.
There is little to do in terms of system housekeeping for jBASE, apart from what you would do for a normal UNIX user.
jrestore -h
jbackup -h
A jBASE application will work at 100% efficiency for most of the time without any special tuning. The only thing that can severely affect a jBASE application is very badly sized files or lack of system resources (such as memory). The latter can be checked for using various options to the sar UNIX utility. The former, the badly sized files, can be addressed in one of two ways:
1. Use the jstat program to check your file sizes. For example:
% jstat CUSTOMERS
will show you the statistical information for the CUSTOMERS file.
2. Use the jrf file resize program when no active jBASE applications are modifying the files. You can specify a file name with jrf, or just execute jrf by itself, and it will re-size all the files in the current directory.
If you have a lack of memory then you can only add more or free resources from memory hogging processes.
The Spooler needs to be initialized before any of the Spooler commands can be executed. This is done by performing the following as root user :
login: root
Password:
# PATH=$PATH:/usr/jbc/bin
# export PATH
# LD_LIBRARY_PATH=/usr/jbc/lib
# export LD_LIBRARY_PATH
# :SP-NEWTAB
You will be prompted to allow you to change four defaults, specifying group names to use, directory to put the Spooler in and so on. For most installations the defaults will be the best configuration, and you should simply enter C at the prompt.
The procedure will create the Spooler tables and data in any directory you want, the default being /usr/jspooler. Note that if you choose a directory other than /usr/jspooler, then you need to change the JBCSPOOLERDIR variable in your .profile to reflect the new directory.
The procedure will create a default form queue STANDARD, whose device name is /dev/lp. It will also initialize the queue to be active, so you can start printing straight away.
If you already have a device on /dev/lp, then immediately after Spooler installation use option 4 from the SP-STATUS menu to configure the Spooler device name to another device.
If you already use the UNIX supplied Spooler, then the two can live in harmony by sending all the jBASE Spooler output to the Unix Spooler. This is done by using option 4 from the SP-STATUS menu , and you should change the device type to PROG and the device name to lp. By doing this, any data in a jBASE application that is sent to the STANDARD queue, is re-printed via the UNIX Spooler program lp.
Use program SP-STATUS to create, display and modify printer form queues, and use program SP-JOBS to manipulate print jobs.
A printer queue is normally enabled via the SP-RESUME command like this
% SP-RESUME STANDARD
or by using option 7 from the SP-JOBS menu. You should create a script in the /etc/init.d directory to enable all your form queues at system boot time using multiple invocations of SP-RESUME.
Alternately, use the :REST-SPOOLER command to resume all defined printer queues. Remember, these commands need to have the environment variables LD_LIBRARY_PATH and PATH set up and exported as shown in previous examples, before they will work properly.
Defaults for the printer, such as banners, width and so on, can be found in the configuration file /usr/jbc/config/jspform_deflt and /usr/jbc/config/jspxl_deflt. They contain many notes on the usage of these files. You can either edit these default configurations, or change the form queue to use different configurations.
Option 3 from SP-STATUS changes the form queue definition from /usr/jbc/config/jspform_deflt to /usr/jbc/config/jspform_xxx where xxx is the new form name associated with the printer form queue.
Option 8 from SP-STATUS allows you to change any character translations from the default of /usr/jbc/config/jspxl_deflt to /usr/jbc/config/jspxl_xxx where xxx is the translation name associated with the printer form queue.
Note you can also change the defaults for printer width and depth using the TERM command.
The documentation for jBASE comes in three formats.
The first is in the form of on-line documentation available through the man command. The use of the IJU command described later on will set up the environment variable MANPATH so that the on-line documentation is accessible through the man command.
The second format is on a separate set of ZIP files downloadable from the jBASE Software web site.
If you do not have Word for Windows or a word processor that will convert from Word format, you can get the free Microsoft Viewer for windows from Microsoft's Web site.
The on-line documentation is a subset of this documentation and is usually all you will need.
The third format is web based and can be accessed at http://www.jBASE.com/knowledgebase. The knowledge base can be fully indexed and can be searched for the required key word.
The following is an example of creating and running a small application under jBASE. There are migration tools described in the documentation to enable you to import existing applications. However, as a new jBASE user, it would be advisable to try to learn to walk before you can run.
It is assumed you have already performed the following, all of which is detailed earlier in this installation advisory.
You can now log back on to your development account, which we have called jbcdev for example purposes. If you have chosen to run the jsh as your login shell (or execute it from your .profile), then the following prompt appears :
jsh jbcdev ~ -->
* Note that Pick users should probably start with the jsh as it allows a TCL look and feel to be created. Later you may wish to use a standard Unix shell.
Assuming your TERM statement is correct, you can use F1, F2, F3 and F4 to change the shell emulation from jsh (where characters such as * are not expanded), to other UNIX shell emulation's. If your terminal settings are not correct, then change them using the two commands (the examples assume a vt220 screen):
TERM vt220
TERM=vt220
The first changes the TERM settings for jBASE applications, the second for UNIX applications. Please ensure that your terminfo definition is correct for the terminal you are trying to use. Wyse-50 is a particular bad definition usually and apart from the function keys, it is confused about the difference between kbs=\b and cub1=\b
You can change the prompt for your jsh to be whatever you like. For example:
jsh jbcdev ~ --> set jps1 $%N:
:
For each of the following steps, we will give the development manner for compatibility mode, and the alternate UNIX mode. These steps can be interchanged depending upon the level of UNIX experience and personal preferences of the user.
The compatible mode will assume you are using the jsh and the prompt is 'jsh jbcdev ~-->' , and for the UNIX mode we assume you are using the bash shell, whose prompt is 'jbcdev ~ >'.
In both cases, the ~ sign denotes the current working directory, and the prompt may change depending upon what directory you are in.
jsh jbcdev ~ --> CREATE-FILE BP 1,1 23,1
OR
jbcdev ~ > mkdir BP
jsh jbcdev ~ --> ED BP PROG1
New record
PROG1
TOP
.I
000+ OPEN "CUSTOMERS" TO FDESC ELSE STOP 201,"CUSTOMERS"
000+ PRINT "Enter customer ID " :
000+ INPUT CustomerId
000+ READ Record FROM FDESC,CustomerId THEN
000+ PRINT "This customer exists"
000+ END ELSE
000+ PRINT "!! No such customer !!"
000+ END
000+ STOP
000+
.FI
Record 'PROG1' written to file 'BP'
OR
jbcdev ~ > cd BP
jbcdev ~/BP > vi prog1.b
I
OPEN "CUSTOMERS" TO FDESC ELSE STOP 201,"CUSTOMERS"
PRINT "Enter customer ID " :
INPUT CustomerId
READ Record FROM FDESC,CustomerId THEN
PRINT "This customer exists"
END ELSE
PRINT "!! No such customer !!"
END
STOP
<ESCAPE> :wq
OR
Use the 'jed' editor in either mode . For example , use jed BP PROG1 or cd BP ; jed prog1.b
jsh jbcdev ~ --> BASIC BP PROG1
jsh jbcdev ~ --> CATALOG BP PROG1
OR
jbcdev ~/BP > jbc PROG1.b -o PROG1
jsh jbcdev ~ --> CREATE-FILE CUSTOMERS 1 19
OR
jbcdev ~/BP > cd
jbcdev ~ > CREATE-FILE CUSTOMERS 1 19
jsh jbcdev ~ --> ED CUSTOMERS 100 200 300
New record
100
TOP
.FI
Record '100' written to file 'CUSTOMERS'
New record
200
TOP
.FI
Record '200' written to file 'CUSTOMERS'
New record
300
TOP
.FI
Record '300' written to file 'CUSTOMERS'
OR
(Note that file CUSTOMERS is a jBASE hashed file, and the normal UNIX editors such as 'vi' or 'emacs' cannot access records inside formatted files.)
jbcdev ~ > jed CUSTOMERS 100 200 300
For each item , enter <ESCAPE> FI <RETURN>
jsh jbcdev ~ --> PROG1
OR
jbcdev ~ > BP/PROG1
If you have come this far without problems you should be ready to start porting your programs:
T-ATT <device>
ACCOUNT-RESTORE .
PORTBAS BP # Do this for all files with BASIC code in them
BASIC BP
CATALOG BP
Last updated: November 7 2000