set variable=value echo %variable%
Variables can be configured in the System environment for all users, and/or on a per user basis via the user environment. Additional variables for jBASE can also be added to the current user configuration in the Windows registry.
Windows variables are usually configured in the System Properties panel.
export variable=value echo $variable
This works for all shells, although some shells (i.e. ksh) allow "export variable=value".
Variables are usually configured in the .profile/.bash_profile of the user login directory. Global variables can be added to the "/etc/profile" script.
The jBC functions PUTENV() and GETENV() can be used to manipulate environment variables. For example:
ok = PUTENV(envar=x) ok = GETENV(envar)
Some environment variables can only be set before jBASE initialization. jBASE initialization occurs when the first jBASE program is executed on a particular PORT number.
The jBASE initialization process reads through the environment entries looking for possible variables required by jBASE. This process provides a substantial performance improvement as the state of these environment variables are saved for subsequent jBASE executions. These states continue to be valid as long as the PORT number is still attached to a process. Some environment variables can be changed by subsequent program execution. The state of these variables are imported back into the state table after program execution.
Certain jBASE programs expect jBASE initialization to have been previously performed otherwise re-initialization will occur and resources expected by the executing program will have been removed.
T-ATT requires a PORT number against which it saves the tape device assignment.
SP-ASSIGN requires a "PORT" with which to save assignment status for print jobs.
READNEXT in a program after SELECT/GET-LIST.
All jBASE programs execute in the same process unless explicitly executed via the @IM:"k" construct.
INITIAL ENVIRONMENT VARIABLES
|PATH||pathnames of executables|
|HOME||pathname of user home directory. Many defaults rely on this environment variable|
|LD_LIBRARY_PATH||pathnames of system libraries (Linux)|
|LIBPATH||pathnames of system libraries (AIX)|
|LANG||language type (UNIX only)|
|JBASE_LOCALE||setting to determine collation sequences for internationalization and secondary indexes|
|JBASE_TIMEZONE||setting to determine the timezone to use for UTF8 timestamp conversion into local time for display|
|JBASE_DATE_FORMAT||specifies the format of how dates are converted to/from internal and external date representations|
|LC_ALL||will override a specified list of locale settings (UNIX)|
|TERM||specifies terminal type as per terminfo database|
|TERMINFO||specifies directory for terminal settings|
|JBCPORTNO||forced Port number for use by user; automatically allocated unless this is set|
|JBCLOGNAME||user name to use in-place of login id|
|JBCGLOBALDIR||pathname of jBASE global configuration directory|
|JBCRELEASEDIR||pathname of jBASE release directory|
|JBCDATADIR||pathname of any configured databases and default directory for the jBASE spooler|
|JBCEMULATE||emulation to be used for this user|
|JEDIFILEPATH||directory Paths of application files location|
|JEDIFILENAME_MD||pathname of file to be used for Master Dictionary entries|
|JEDIFILENAME_SYSTEM||pathname of file to be used for SYSTEM entries|
ADDITIONAL jBASE ENVIRONMENT VARIABLES.
Controls whether or not to log jBASE messages to the $JBCRELEASEDIR/tmp/jbase_error_trace file.
|JBASE_ERRMSG_ZERO_USED||controls the behavior of jBC programs when an uninitialized variable is encountered|
|JBASE_ERRMSG_NON_NUMERIC||controls the behavior of jBC programs when a numeric operation on a non-numeric variable is encountered|
|JBASE_ERRMSG_DIVIDE_ZERO||controls the behavior of jBC programs when the divisor of an arithmetic division is zero|
|JEDIENABLEQ2Q||set to 1 to force detection of Qptr to Qptr|
|JEDI_DISTRIB_DEFOPEN||set to 1 to defer OPENs of distributed file parts|
|JEDI_SECURE_LEVEL||set security level for j3 and jPLUS files|
Level 1. No flush
Level 2. Flush on link modification (default)
Level 3. Flush after update (network failure)
|JEDI_INDEX_MMAP_ON||set to force use of memory mapping on indexes when updating memory mapped files|
|JBC_TCLRESTART||set to command to execute instead of shell|
|JBC_ENDRESTART||set to command to execute after end from debugger|
|JBCRESTARTPROG||set to command to be executed after off (Linux/AIX)|
|JBCOBJECTLIST||set to alternate path(s) for user subroutine libraries|
Windows - %HOME%\lib
UNIX - $HOME/lib
|JBC_BLOCK_SYSTEM14||set to 1 to force a 100 millisecond delay on SYSTEM(14) calls.|
|JBCDEV_BIN||set to alternate path to catalog executables.|
Windows - %home%\bin
UNIX - $HOME/bin
|JBCDEV_LIB||set to alternate path to catalog libraries.|
Windows - %HOME%\lib
UNIX - $HOME/bin
|JDIAG||provides a variable amount of trace information|
|LIB||specify additional paths for linking with libraries. (Windows only)|
|INCLUDE||specify additional paths for header files|
|JBASEUNIQUE||specify alternate jBASE work file|
|JBCERRFILE||specify alternate error message file|
|JBCSPOOLERDIR||specify alternate spooler directory|
|JBCSPOOLER_JOBRESET||controls how the print job counter is reset|
|JBC_DESPOOLSLEEP||specify the interval for despoolers to check for queued jobs|
|JBC_INVERT_ALPHA_CHARS||set to 1 to invert the case of alphabetic characters entered with INPUT.|
|JBC_OLD_SP_EDIT||specifies the alternative SP-EDIT format|
|JBCLISTFILE||specify alternate select list file|
|JBCLISTID||force user account name to be part stored list ids.|
|JBCECHO||set to 1 to force echo on|
|JBCSCREEN_DEPTH||specify alternate terminal depth (valid only on jBASE 3.x)|
|JBCSCREEN_WIDTH||specify alternate terminal width (valid only on jBASE 3.x)|
|JBCPRINTER_DEPTH||specify alternate printer depth (valid only on jBASE 3.x)|
|JBCPRINTER_WIDTH||specify alternate printer width (valid only on jBASE 3.x)|
|JBCPRISM||set hard coded prism sequences (Windows only)|
|JBC_STDERR||set to 1 to redirect standard error to standard out. Useful for CAPTUREing output that would normally be sent to the screen.|
|JBCCREATEFLAGS||set to 0, 1, 2 for output redirection. (Windows only)|
0 Direct to current console (default)
1 Direct to new console
2 Detached for no console
|JBC_SQLLIBS||set alternate SQL libraries for embedded SQL|
|JBC_SQLPREPROC||set alternate SQL pre-compiler command|
|JBC_SQLFIXEDLEN||set to use fixed length types for char input strings|
|JBCDEFDICTS||specify alternate default dictionary files|
|JEDI_PREFILEOP||parameters take precedence before command line|
|JEDI_POSTFILEOP||parameters take precedence after command line|
For example, to create all files from a jbackup to JP (jPlus) files and as Case Insensitive, set the following environment variable before doing the jrestore. Note the use of double-quotes on Unix when there is more than one setting.
export JEDI_PREFILEOP="TYPE=JP CASE=OFF" (UNIX) set JEDI_PREFILEOP=TYPE=JP CASE=OFF (Windows)
|JBCNETACCESS||specify the location of the jRFS security access file|
|JBCNETDIR||specify the location of the jRFS configuration files|
|JRFS_REMOTE_JQL||set to 1 to allow jQL to be executed remotely|
|JRFS_LOCALPATH_JQL||set to 1 to allow remote pointer to have a different name than the remote file|
|JRFS_SERVERNAME||allows the jRFS client to override the service port|
|JRFS_HOSTNAME||allows the jRFS client to override the target host|