SYSTEM FILE


The location of the jBASE SYSTEM file is determined by the JEDIFILENAME_SYSTEM environment variable. The environment variable is usually setup when the user logs on. By default, jBASE uses a hash file named SYSTEM, in a subdirectory named src, in the jBASE release directory as defined by the environment variable JBCRELEASEDIR.

Use of the SYSTEM file also depends upon the setting of the environment or registry variable JEDIFILENAME_MD, which describes the users MD/VOC file. This environment variable should be set to the users required MD file. e.g. To use an MD file in the users home directory set the environment variable, JEDIFILENAME_MD to $HOME/MD or %HOME%\MD.

In its minimum form, a record in the SYSTEM file must contain two fields. Field 1 contains the character "D" to specify a local account, and field 2 contains the absolute path of the account directory. For example:

ACCOUNTX
001 D
002 C:\users\accountx or /accounts/accountx

Fields 7, 11 and 20 through 37, of the SYSTEM record, are used by the jBASE LOGTO and PASSWORD commands. All other fields are reserved. The full format of a SYSTEM record is as follows and will be described in subsequent sections on this page:

ID:  AccountName
001 Type
002 Absolute Account Path
003 Reserved
004 Reserved
005 Reserved
006 Reserved
007 Encrypted Password (optional)
008 Reserved
009 Reserved
010 Reserved
011 Optional Parameters for LOGTO (use attributes 20 through 37 on jBASE 4 and jBASE 5)
012 - 019 Reserved
020 ESYSTEM_START
021 JBCEMULATE
022 HOME
023 JBCDEV_BIN
024 JBCDEV_LIB
025 PATH
026 JBCOBJECTLIST
027 JEDIFILEPATH
028 JEDIFILENAME_MD
029 JBC_TCLRESTART
030 JBC_ENDRESTART
031 JBCRESTARTPROG
032 JBCLOGINPROG
033 Reserved
034 JBASE_I18N
035 JBCPORTNO (multi-valued range)
036 OTHER ENVIRONMENT VARIABLES (multi-valued)
037 ESYSTEM_END
 

ENCRYPTED PASSWORD (Field 7)

This optional field should only be maintained through the jBASE PASSWORD command. The PASSWORD command prompts for an Account Name which must be a valid entry in the SYSTEM file (i.e. the file defined by the JEDIFILENAME_SYSTEM environment variable). The password must be entered twice for verification that it was entered correctly. Be aware that entry of this password is case sensitive (e.g. "MyPassword" is different than "mypassword"). 

 

OPTIONAL PARAMETERS (Field 11)

The optional parameters field is used by the jBASE LOGTO command. This field is only fully supported on jBASE 3. It allows the environment of each account to be set up during the LOGTO event. When using the -X option multiple parameters or parameters with spaces must be enclosed in single (') or double quotes ("). See EXAMPLES below.

The optional parameters for Field 11 are:

-A accountName parsed into JBCLOGNAME
-H directory parsed into HOME
-M filename parsed into JEDIFILENAME_MD
-V termtype parsed into TERM
-X Environment Variable overrides any previous specifications
UNIX only
-E programName parsed into JBC_ENDRESTART
-L language parsed into LANG
-R programName program to restart after logoff ( jLOGINMSG)
-S programName program to execute at logon. Usually jsh -s jsh
-T programName parsed into JBC_TCLRESTART

Note that while some field 11 functionalty is maintained for backward compatibility, it is strongly recommended to use the Extended SYSTEM File values as there is no guarantee that all field 11 functionality will work correctly on jBASE 4 and jBASE 5.

FIELD 11 EXAMPLES

-A Dev
Sets JBCLOGNAME to 'Dev'

-H d:\jHOME                           Windows
-H /usr/home                         Unix
Sets the HOME directory

-V vt220
Sets the terminal type to 'vt220'

-X "JBCDEV_BIN=d:\jHOME\bin JBCDEV_LIB=d:\jHOME\lib JBCOBJECTLIST=d:\jHOME\lib"
-X "JBCDEV_BIN=/usr/home/bin JBCDEV_LIB=/usr/home/lib JBCOBJECTLIST=/usr/home/lib"
Sets the environment variables JBCDEV_BIN, JBCDEV_LIB and JBCOBJECTLIST. Note that the entire environment variable set is enclosed in double quotes.

All of the above examples could be included in attribute 11 of a system record as follows (Windows example):

-A Dev -H d:\jHOME -V vt220 -X "JBCDEV_BIN=d:\jHOME\bin JBCDEV_LIB=d:\jHOME\lib JBCOBJECTLIST=d:\jHOME\lib"

As of jBASE 3.4.3, system file entries allow the use of recursive environment variables, i.e. %VAR% on Windows and $VAR on unix. For example (Unix example):

-X "JEDIFILEPATH=$JEDIFILEPATH:/home/files PATH=$PATH:$HOME/bin"

This functionality is only available for use with the -X option. Use caution with this feature as each subsequent LOGTO will cause the environment variable to grow disproportionately.

 

EXTENDED SYSTEM FILE VALUES

The SYSTEM File of jBASE 4 and jBASE 5 has 16 new attributes that are used to define the assignment of environment variables in the LOGTO process. These values are stored in attributes 21 through 36 and are encapsulated by attribute 20, "ESYSTEM_START", and attribute 37, "ESYSTEM_END".

020 ESYSTEM_START
021 JBCEMULATE
022 HOME
023 JBCDEV_BIN
024 JBCDEV_LIB
025 PATH
026 JBCOBJECTLIST
027 JEDIFILEPATH
028 JEDIFILENAME_MD
029 JBC_TCLRESTART
030 JBC_ENDRESTART
031 JBCRESTARTPROG
032 JBCLOGINPROG
033 JBCLOGNAME
034 JBASE_I18N
035 JBCPORTNO (multi-valued range)
036 Other Environment Variables (multi-valued)
037 ESYSTEM_END

For attributes 21 - 35 simply specify the value.
For attribute 36 specify: env_var1=valueX]env_var2=valueY]...       ] = value mark

In most cases, if a value is not included then the environment variable will remain the same as it was prior to the LOGTO. However, it is best to assign values explicitly rather than relying on this behavior.

EXAMPLE

001 D
002 C:\accounts\payables
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020 ESYSTEM_START
021 jbase
022 C:\accounts\payables
023 C:\accounts\payables\bin
024 C:\accounts\payables\lib
025 C:\accounts\payables\bin;%PATH%
026 C:\accounts\payables\lib
027 C:\accounts\payables;C:\globals
028 C:\globals\MD]D
029
030
031
032
033
034
035
036 JBCNETDIR=C:\globals\jrfs]JBCNETACCESS=C:\globals\jrfs\netaccess
037 ESYSTEM_END

 

Notes

If there is a conflict between Field 11 and the Extended SYSTEM File Values then the Extended SYSTEM File Values will take precedence over Field 11.

The Extended SYSTEM File values (ESYSTEM_START+1 thru ESYSTEM_START+15) are held internally within the jBASE process. These settings are NOT passed to the Operating System where 'expansion' is performed. In order to set environment variables containing references passed to the Operating System for 'expansion', use ESYSTEM_START+16.

Environment variables set in ESYSTEM_START+16 override any corresponding values set in ESYSTEM_START+1 thru ESYSTEM_START+15.

Certain environment variables are controlled by LOGTO (e.g. HOME) and should not be assigned in ESYSTEM_START+16.
 


ACC