Caché ObjectScript Reference
Static Version
Contents
Contents
Reference A:
Symbols
Symbols Used in Caché ObjectScript
A table of characters used in Caché ObjectScript as operators, etc.
Reference B:
Caché ObjectScript Commands
BREAK
Argumentless: Interrupts execution of the current routine and returns control to programmer mode. With an Argument: Enables or disables interrupts.
CLOSE
Shuts down a device.
CONTINUE
Jumps to FOR, WHILE, or DO WHILE command and reexecutes test and loop.
DO
Calls a routine.
DO WHILE
Executes code while a condition exists.
ELSE
Clause of block-oriented
IF
command.
ELSEIF
Clause of block-oriented
IF
command.
FOR
Executes a block of code repeatedly, testing at the beginning of each loop.
GOTO
Transfers control.
HALT
Terminates execution of the current process.
HANG
Suspends execution for a specified number of seconds.
IF
Evaluates an expression, then selects which block of code to execute based on the truth value of the expression.
JOB
Runs a process in background.
KILL
Deletes variables.
LOCK
Enables processes to request control and release control of data resources.
MERGE
Merges global nodes or subtrees from source into destination.
NEW
Creates empty local variable environment.
OPEN
Acquires ownership of a specified device or file for input/ouput operations.
PRINT
Sends lines of code to printer.
QUIT
Terminates execution.
READ
Accepts input and stores it in a variable.
SET
Assigns a value to a variable.
TCOMMIT
Marks the successful completion of a transaction.
TROLLBACK
Marks the unsuccessful completion of a transaction.
TSTART
Marks the beginning of a transaction.
USE
Establishes a device as the current device.
VIEW
Reads and writes blocks directly to disk storage and writes locations in memory.
WHILE
Executes code while a condition is true.
WRITE
Displays output.
XECUTE
Executes specified commands.
Reference C:
Caché ObjectScript Functions
$ASCII
Returns the character code value for an expression.
$BIT
Returns and or sets the bit value of a specified position in a bit string.
$BITCOUNT
Returns the number of bits in a bitstring.
$BITFIND
Returns the position of the specified bit value within a bitstring.
$BITLOGIC
Performs bit-wise operations on bitstrings.
$CASE
Compares expressions and returns the value of the first matching case.
$CHAR
Converts the integer value of an expression to the corresponding ASCII or Unicode character.
$DATA
Checks if a variable contains data.
$EXTRACT
Extracts specified characters from a character string.
$FIND
Finds a substring by value and returns an integer specifying its end position in the string.
$FNUMBER
Formats a numeric value with a specified format; optionally rounds to a specified precision.
$GET
Returns the data value of a specified variable.
$INCREMENT
Adds a specified increment to the existing value of a local or global variable.
$INUMBER
Validates a numeric value and converts it to internal format.
$ISOBJECT
Returns whether an expression is an object reference.
$ISVALIDNUM
Validates a numeric value and returns a boolean; optionally provides range checking.
$JUSTIFY
Returns the value of an expression right-aligned within the specified width.
$LENGTH
Returns the number of characters or delimited substrings in a string.
$LIST
Returns elements in a list.
$LISTBUILD
Builds a list of elements from the specified expressions.
$LISTDATA
Indicates whether the specified element exists and has a data value.
$LISTFIND
Searches a specified list for the requested value.
$LISTGET
Returns an element in a list, or a specified default value if the requested element is undefined.
$LISTLENGTH
Returns the number of elements in a specified list.
$NAME
Returns the name value of a variable or a portion of a subscript reference.
$NEXT
Returns the value of the next subscript in a subscripted variable.
$NORMALIZE
Validates and returns a numeric value; rounds to a specified precision.
$NUMBER
Validates and returns a numeric value; optionally provides rounding and range checking.
$ORDER
Returns the next local variable or the subscript of a local or global variable.
$PIECE
Returns the specified substring, based on a delimiter.
$QLENGTH
Returns the number of subscripts in the specified local or global variable.
$QSUBSCRIPT
Returns the namespace name, the variable name, or the subscript of the specified name.
$QUERY
Performs a physical scan of a local or global array.
$RANDOM
Returns a pseudo-random integer value in the specified range.
$REVERSE
Returns the characters in a string in reverse order.
$SELECT
Returns the value associated with the first true expression.
$SORTBEGIN
Initiates a sorting mode to improve performance of multiple sets to a global.
$SORTEND
Concludes the sorting mode initiated by $SORTBEGIN to improve performance of multiple sets to a global.
$STACK
Returns information about active contexts saved on the process call stack.
$TEXT
Returns a line of source code found at the specified location.
$TRANSLATE
Performs character-for-character replacement within a string.
$VIEW
Returns the contents of memory locations.
Reference D:
Math and Time Functions
$ZABS
Absolute value function.
$ZARCCOS
Inverse (arc) cosine function.
$ZARCSIN
Inverse (arc) sine function.
$ZARCTAN
Inverse (arc) tangent function.
$ZCOS
Cosine function.
$ZCOT
Cotangent function.
$ZCSC
Cosecant function.
$ZDATE
Validates date and converts format.
$ZDATEH
Validates and converts a date.
$ZDATETIME
Validates date and time and converts format.
$ZDATETIMEH
Validates date and time and converts format.
$ZEXP
Returns the natural logarithm raised to the specified power.
$ZHEX
Converts a hexadecimal string to a decimal number and vice versa.
$ZLN
Returns the natural logarithm of the specified number.
$ZLOG
Returns the base 10 logarithm value of the specified positive numeric expression.
$ZPOWER
Returns the value of a number raised to the selected power.
$ZSEC
Returns the trigonometric secant of the specified angle value.
$ZSIN
Returns the trigonometric sine of the specified angle value.
$ZSQR
Returns the square root of a specified number.
$ZTAN
Returns the trigonometric tangent of the specified angle value.
$ZTIME
Converts the internal system time from the specified format to a printable format.
$ZTIMEH
Converts a time value from a printable format to the Caché time special variable format.
Reference E:
Routine, Debugging, and Other Commands
ZBREAK
Sets a breakpoint.
ZINSERT
Inserts a line of code in the current routine.
ZKILL
Deletes a node while preserving the node's descendants.
ZLOAD
Loads routines into the routine buffer.
ZNSPACE
Sets the current namespace.
ZPRINT
Displays code from the current routine.
ZQUIT
Exits a program with error handling.
ZREMOVE
Erases lines from the current routine.
ZSAVE
Saves the current routine.
ZSYNC
Synchronizes and forces the end of networked transactions for the current job.
ZTRAP
Forces an error and displays a message.
ZWRITE
Displays variables.
ZZDUMP
Displays an expression in hexadecimal dump format.
Reference F:
Caché ObjectScript Special Variables
$DEVICE
Contains user-specified device status information.
$ECODE
Contains the current error code string.
$ESTACK
Contains the number of context frames saved on the call stack from a user-defined point.
$ETRAP
Contains a string of Caché ObjectScript commands to be executed when an error occurs.
$HALT
Contains a halt trap routine call.
$HOROLOG
Contains the current date and time as integer counters.
$IO
Contains the ID of the current input/output device.
$JOB
Contains the ID of the current process.
$KEY
Contains the terminator character from the most recent READ.
$PRINCIPAL
Contains the ID of the principal I/O device.
$QUIT
Contains a flag indicating what kind of QUIT is required to exit the current context.
$STACK
Contains the number of context frames saved on the call stack.
$STORAGE
Contains the number of bytes available for local variable storage.
$SYSTEM
Contains information about system objects.
$TEST
Contains the truth value resulting from the last command using the time-out option.
$TLEVEL
Contains the current nesting level for transaction processing.
$X
Contains the current horizontal position of the cursor.
$Y
Contains the current vertical position of the cursor.
$ZA
Contains the status of the last READ on the current device.
$ZB
Contains status information for the current I/O device.
$ZCHILD
Contains the ID of the last child process.
$ZEOF
Contains flag indicating whether end-of-file has been reached.
$ZERROR
Contains the name and location of the last error.
$ZHOROLOG
Contains the number of seconds elapsed since Caché startup.
$ZIO
Contains information about the current terminal I/O device.
$ZJOB
Contains job status information.
$ZMODE
Contains current I/O device OPEN parameters.
$ZNAME
Contains the current routine name.
$ZNSPACE
Contains the current namespace name.
$ZORDER
Contains the value of the next global node.
$ZPARENT
Contains the ID of the parent process of the current process.
$ZPI
Contains the value of pi.
$ZPOS
Contains the current file position during the reading of a sequential file.
$ZREFERENCE
Contains the current global reference.
$ZSTORAGE
Contains the maximum amount of memory for a job.
$ZTIMESTAMP
Contains the current date and time in Coordinated Universal Time format.
$ZTIMEZONE
Contains the time zone offset from GMT.
$ZTRAP
Contains the name of the current error trap handler.
$ZVERSION
Contains a string describing the current version of Caché.
Reference G:
Structured System Variables
^$GLOBAL
Provides information about globals.
^$JOB
Provides Caché process (job) information.
^$LOCK
Provides lock name information.
^$ROUTINE
Provides routine information.
Reference H:
System and Other Functions
$ZBOOLEAN
Bitwise logical operation function.
$ZCONVERT
String conversion function.
$ZCRC
Checksum function.
$ZCYC
Cyclical-redundancy check for data integrity.
$ZF
Invokes non-Caché ObjectScript programs or functions from Caché ObjectScript routines.
$ZF(-1)
Executes a program or command as a spawned child process and waits for the child process to return.
$ZF(-2)
Executes a program or command as a spawned child process and returns immediately.
$ZF(-3)
Loads a Dynamic-Link Library (DLL) and executes a library function.
$ZF(-4)
Loads Dynamic-Link Libraries (DLLs).
$ZF(-5)
Executes a DLL function loaded using $ZF(-4).
$ZF(-6)
Executes a DDL function indexed using $ZF(-4).
$ZINCREMENT
Adds a specified increment to the existing value of a global or local variable.
$ZISWIDE
Checks whether a string contains any 16-bit wide characters.
$ZLASCII
Returns the numeric interpretation of a four-byte string.
$ZLCHAR
Returns the requested four-byte string.
$ZNAME
Validates the specified name string as a legal identifier.
$ZNEXT
Returns a full reference to the next array node.
$ZORDER
Returns the full reference for the next array node subscript.
$ZPOSITION
Returns the number of characters in an expression that can fit within a specified field width.
$ZPREVIOUS
Returns the previous array node subscript for the specified variable.
$ZSEARCH
Returns the full file specification, pathname and filename, of a specified file.
$ZSEEK
Establishes a new offset into the current sequential file.
$ZSORT
Returns the next subscript in the array of the specified subscripted variable.
$ZSTRIP
Removes types of characters and individual characters from a specified string.
$ZUTIL(4)
Exits Caché and returns to operating system command level.
$ZUTIL(5)
Returns current namespace or switches to another namespace.
$ZUTIL(9)
Broadcasts a message to a specified device.
$ZUTIL(12)
Translates logical device name or file name to canonic form.
$ZUTIL(15)
Translates RMS file name to canonic form.
$ZUTIL(18)
Sets undefined variable handling for the current process.
$ZUTIL(20)
Specifies the namespace(s) that contains the routine dataset.
$ZUTIL(22)
Specifies the form feed or backspace control code sequence.
$ZUTIL(39)
Specifies a search path for percent (%) routines.
$ZUTIL(49)
Obtains database label information.
$ZUTIL(55)
Returns or changes the current language mode.
$ZUTIL(56,2)
Locates source file and line of code for last Caché ObjectScript error.
$ZUTIL(58)
Sets privilege level for use of XECUTE.
$ZUTIL(67)
Returns information from the Process Table about a specified process.
$ZUTIL(68)
Sets or clears configuration options for the current process.
$ZUTIL(68,1)
Enables or disables use of null subscripts for the current process.
$ZUTIL(68,2)
Sets sequential file open mode for the current process.
$ZUTIL(68,3)
Sets automatic sequential file creation option for the current process.
$ZUTIL(68,5)
Enables or disables processing of argumentless BREAK commands for the current process.
$ZUTIL(68,6)
Enables or disables reliable SET networking mode for the current process.
$ZUTIL(68,7)
Retains or strips extended global reference from globals returned to the current process.
$ZUTIL(68,11)
Enables or disables read line recall for the current process.
$ZUTIL(68,15)
Enables or disables modem disconnect detection for the current process.
$ZUTIL(68,22)
Sets handling of escape sequences when $X is updated for the current process.
$ZUTIL(68,25)
Sets batch or interactive status for the current process.
$ZUTIL(68,26)
Sets namespace display in programmer prompt for the current process.
$ZUTIL(68,27)
Sets or clears network hardening for the current process.
$ZUTIL(68,28)
Restricts or permits kills of root-level global nodes for the current process.
$ZUTIL(68,30)
Sets error handling behavior for the current process.
$ZUTIL(68,32)
Sets date range and invalid date behavior for the current process.
$ZUTIL(68,34)
Sets whether asynchronous errors can interrupt the current process.
$ZUTIL(68,39)
Enables or disables caching for the current process.
$ZUTIL(68,40)
Sets sequential file end-of-file handling for the current process.
$ZUTIL(68,42)
Sets $JOB format for the current process.
$ZUTIL(68,43)
Sets clearing of global vectors for the current process.
$ZUTIL(68,45)
Sets truncation mode for string-to-number conversions for the current process.
$ZUTIL(68,51)
Sets whether or not changing namespaces changes operating system directories for the current process.
$ZUTIL(69)
Sets systemwide configuration defaults.
$ZUTIL(69,0)
Sets undefined variable default handling systemwide.
$ZUTIL(69,1)
Sets null subscript mode default systemwide.
$ZUTIL(69,2)
Sets sequential file open mode systemwide default.
$ZUTIL(69,3)
Sets automatic sequential file creation systemwide.
$ZUTIL(69,4)
Sets the default device for jobbed processes on UNIX and OpenVMS systems.
$ZUTIL(69,5)
Enables argumentless BREAK processing systemwide.
$ZUTIL(69,6)
Sets reliable SET networking mode systemwide.
$ZUTIL(69,7)
Retains or strips extended global reference from globals systemwide.
$ZUTIL(69,8)
Sets ZA and ZD locking modes systemwide.
$ZUTIL(69,10)
Sets system behavior when journal is full.
$ZUTIL(69,11)
Sets Read Line Recall mode systemwide.
$ZUTIL(69,13)
Sets logging of asynchronous SET/KILL errors.
$ZUTIL(69,14)
Sets sending of asynchronous SET/KILL errors to operator console.
$ZUTIL(69,15)
Sets modem disconnect detection systemwide.
$ZUTIL(69,20)
Transfers global nodes with null subscripts with DSM-DDP.
$ZUTIL(69,22)
Sets $X update mode for escape sequences systemwide.
$ZUTIL(69,24)
Sets $ZF process deletion behavior for OpenVMS STOP/ID systemwide.
$ZUTIL(69,26)
Sets namespace display in programmer prompt systemwide.
$ZUTIL(69,27)
Enables or disables network hardening systemwide.
$ZUTIL(69,28)
Controls root-level (unsubscripted) global node kills systemwide.
$ZUTIL(69,30)
Sets error handling behavior systemwide.
$ZUTIL(69,32)
Sets date range and invalid date behavior systemwide.
$ZUTIL(69,34)
Sets interruptability of processes by asynchronous errors systemwide.
$ZUTIL(69,39)
Sets caching for future processes systemwide.
$ZUTIL(69,40)
Sets end-of-file handling for sequential files systemwide.
$ZUTIL(69,42)
Sets $JOB format default systemwide.
$ZUTIL(69,43)
Sets clearing of global vectors systemwide.
$ZUTIL(69,45)
Truncates numbers during string-to-number conversion systemwide.
$ZUTIL(69,51)
Sets namespace default directory assignment behavior systemwide.
$ZUTIL(71)
Sets date to a fixed value.
$ZUTIL(78,21)
Searches journal file for open transactions.
$ZUTIL(78,22)
Returns journaling information.
$ZUTIL(78,23)
Deletes a journal file.
$ZUTIL(78,28)
Returns journal directory block information.
$ZUTIL(78,29)
Flushes journal buffer.
$ZUTIL(82,12)
Redirects I/O operations.
$ZUTIL(86)
Returns configuration file pathname and config name.
$ZUTIL(90,4)
Starts up in a specified namespace (UNIX/VMS).
$ZUTIL(90,10)
Tests whether a namespace is defined.
$ZUTIL(94)
Broadcasts a message to a specified process.
$ZUTIL(96)
Returns or sets Caché information.
$ZUTIL(96,4)
Sets $TEST to reflect I/O redirection.
$ZUTIL(96,5)
Sets the $DEVICE special variable.
$ZUTIL(96,9)
Returns the calling routine name.
$ZUTIL(96,10)
Returns the calling routine namespace.
$ZUTIL(96,14)
Returns the current device type.
$ZUTIL(100)
Determines which Windows operating system is running.
$ZUTIL(110)
Returns the name of the system that is running.
$ZUTIL(114)
Determines ethernet address.
$ZUTIL(128,1)
Returns location of last single step during debugging.
$ZUTIL(130)
Sets or returns the domain ID or index.
$ZUTIL(131)
Sets or returns system identifiers.
$ZUTIL(132)
Makes the last device in use the principal I/O device.
$ZUTIL(140)
Returns file attributes, tests for existence, renames, or deletes a file, creates or deletes a VMS directory.
$ZUTIL(140,7)
Returns a bitmap of file attributes.
$ZUTIL(147)
Handles spaces in pathnames for the host platform.
$ZUTIL(168)
Returns location of current working directory, or sets current working directory.
$ZWASCII
Returns the numeric interpretations of a two-byte string.
$ZWCHAR
Returns the requested two-byte string.
$ZWIDTH
Returns the total width of the characters in an expression.
$ZWPACK and $ZWBPACK
Puts strings without multibyte characters into 2-bytes per character format.
$ZWUNPACK and $ZWUNBPACK
Unpacks multibyte characters from storage in a 2-bytes per character format.
$ZZENKAKU
Converts Japanese alphabet characters.
Reference I:
Legacy Commands and Functions
DO (legacy version)
Argumentless: executes the block of code that immediately follows it in the same program.
FOR (legacy version)
Executes a command loop repeatedly, testing at the beginning of each loop.
IF (legacy version)
Evaluates an expression, then selects which line of code to execute based on the truth value of the expression.
$ZBITAND (legacy function)
Bitstring function – AND.
$ZBITCOUNT (legacy function)
Bitstring function – COUNT.
$ZBITFIND (legacy function)
Bitstring function – FIND.
$ZBITGET (legacy function)
Bitstring function – GET.
$ZBITLEN (legacy function)
Bitstring function – LENGTH.
$ZBITNOT (legacy function)
Bitstring function – NOT
$ZBITOR (legacy function)
Bitstring function – OR.
$ZBITSET (legacy function)
Bitstring function – SET.
$ZBITSTR (legacy function)
Bitstring function – STRING.
$ZBITXOR (legacy function)
Bitstring function – XOR.
$ZUTIL(67,0) (legacy function)
Returns the activity state of a specified process.
$ZUTIL(67,1) (legacy function)
Returns the activity state of a specified process, and resets.
$ZUTIL(67,4) (legacy function)
Returns the process state.
$ZUTIL(67,5) (legacy function)
Returns the routine name of a specified process.
$ZUTIL(67,6) (legacy function)
Returns the namespace name for a specified process.
$ZUTIL(67,7) (legacy function)
Returns the device name for the specified process.
$ZUTIL(67,8) (legacy function)
Returns the number of lines executed by the specified process.
$ZUTIL(67,9) (legacy function)
Returns the number of global references made by the specified process.
$ZUTIL(67,10) (legacy function)
Returns the job type of the specified process.
$ZUTIL(67,11) (legacy function)
Returns the user name of the specified process.
$ZUTIL(67,12) (legacy function)
Returns the name of the system for a client application.
$ZUTIL(67,13) (legacy function)
Returns the name of the executable for a client application.
$ZUTIL(67,14) (legacy function)
Returns the operating system running a client application.
$ZUTIL(67,15) (legacy function)
Returns the IP address of a client application.
$ZUTIL(113) (legacy function)
Reclaims routine and directory blocks.
$ZUTIL(133) (legacy function)
Maintains a set of metric counters.
Copyright
© 1997-2004, InterSystems Corp.
Last updated:
2004-04-08 11:49:19
Source:
RCOS.xml