[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.6 ^$JOB

FreeM fully implements ^$JOB per ANSI X11.1-1995, as well as several extensions proposed in the M Millennium Draft Standard.

The first subscript of ^$JOB represents the $JOB of the process.

If you KILL a first-level subscript of ^$JOB, the SIGTERM signal will be sent to the corresponding UNIX process, causing pending transactions to be rolled back and the process to be terminated. If the targeted process is in direct mode, the user will be prompted with options of either rolling back or committing any pending transactions.

The following subscripts are supported:

ZCOMMANDS +R +U -D

Contains a space-delimited list of Z-commands to be treated as intrinsic. Any Z-command not appearing in this list will be treated as a user-defined command.

For instance, if command ZFOO does not appear in this list, FreeM will attempt to run ^%ZFOO as a subroutine when the ZFOO command is encountered in program code.

If you remove a command from this list, you may provide your own private M implementation of the command in the manner described above.

If an argument is passed to a Z-command you implement in M, it is made available to your M code in a variable whose name is specified in ^$JOB($JOB,"ZCOMMAND_ARGUMENT_NAME"), which defaults to %.

PIPE_GLVN +R +U -D

Contains an M local or global variable to be used as standard input or standard output for the external shell commands run by !< and !>.

ZCOMMAND_ARGUMENT_NAME +R +U -D

Returns or sets the variable name in which arguments to user-defined Z-commands are passed. Defaults to %.

ZFUNCTIONS +R +U -D

Contains a space-delimited list of Z functions to be treated as intrinsic. Any Z function not appearing in this list will be treated as a user-defined extrinsic function.

For instance, if function $ZFOO does not appear in this list, FreeM will attempt to return the value of $$^%ZFOO called as an extrinsic function.

If you remove a function from this list, you may provide your own private M implementation of the function in the manner described above.

ZSVS +R +U -D

Contains a space-delimited list of Z special variables to be treated as intrinsic. Any Z special variable not appearing in this list will be treated as a user-defined extrinsic function taking no arguments.

For instance, if the special variable $ZFOO does not appear in this list, FreeM will attempt to return the value of $$^%ZFOO called as an extrinsic function.

If you remove a built-in special variable from this list, you may provide your own private M implementation of the special variable in the manner described above.

BREAK_HANDLER +R +U -D

Contains M code to be executed when the BREAK command is run.

ROUTINE_BUFFER_SIZE +R +U -D

Returns or sets the number of bytes allocated to each routine buffer. If ROUTINE_BUFFER_AUTO_ADJUST is set to 0, this determines the maximum size of routines that FreeM will execute.

ROUTINE_BUFFER_COUNT +R +U -D

Returns or sets the number of routine buffers that FreeM will store in memory concurrently. Raising this value will increase memory usage, but will also increase performance if your applications call many different routines repeatedly.

ROUTINE_BUFFER_AUTO_ADJUST +R +U -D

Determines whether or not the size of routine buffers will be automatically adjusted at runtime. If set to 0, routine buffers will be fixed to the byte size specified in ROUTINE_BUFFER_SIZE and may be manually resized using ROUTINE_BUFFER_SIZE. If set to 1, routine buffers will grow automatically as necessary.

SYMBOL_TABLE_SIZE +R +U -D

Returns or sets the number of bytes allocated to each of the two FreeM symbol tables. If SYMBOL_TABLE_AUTO_ADJUST is 1, this value is treated as a default, initial size. If SYMBOL_TABLE_AUTO_ADJUST is 0, this value controls the fixed size of the two symbol tables.

SYMBOL_TABLE_AUTO_ADJUST +R +U -D

Determines whether or not the size of the two FreeM symbol tables will be automatically adjusted at runtime. If set to 0, the symbol table will be fixed to the byte size specified in SYMBOL_TABLE_SIZE and may be manually resized by modifying SYMBOL_TABLE_SIZE. If set to 1, the two symbol tables will grow automatically as necessary.

USER_DEFINED_ISV_TABLE_SIZE +R +U -D

Returns or sets the number of bytes allocated to the FreeM user-defined intrinsic special variable table. If USER_DEFINED_ISV_TABLE_AUTO_ADJUST is 1, this value is treated as a default, initial size. If USER_DEFINED_ISV_TABLE_AUTO_ADJUST is 0, this value controls the fixed byte size of the user-defined intrinsic special variable table.

USER_DEFINED_ISV_TABLE_AUTO_ADJUST +R +U -D

Determines whether or not the size of the FreeM user-defined intrinsic special variable table will be automatically adjusted at runtime. If set to 0, the user-defined ISV table will be fixed to the byte size specified in USER_DEFINED_ISV_TABLE_SIZE and may be manually resized by modifying USER_DEFINED_ISV_TABLE_SIZE. If set to 1, the user-defined ISV table will grow automatically as necessary.

GVN_UNIQUE_CHARS +R +U -D

Returns or sets the number of characters of a global name that make it unique, from 1 to 255.

GVN_CASE_SENSITIVE +R +U -D

Returns or sets the case sensitivity of global names. If set to 0, global names are case-insensitive. If set to 1, global names are case-sensitive.

GVN_NAME_SUB_LENGTH +R +U -D

Returns or sets the maximum number of characters of a global name plus all of its subscripts, from 1-255.

GVN_SUB_LENGTH +R +U -D

Returns or sets the maximum number of characters of a single global subscript, from 1-255.

SINGLE_USER +R +U -D

If set to 1, FreeM will skip all file locking operations on globals, as well as the LOCK and ZALLOCATE tables. If set to 0, FreeM will enforce file locking on both.

Setting SINGLE_USER to 1 will improve FreeM performance, but you must ONLY use this on systems where you are absolutely sure that only one FreeM process will run at any given time, as running multiple instances of FreeM concurrently when any of them are set to SINGLE_USER mode will cause database and LOCK/ZALLOCATE table corruption!

CHARACTER +R -U -D

Returns the character set of the job.

CWD +R +U -D

Returns or sets the current working directory of the job.

OPEN +R -U -D

The ^$JOB($JOB,"OPEN",<channel> subscripts list the open I/O channels in the specified job.

ENGINES +R -U -D

Returns or sets the storage engines for various FreeM subsystems.

The following table lists the types of storage engines that can be defined.

GLOBAL +R +U -D

Returns or sets the global handler for a particular FreeM namespace:

The following code would set the global handler for the SYSTEM namespace to BERKELEYDB:

SET ^$JOB($JOB,"ENGINES","GLOBAL","SYSTEM")="BERKELEYDB"

LOCAL +R -U -D

Returns the local handler for a particular FreeM namespace. Always BUILTIN in the current FreeM release.

BERKELEYDB,FLUSH_THRESHOLD +R +U -D

Returns or sets the number of write operations that will be cached in the BerkeleyDB global handler prior to flushing BerkeleyDB’s cache to disk.

EVENT +R +U +D

The subtree contained under ^$JOB($J,"EVENT") defines asynchronous event handlers for the current job. Please see Asynchronous Event Handling for more information.

GLOBAL +R -U -D

Returns the global environment of the job.

IOPATH +R +U -D

Returns or sets the I/O path to be used by the OPEN command.

PRIORITY +R +U -D

Returns or sets the nice value of the FreeM job.

REVSTR +R +U -D

When set to 1, allows $EXTRACT to accept negative values.

ROUTINE +R -U -D

Returns the name of the routine currently being executed by the job.

SYMTAB +R +U -D

Returns or sets the current local variable symbol table in use.

FreeM supports two unique and independent symbol tables, allowing FreeM programs to maintain two independent sets of identically- or differently-named local variables per process.

The default symbol table is 0, and the alternate symbol table is 1, corresponding to the valid values for ^$JOB($JOB,"SYMTAB").

Setting this subscript to values other than 0 or 1 will result in a ZINVEXPR error.

$PDISPLAY +R -U -D

Returns the value of $PDISPLAY for the job.

$PRINCIPAL +R -U -D

Returns the value of $PRINCIPAL for the job.

$TLEVEL +R -U -D

Returns the current transaction level (value of $TLEVEL for the job.

$IO +R -U -D

Returns the current value of $IO for the job.

USER +R -U -D

Returns the UID of the user owning the job.

GROUP +R -U -D

Returns the GID of the group owning the job.

NAMESPACE +R +U -D

Returns or sets the name of the job’s currently-active namespace.

MATH +R +U -D

Returns or sets the mode in which decimal comparisons and arithmetic calculations are conducted. Valid values are FIXED, for fixed-point decimals having up to 20,000 digits of precision, as determined by the $ZPRECISION intrinsic special variable, and IEEE754, to use IEEE 754 floating-point decimals. When in IEEE754 mode, floating-point numbers support up to 16 digits of numeric precision.

IEEE754 mode will make mathematical calculations significantly faster, especially when accelerated by a floating-point processor, at the expense of precision and accuracy.

FIXED mode is recommended for financial calculations, or where precision and accuracy are valued over performance. FIXED is the default mode of FreeM operation.

Attempting to SET this node to values other than FIXED or IEEE754 will set $ECODE to M29.


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on September 20, 2023 using texi2html 5.0.