KCML environment variables
Each environment variable is displayed along with the description, if the variable can also be changed with one of the $OPTIONS, $OPTIONS LIST or $OPTIONS RUN system variables then the variable and byte numbers are also shown.
Unless specified all of the following variables are available on all KCML versions. Some of the variables listed here are general UNIX environment variables that have an effect on UNIX versions of KCML only.
ATREPLACE |
Replacement characters for the @ sign at the beginning of variables when compiling ASCII source when importing from environments where the @ prefix does not denote a global variable. Byte 28 of $OPTIONS RUN specifies the character to be used, normally an @ sign, if set to HEX(00) the value of this environment variable is used.
ATREPLACE=Glob_ export ATREPLACE | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BCDPART |
Limits the maximum partition number. By default KCML supports up to 1024 partitions and allocates the partition numbers for background partitions from 1024 downwards. On NT for KCML 6.00 these limits are 512 and 254 respectively. If your applications would fail if given a #PART value of this size you can use this environment variable to limit the maximum value KCML can allocate. If you require more than 1024 terminals or partitions then see: Configuring $PSTAT. If the variable can be interpreted as a number then that will be the maximum partition number and if just set to TRUE then 99 will be assumed as the maximum. BCDPART=1024 export BCDPARTIt is also possible, in unusual circumstances, to start allocating both terminals and partitions from other than 1 by supplying both a minimum and a maximum value e.g.# Increase max partitions and terminals BCDPART="100,255" export BCDPART | ||||||||||||||
BREAK30 $OPTIONS RUN byte 8 |
On versions of KCML previous to the 3.20 version a $BREAK specifying no time would delay for 50 clock ticks (about 1 second), on KCML 3.20 and later the delay was reduced to 1 clock tick. This variable was added to provide compatibility with older versions. It must be set before KCML is started.
BREAK30=true export BREAK30 | ||||||||||||||
COMPAT2200 $OPTIONS LIST byte 1 COMPATNIAKWA $OPTIONS LIST byte 2 |
These variables control the LIST?ing of programs. They must be set before KCML is started. Unless this variable is set to anything, KCML will automatically recreate certain statements to the KCML form. For example:
MAT a = bwould be recreated as: a() = b()The following statements are affected Most MAT statements are also effected. COMPAT2200=true export COMPAT2200 | ||||||||||||||
COMPAT30 $OPTIONS RUN byte 1 |
This variable should be set if you are developing software in KCML versions later than 3.10 and you would like the software to be used on version 3.0. If set, KCML will give a warning for each line containing a statement introduced in versions after 3.0 that is not supported by version 3.0. E.g. $DISCONNECT, $IF etc.
COMPAT30=true export COMPAT30 | ||||||||||||||
COMPAT32 $OPTIONS RUN byte 16 |
This variable should be set if you are developing software in KCML versions 4.0 and above and you would like the software to be used on version 3.2x. If set, KCML will generate backward compatible code and SAVEsave will give a warning for each line containing a statement introduced in versions 4.0 and later that is not supported by version 3.2x. E.g. OPEN#, LINPUT + etc.
COMPAT32=true export COMPAT32 | ||||||||||||||
COMPAT40 $OPTIONS RUN byte 38 |
This variable should be set if you are developing software in KCML versions 5.00 and above and you would like the software to be used on versions < 5.00.
COMPAT40=true export COMPAT40 | ||||||||||||||
COREONBERROR | If defined this forces a core file whenever a PANIC file is generated due to a PANIC statement or a run-time error. | ||||||||||||||
CURCHAR $OPTIONS byte 4 |
If set to a string of up to two characters, that string will replace the dollar sign as the currency symbol when PRINTUSING is printing numbers. The dollar is still required in the PRINTUSING image. Only one character can be specified if $OPTIONS is used to change the currency symbol.
CURCHAR='FF' export CURCHAR | ||||||||||||||
CWD |
This variable can be used to determine the initial working directory for KCML. If it is not supplied then KCML will assume the current working directory.
CWD=/user1/test/progs export CWD | ||||||||||||||
DCINTERNAL $OPTIONS RUN byte 10 | Workaround for problem with multisector DATA LOAD/SAVE DC of string of 251+n*254 bytes overflowing the sector. | ||||||||||||||
DOSELECT $OPTIONS RUN byte 7 |
Unix only. Setting this variable to anything turns on the use of the select system call prior to reading from file descriptor zero and writing to file descriptor one. This can help with problems encountered with terminals connected via TCP/IP terminal server connections, especially on RS6000's.
DOSELECT=true export DOSELECT | ||||||||||||||
DOTCHAR $OPTIONS byte 6 |
If set to a single character, that character will replace the '.' as the decimal point character when PRINTUSING is printing numbers. The period is still required in the image. The continental European usage of a comma as the decimal character is shown in the example below.
DOTCHAR=',' export DOTCHAR | ||||||||||||||
DUMPCORE |
If set, will cause KCML to create a memory core file if KCML abnormally terminates.
Only relevant on UNIX versions.
DUMPCORE=true export DUMPCOREWhen the value of $DUMPCORE is a numeric value, KCML will emulate the ulimit -c command. The value is used to set the maximum size (in Kb) of the core. # Set max core size to 2MbHowever, the maximim size is ignored if the system's core size is unlimited; a full core file will be generated. | ||||||||||||||
EDITOR |
Unix only. This variable is used to select the native operating system text editor that is to be used upon invoking the EDIT command within the KCML immediate mode. This variable has no effect on the Workbench. If EDITOR is not set then KCML assumes the ed editor.
EDITOR=vi export EDITOR | ||||||||||||||
FORCETERM |
If set to a numeric integer within the range 1 - 512, KCML will then set the value returned by the #TERM function to the value specified by FORCETERM. Particularly useful for BASIC-2 ports where some programs have terminal numbers hardwired within certain statements, i.e. $ALERT, $RELEASE TERMINAL etc.
FORCETERM=500 export FORCETERM | ||||||||||||||
FORCEWINDOWS |
If set, KCML will force the generation of the special KCML windowing sequences for intelligent terminals (DW, WDW, Kclient, Magna, Spx701 etc) irrespective of actual terminal type. Only relevant on UNIX versions and probably obsolete. See WINDOW statement.
FORCEWINDOWS=true export FORCEWINDOWS | ||||||||||||||
HALTCHAR |
Unix only and now obsolete. The key to be used for the HALT keyboard command is normally taken from the UNIX interrupt key. This can be overridden by setting this environment variable to the ASCII hex representation of the required character. The example below defines Ctrl+Z as a HALT key.
HALTCHAR=1A export HALTCHAR | ||||||||||||||
HEAPINIT |
Generally KCML will manage memory automatically both for foreground partitions and also shared memory partitions and it should be allowed to do so as this will minimize the memory required. However if memory mapped global partitions are required then it may be necessary to tell KCML before it starts up how much memory will be needed as it cannot grow such memory. By setting the environment variable HEAPINIT to number of kilobytes the size of the initial allocation may be controlled. If a global partition fails to run because of memory problems try a bigger HEAPINIT value. The value is in kilobytes.
HEAPINIT=2048 export HEAPINIT | ||||||||||||||
HELPEXTENSION | Used by the $HELP statement and Help buttons on forms when using a client browser to view HTML. Used to determine the extenson to append to a URL filename if no explicit extension is supplied. If not set then a default extension of '.html' will be assumed. | ||||||||||||||
HELPSERVER |
Used by the $HELP statement and Help buttons on forms. If set to the name of a Windows Help file, and the HEX(10) bit of byte 41 of $OPTIONS RUN is set then $HELP will call the specified Windows Help file. This requires that either Windows KCML or UNIX KCML connected via kclient or the Windows DW terminal emulator is being used. For example:
ENV("HELPSERVER")="C:\KCMLHelp\KCMLMAN.HLP"HELPSERVER can also be used to point to a directory on the PC containing HTML files. With this set both Windows KCML and Windows DW can be forced to load the files with a Windows browser by setting byte 41 of $OPTIONS RUN to HEX(0C), for example: STR($OPTIONS RUN,41,1)=HEX(0C)HELPSERVER can also be used to instruct $HELP to go to a Web Server for its help files, again this requires that byte 41 of $OPTIONS RUN is set to HEX(0C) and that you are running under Windows. For example: STR($OPTIONS RUN,41,1)=HEX(0C)This can be particularly useful for applications that use the Connection Manager, as this will define environment variables that can be used to construct a portable URL: HELPSERVER=http://$SERVER_NAME:$SERVER_PORT/$SERVICE/HelpWhere Help is a directory alias defined in the service's section of kconf.xml. The Connection Manager will then serve the help pages. | ||||||||||||||
HOME | Used to specify the initial directory for the Workbench file browser. The value is derived from the user's account properties, eg home directory in /etc/passwd, when executed from the Connection Manager. | ||||||||||||||
HTTP_PROXY |
Used to specify the location of a HTTP proxy server through which SOAP requests will be sent. It can be overridden by the proxy keyword in CREATE. The general format is [user[:password]@]proxyserver[:port] though not all proxy servers require a user and password.
HTTP_PROXY=proxy.bigco.com:8080 export HTTP_PROXY | ||||||||||||||
KBIN | Directory where files generated by kmake are located. | ||||||||||||||
KCACHE | The full pathname of the directory to hold cached data tables. | ||||||||||||||
KCMLDIR | Absolute pathname of the directory where kcml has been executed from. This variable is considered to be read-only by the ENV() function. | ||||||||||||||
KCMLINI |
Obsolete on KCML 6.0. If using the original KCML4 editor and not the KCML Workbench then it can be used to indicate the location of the file that holds the users editor preferences. In KCML 6.0 and later the Workbench stores these in the clients registry.
KCMLINI=/usr/local/kcml/kcml.ini export KCMLINI | ||||||||||||||
KCMLPATH |
The text of all error messages is held in the file berror.d which must be in a directory on the current path (see PATH below). Other important files such as the TERMINFO directory and default translation tables are also expected to be found in that directory. A fatal error will be given if KCML cannot find berror.d or TERMINFO when it starts up. If the file cannot appear on the path then the directory containing the file may be explicitly specified as the environment variable KCMLPATH.
KCMLPATH=/user1/progs/errordir | ||||||||||||||
KCML_ALLOW_SSL_V3 | Windows only. Allow SSLv3 for compatibility. Not recommended. | ||||||||||||||
KCML_ALT_KCML | Path to an alternative kcml that can load existing binary programs. Used by kcml.sym32 to convert binary programs to ascii before loading them in. Can be a 6.20 KCML or later version. | ||||||||||||||
KCML_ALT_SRCDIR | Defines an alternative directory structure where kmake can look for src files. If file is not found here then the original path is used instead. | ||||||||||||||
KCML_BLOBSYM | If defined then make the size of BLOBSYM 8 bytes instead of 6. This is needed for very large SYM values. This must be defined in the same way for when libraries are built and the application runs. It does not affect Oracle and PostgreSQL databases but cannot be used with KDB tables. | ||||||||||||||
KCML_BROWSER_SCALE | Scale factor to allow form shrinking on browser client. Setting to e.g. 80 will allow form to size to 80% of design-time size. | ||||||||||||||
KCML_CALLSTAT_DIR | Directory to contain the results of Call Statistics. If not set, $KBIN is used. | ||||||||||||||
KCML_CHECK_TRUNCATED | Introduced in KCML 7.15 to help programmers track down truncated filename problems. If set then whenever a string is truncated (the target string is not big enough to receive the non-space part of a string) and the string starts with a "/" so is likely a filename the print a warning and PANIC CONTINUE to log context. | ||||||||||||||
KCML_CLEAR_LOCALS | KCML 6.20 only (build 06.20.85.18233 or later). Setting this environment variable will force KCML to recover local symbol space more aggressively. This should only be enabled if symbol space consumption is an issue. | ||||||||||||||
KCML_COVERAGE_DIR | Directory to contain the results of Code Coverage Analysis. If not set, $KBIN is used. | ||||||||||||||
KCML_DUAL_BINARIES_ALT_KCML | When saving binary programs, save dual-formatted with a code stream for the given alternate KCML and a code stream for the running version. | ||||||||||||||
KCML_EXTENDED_PACK | Replace pack formats of NUM(13,2) and UNUM(13,2) or greater with V+ or V-. | ||||||||||||||
KCML_FNUSE_DIR | Directory to contain the results of Function Usage. | ||||||||||||||
KCML_HEAP_PAGECHECK |
Enables a page checked heap that will raise an exception should references to memory outside of its allocated boundaries occur.
This mode of operation consumes much more system resources than normal, both in processor time and memory, as each allocation is protected by a 4kb guard page.
As such, there may not be enough address space to execute large applications.
The page checked heap can also be enabled using the --heap-pagecheck=1 switch to kcml or using kclient's --param heap-pagecheck=1 switch.
# Enable page checked heap | ||||||||||||||
KCML_HEAP_SIZE |
The Linux, AIX5 (6.00+), HP-UX 11 and Solaris (6.20+) versions of KCML allocate memory from a virtual memory mapped file.
The size of this file, and therefore the maximum amount of memory a KCML process can allocate, is fixed.
The initial size can be changed by setting the KCML_HEAP_SIZE variable before kcml is executed.
The default size is 64Mb in 6.00 & 6.20, this was increased to 128Mb in 6.40+.
# Set max size of KCML heap to 32 Mb | ||||||||||||||
KCML_ID |
Used to change the value returned by the #ID function.
By default #IDid is set to the same value as is returned by the #GOLDKEY function which is set in the KCML license file.
KCML_ID=9426 export KCML_ID | ||||||||||||||
KCML_JSON_BOOL | When serializing to JSON KCML sends boolean values as boolean. The default is to send as numeric. | ||||||||||||||
KCML_KAR_BUNDLE | Used on AIX systems to specify the location of the KCML libarary archive. | ||||||||||||||
KCML_KAR_BUNDLE_ALL | Used to specify the location of the KCML libarary archive. | ||||||||||||||
KCML_KDB_LOW_PRIORITY | Obsolete. Not used any more. | ||||||||||||||
KCML_LOG_SIZE | Used in Code analysis and testing to change the amount of memory reserved for performance testing (this is separate to normal KCML memory usage). The value is in Mb and the default value is 256. On 32-bit KCML memory address space is limited so the maximum value will likely be less than 1000. | ||||||||||||||
KCML_MIN_SSL_PROTOCOL | Set the minimum TLS protocol when using Secure sockets. Values can be "TLS" or "TLSv1" for TLSv1.0. Or "TLSv1_1" and "TLSv1_2" for TLSv1.1 and TLSv1.2 respectively, though these are not supported on Unixware. | ||||||||||||||
KCML_NOLOGIN | Prevent users logging in during system maintenance - see Connection Manager Environment Variables | ||||||||||||||
KCML_NO_TERMFILE | When set, this environment variable instructs KCML to ignore $TERMFILE and allocate a foreground partition's #TERM from the lowest, currently, unused value. Note that the $PSTAT statement will be able to see partitions from other applications using the same shared memory segment, eg both applications have $SYSTEMID unset or have it set to the same value. If multiple applications are running on a server, then it is recommended to use the ASP configuration to isolate each application with unique values of $SYSTEMID. | ||||||||||||||
KCML_OIDC_SUBJECT | OIDC subject claim | ||||||||||||||
KCML_OPENSSL_DIR | Specifies an alternative directory to load libopenssl.so and libcrypto.so. | ||||||||||||||
KCML_OPENSSL_LOG | If defined specifies a file where use of OpenSSL libraries is logged. Intended for development and debugging purposes. | ||||||||||||||
KCML_PANIC_CONF | Specify the name of the panic configuration file to use. If not defined then panconf.xml from the KCML directory will used. This file controls the behaviour of panic files. | ||||||||||||||
KCML_PSTAT_SIZE | Used to increase the size of the $PSTAT area which defines the maximum number of partitions and terminals. This is intended to replace the use of bkstat -x/-y in bootup scripts. Must be defined identically in kconf.xml for all KCML processes. It is only effective for the first instance of KCML, bkstat, or kplicserver after the server is booted, therefore it should either be set in a Unix boot script or in kconf.xml. Once the $PSTAT table is created, it cannot be resized. | ||||||||||||||
KCML_RECORD_DIR | Setting this environment variable enables recording of the data between KCML amnd KClient for the generation of headless application tests. If enabled then the name of the generated file will be specified by the use of the --param record=filename flag to KClient with a file called filename being generated in the directory sepcified. Thus this environment variable should not be set in production. | ||||||||||||||
KCML_REDUCTION |
Setting this environment variable to true causes KCML to run in reduction mode. Any value except true will be interpreted as false. This is an attempt to reduce the amount of JSON sent to the browser client. This is still in development and there may be outstanding issues.
KCML_REDUCTION=true export KCML_REDUCTION | ||||||||||||||
KCML_RETREAT_DISABLE | Setting this environment variable will cause KCML to disable retreating code on $SPACE. It may lead to a slight increase in memory consumption but can be used to help diagnose intermittent problems that may be caused by $SPACE. | ||||||||||||||
KCML_SAVE_MINDIFF | Setting this environment variable causes KCML to remove case & indentation only changes when saving ASCII source compared to the original file. | ||||||||||||||
KCML_SAVE_RELOAD | Experimental. When KCML_SAVE_MINDIFF is set reload the file after saving to reflect changes removed. | ||||||||||||||
KCML_SESSION_UUID_PARENT | Parent's UUID. Set by KCML when executing a child process to be KCML's session uuid. | ||||||||||||||
KCML_SHIM_LOG_PATH | Dsdump logging for shim processes. | ||||||||||||||
KCML_SHIM_PING_TIME | Shim client ping of KCML app existence | ||||||||||||||
KCML_SOAP_LIC | Restricts the number of instances of a SOAP server to prevent it consuming all [SOAP] licences. A special case is setting the value to 0. If the value is 0 the SOAP instance will NOT consume any SOAP licences but a regular foreground one. | ||||||||||||||
KCML_SOAP_LOCK | Prevent SOAP servers from starting - see Connection Manager Environment Variables | ||||||||||||||
KCML_SSL_CIPHER_LIST | List of SSL ciphers to use, in OpenSSL format. | ||||||||||||||
KCML_TERM_LIC |
KCML 6.20 or later. The number of licences a terminal can use concurrently can be limited by setting KCML_TERM_LIC.
To restrict a terminal to only use one KCML licence:
KCML_TERM_LIC=1 export KCML_TERM_LICThe first four sessions count as one licence, subsequent sessions are then counted as a single licence. Hence five sessions will require two licences, six sessions will account to three licences, ect, ect. | ||||||||||||||
KCML_TRACK_PTR_DELETE | Track pointers and error when used after free. Set to 2 for full stack trace. | ||||||||||||||
KCML_TRANSLATION_LOG | Specifies the path where translation log files may be found. See translations. If not defined then no logging occurs. | ||||||||||||||
KCML_TRANSLATION_PATH | Specifies the path where translation files may be found. See translations. | ||||||||||||||
KC_CHECK_TRANSLATION_MISMATCH | When compiling check for translation mismatch | ||||||||||||||
KDB_DATA_BRIDGE | Specify path of .so to handle data bridge push events. | ||||||||||||||
KDB_DATA_BRIDGE_JSON | Specify path of JSON file written to. | ||||||||||||||
KDB_LOCK_FILE | Obsolete. Not used any more. | ||||||||||||||
KDB_LOW_PRIORITY | Set for KCML processes that want to behave differently during EOD (end of day) periods. In particular, if they have tables open in write mode they will not stop end of day processings opening the tables in exclusive mode. Whilst tables are open in exclusive mode access to these tables open in write mode will fail. | ||||||||||||||
KDB_ODBC_LOADLIB | Pathname of an application library that defines a 'odbc() function that is used to connect kiodbc to an Oracle or PostgreSQL database. | ||||||||||||||
KDB_RECORD_LOCK | Use file record locking rather than lock bytes within the table. | ||||||||||||||
KDB_SERVER | Specify connection details to a KDB database server, typically on another machine. Format is <host>:<port>. | ||||||||||||||
KDB_SERVER_CACHE | If defined then certain optimizations are enabled with the KDB data server. Currently this is limited to reading ahead extra KI_READ_NEXT calls and cacheing them on the application server. | ||||||||||||||
KDB_SERVER_DIR | Defined for the KDB server and sets the current working directory for where the application uses relative path names. | ||||||||||||||
KEEPSHARED $OPTIONS RUN byte 11 |
Selected global partitions are normally automatically de-selected by a LOAD of a program or overlay. If the new program requires access to the global then it needs to issue its own SELECT @PART. This can be avoided by setting the environment variable KEEPSHARED. Also controlled by this environment variable is a change to the search algorithm for defined functions. In the BASIC-2 dialect, subroutines were first looked for in the executing partition and then in any selected global, if different from the currently executing partition. With this change the original home partition is always searched first before the currently executing partition. These changes are to support shared text as a library of useful routines and to allow the caller to override the default routines with special versions of his own.
KEEPSHARED=true export KEEPSHARED | ||||||||||||||
KINDENT $OPTIONS LIST byte 20 |
This variable is used to specify the number of spaces used to indent the body of loops etc. when programs are LISTed. The default for this variable is 4.
KINDENT=2 export KINDENT | ||||||||||||||
KLANG $OPTIONS RUN byte 20 |
This variable is used to select the default language string that is to be used when multilingual strings are referenced. Refer to the Multilanguage support chapter in this volume for more information. A list of the available language codes may be found under byte 20 of $OPTIONS RUN
KLANG=2 export KLANG | ||||||||||||||
KLOGKEY |
For development it may be desirable to have several different KCML database journal systems. The KLOGKEY environment parameter can be used to keep these systems separate. It must be exactly 4 characters long. It's value is used as the key for the shared memory and semaphore that control the journal system. It's default value is "KLOG", 0x424C4F47. For more information see Transactions
KLOGKEY=TEST export KLOGKEY | ||||||||||||||
KPLIC_PSTAT_SIZE | Used to increase the size of the area which holds the Remote Licence Daemon's KPrint licence table. This is intended to replace the use of bkstat -R in bootup scripts. | ||||||||||||||
KSSL_CLIENT_CERT | Path name of an SSL certificate when KCML is acting as a client. Only needed if the server required that the client identifies itself using a certifcate. | ||||||||||||||
KSSL_SERVER_CERT | Path name of an SSL certificate. Required when using using OPEN # to implment an SSL server. Also set by the Connection Manager when the connection policy mandates network encryption. | ||||||||||||||
KTERM |
The KTERM variable is used in preference to the TERM variable to allow greater flexibility when using other UNIX packages that use the TERM variable. If KTERM has not been set, the value of TERM is used.
KTERM=KClient export KTERM | ||||||||||||||
LINELEN |
Because the Workbench editor can edit any size of program line but the old line editor used in KCML3 and on the console window of KCML4 and KCML5 was limited to 1900 characters, the various compatibility flags set bt COMPAT30 etc will set an internal maximum line length of 1900 and you will be warned if you exceed that length. This environment variable can be used to set the maximum to any arbitrary size. By default the limit is set to zero which disables the checking mechanism.
LINELEN=512 export LINELEN | ||||||||||||||
LOGNAME | Name of the user account that a process is running as. This variable is considered to be read-only by the ENV() function. | ||||||||||||||
MALLOCSPACE |
Unixware specific in KCML 6.0 & 6.20.
By default KCML allows a 128kb space at the beginning of the data segment to allow space for the C runtime library function malloc().
In general this is enough for the library functions called by KCML itself.
If you are using external functions you may need more and this space can be set to any given value by setting the MALLOCSPACE environment variable to the number of kilobytes required.
This must be done before KCML is executed.
MALLOCSPACE=1000 export MALLOCSPACE | ||||||||||||||
NOENDDOERROR $OPTIONS RUN byte 6 |
At resolve time KCML checks the program to make sure that it can execute correctly, for example it make sure that there are no syntax errors, and that all FOR statements have a corresponding NEXT statement etc. On all versions from 3.20 on, KCML checks for unmatched DO and END DO statements, therefore, programs that ran perfectly on earlier versions will error on all version from 3.20 on if they contain unmatched DO ... END DO statements. This should only be used as a temporary fix, the programs should really be fixed as soon as possible.
NOENDDOERROR=true export NOENDDOERROR | ||||||||||||||
NOGLOBMAP | This applies to Unix only and should be set before KCML is started. On a system with multiple active shared memory global partitions, KCML will map in all existing partitions before creating and mapping in a new partition in order to guarantee a unique starting address. Setting this environemnt variable to TRUE will disable this and the new partition will be created at the next available address. Do not use unless requested to by KCML support. | ||||||||||||||
NOHALT $OPTIONS byte 13 |
If this environment is set to any value, then the HALT key will be disabled preventing users from interrupting programs.
NOHALT=true export NOHALT | ||||||||||||||
NOPROG |
If this environment variable exists at startup, i.e. is set to any value, then the user will be prevented from entering any programming commands or editing programs. If NOPROG is set and a program returns to the immediate mode prompt for any reason, i.e. if HALT or RESET is pressed, if either of the STOP or END statements are executed or if the program errors then KCML will automatically execute the PANIC statement.
NOPROG=true export NOPROG | ||||||||||||||
NORESET $OPTIONS byte 12 |
If this environment variable exists at startup, i.e. is set to any value, then the RESET key will be disabled preventing users from interrupting programs.
NORESET=true export NORESET | ||||||||||||||
OPTIONS_LIST_nn |
If this environment variable exists at startup then the corresponding byte nn in the $OPTIONS LIST system variable will be preset to the value which must be interpretable as a two digit hexidecimal value. Thus to always force KCML to indent loops with two spaces you could set byte 20 to HEX(02) in advance like so
OPTIONS_LIST_20="02" export OPTIONS_LIST_20 | ||||||||||||||
OPTIONS_RUN_nn |
If this environment variable exists at startup then the corresponding byte nn in the $OPTIONS RUN system variable will be preset to the value which must be interpretable as a two digit hexidecimal value. Thus to always force KCML to LOAD and save programs in ascii with a .src extension you could set byte 40 to HEX(06) in advance like so
OPTIONS_RUN_40="06" export OPTIONS_RUN_40 | ||||||||||||||
OPTIONS_nn |
If this environment variable exists at startup then the corresponding byte nn in the $OPTIONS system variable will be preset to the value which must be interpretable as a two digit hexidecimal value. Thus to always force KCML to error unDIMed variables you could set byte 38 to HEX(01) in advance like so
OPTIONS_38="01" export OPTIONS_38 | ||||||||||||||
PANICDIR |
The PANIC statement dumps to disk a snapshot of the state of the program at that time before terminating KCML.
The report is placed in a file called panicxxxx.xml, where xxxx is the process number, in the current working directory.
If you want these files to be created in another directory then specify the directory name as the value of the PANICDIR environment variable.
On Windows a registry key set in kservadm can be used to set this directory but PANICDIR overrides that setting.
PANICDIR=/usr/panics export PANICDIR | ||||||||||||||
PATH |
This variable is used by KCML, as it is in the native shell, in locating native operating system commands and programs when such commands or programs are called by KCML with the SHELL statement, or from the immediate mode prompt following the !shell command. Note that a different syntax is used under DOS to append to the current PATH.
PATH=$PATH:/usr/local/kcml export PATH | ||||||||||||||
PROGRAMS | Path used in some instances to find programs | ||||||||||||||
PSEUDOTTY | Setting this environment variable to "TRUE" or "true", in kconf.xml, will enable the pseudo-tty support for interactive shell commands, such as vi, ftp, passwd and man when connected via the Connection Manager on Unix systems. | ||||||||||||||
R7FIX |
This is a compatibility fix for some old versions of Kerridge Rev7 written for KCML 2.0. Changes introduced in KCML3 impacted some Rev7 programs and this switch will restore the KCML2 behaviour in certain areas if enabled.
| ||||||||||||||
SCREENDIR |
If a text mode program receives a SIGUSR2 signal from bkstat it dumps to disk a snapshot of the screen in INPUT SCREEN format. The report is placed in a file scrnxxxx, where xxxx is the #PART partition number, in the current working directory. If you want these files to be created in another directory then specify the directory name as the value of the SCREENDIR environment variable.
SCREENDIR=/usr/screens export SCREENDIR | ||||||||||||||
SEPCHAR $OPTIONS byte 5 |
If set to a single character, that character will replace the comma as the digit separator when PRINTUSING is printing numbers. The comma is still required in the image. The continental European usage of a period as the digit separator requires the following to be used:
SEPCHAR='.' export SEPCHAR | ||||||||||||||
SERVER_HTTP_URI | URI prefix used to construct HTTP URLs. Typically this will have a value of "http:" or "https:" if the Connection Manager has been configured for Secure Network Connections. | ||||||||||||||
SERVER_NAME | Name of the server used by the client to connect to the application server. | ||||||||||||||
SERVER_PORT | Network port number when running from a service, such as the Connection Manager. | ||||||||||||||
SERVICE | Name of the Connection Manager service that the application is running under. This variable is considered to be read-only by the ENV() function. | ||||||||||||||
SHELL | On Unix this environment variable can be used to override the shell to be used to execute a command in the SHELL statment. The value is derived from the user's account properties, eg shell specified in /etc/passwd, when executed from the Connection Manager. By default the Bourne shell is used. | ||||||||||||||
SOAPSTART | This environment variable will be checked before the START environment variable when KCML is acting as a SOAP server and interpreted as the name of the program to be run. It will generally be set in kconf.xml for a service which can also be used interactively. | ||||||||||||||
SPACE |
If this variable is set to a numeric value, it determines the value that will be returned by the SPACE, SPACEF, SPACEP, SPACEV and SPACEW functions in KCML. This is made available as some BASIC-2 software tested the result of the SPACE function before certain operations could take place.
SPACE=56 export SPACE | ||||||||||||||
SPACEK |
If this variable is set, it determines the value that will be returned by the SPACEK function in KCML. This is available as some BASIC-2 software tested the result of the SPACEK function before certain operations could take place.
SPACEK=56 export SPACEK | ||||||||||||||
SPOOL |
The variable is used to specify the lock file used by any UNIX spooler for the main system printer so that KCML can also lock using that file.
It can only be used if there is only one system printer on device /015.
If not supplied KCML will generate the lock file name from the prefix '/tmp/lck' and the device's major and minor device numbers.
For example, device /215 might be locked by file '/tmp/lck28(17)'. From KCML 6.00 onwards, the workspace directory, defined by WORKSPACE, will be used to hold the lock file. The /tmp directory will only be used if WORKSPACE is not set or does not point to a valid directory. Only relevant on UNIX versions. SPOOL=215lock export SPOOL | ||||||||||||||
START |
If this variable is set to a KCML program name KCML will attempt to LOAD RUN the program when KCML is first started. The program should reside in the current directory.
START=DEVICES export DEVICES | ||||||||||||||
SYSTEMID |
This was introduced in KCML 5.02, for Unix, and in KCML 6.00 for Windows NT.
Provided this is enabled in the license file with the SYSTEMID= keyword, you can set this environment variable before starting KCML to specify an instance number (a small integer counted from 0 to 65535) for the KCML environment you wish to use.
The number you specify must agree with the SYSTEMID value in the license file.
Normally only one instance of KCML is installed on a particular server. Multiple instances permit independent environments which can reuse #PART and #TERM values without any conflict. This is particularly useful for ASP systems. Each instance requires its own license file and has its own shared memory $PSTAT table and globals. SYSTEMID=2 export SYSTEMIDIf this variable has been set KCML version 6.00, and later, will first look for a license file called lic.n.txt, where n is the value of SYSTEMID. Eg, using the above example lic.2.txt . If this licence file was not found then KCML 6.00 will use the normal filename of lic.txt | ||||||||||||||
TERM |
This is a UNIX specific environment variable that is set to the type of the terminal being used in the current login session per standard UNIX conventions. KCML & bkstat use TERM for the same reason as other Unix utilities, the TERMINFO sub directory, which should exist on the current PATH, is searched for a file matching the value of TERM. If the environment variable KTERM is set TERM will be ignored. If the value of TERM matches the suffix on any $KEYBOARD or $SCREEN files, KCML will automatically use these files.
TERM=vt220 export TERM | ||||||||||||||
TERMFILE |
KCML remembers which partition a given terminal was allocated in a terminal file which is automatically created the first time KCML is run. On UNIX versions if TERMFILE is not set then KCML will create a file called TERMFILE in the directory /tmp. On DOS and Windows versions if TERMFILE is not set then the file is created in the current directory. It is very important that all users use the same value for this variable so this environment variable ought to be set in /etc/profile, or kconf.xml. The file TERMFILE should not be edited with users using KCML, especially under UNIX as UNIX editors remove and recreate the file which will change the inode number of the file, this will not only change the value of the #ID function on some versions of KCML but will prevent any new users accessing any currently running global partitions.
TERMFILE=/usr/local/kcml/TERMFILE | ||||||||||||||
TOMDIR TOMFILE $OPTIONS RUN byte 4 $OPTIONS RUN byte 5 |
If this variable is set and the third character of the filename is a space then KCML will change this for a forward slash '/', thus creating a separate directory, also any spaces after the third character are then replaced with an underscore character. For example, the program "AB C D E" would be saved as "AB/C_D_E". Since 'AB' is now a directory, if a program called 'AB' is now saved an error will occur. Setting the TOMDIR variable to anything enables the filename change to lower case if a directory of the same name already exists thus preventing the error. This is only relevant if programs and data files are to be saved as native operating system files.
TOMFILE=true TOMDIR=true | ||||||||||||||
UMASK | Connection Manager replacement for the Unix umask command which sets the file creation mode mask. For example, setting UMASK to 007 masks off the other bits of a file's permissions. This will only allow the owner of the file and members of the Unix group to access the file. For Windows versions of KCML 7.04 (or later) files will be created with ACL inheritance when $UMASK has been set to 001. | ||||||||||||||
UNIXPROGS $OPTIONS RUN byte 2 |
If set to anything KCML will expect to load programs from a native operating system directory and not from a platter image. This variable effects the following statements and commands:
LOAD, SAVE, SCRATCH, LIMITS, LOAD DA, SAVE DA UNIXPROGS=true export UNIXPROGS | ||||||||||||||
USEMALLOC |
Setting this environment variable before KCML is run will cause it to use the standard memory allocation scheme rather than its own private mechanism.
It has the same effect as using the -y command line switch.
This may be necessary if the KCML is sharing its address space with components compiled by third parties e.g. dynamic objects, user functions or complex library functions invoked by $DECLARE.
As a consequence of this it will not be possible to release unused memory on CLEAR or on $SPACE.
This is necessary only on Unix platforms and it should not be set on NT.
USEMALLOC=true export USEMALLOCNote: This variable does not have an effect on systems that use a memory mapped heap. | ||||||||||||||
USING_UTF8 |
Setting this environment variable before KCML is run tells KCML that all strings and database columns are to be presumed encoded in UTF-8. In particular strings sent to the client will be in UTF-8. Byte 59 of $MACHINE will be set to HEX(01) to indicate the server is running in this mode.
USING_UTF8=true export USING_UTF8 | ||||||||||||||
WORKSPACE |
This variable is used by KCML and its utilities to determine which directory is to be used to hold temporary work files. If this variable is not defined the directory '/tmp' is used.
WORKSPACE=/user1/tmpdir export WORKSPACE | ||||||||||||||
_ANSWERBACK | This variable and _KTERM will be set by kclient on login to a server using a Unix feature that allows the setting of environment variables passed on the login line. The selfid utility will then use them to avoid querying the terminal directly making it more efficient. If no answerback is defined in the client the variable will exist but will be blank. | ||||||||||||||
_KTERM | Set automatically by the client on logging into the server. See _ANSWERBACK above. The version number of the client is passed after the KTERM value e.g. KClient_46. |