Skip to main content

Replacements for ObjectScript $ZUTIL Functions

Class methods and properties to replace $ZUTIL ($ZU) functions that are no longer documented.

Obsolete And Deprecated Functionality

Some $ZUTIL functionality is obsolete or deprecated. Beginning with version 2010.1 of Caché, documentation for legacy networking facilities DDP and DCP has been removed. The associated $ZUTIL functions are classed as deprecated; no replacement class methods or properties have been provided. This is also true for several other $ZUTIL functions because they no longer function as intended. Beginning with version 2010.2 of Caché, $ZUTIL(69,39) is also deprecated. The following $ZUTIL functions are not provided with equivalent replacements; the continued use of these $ZUTIL functions is discouraged:

$ZUTIL Function Description
67, 1, … Returns the activity state of a specified process, and resets.
68, 6, … Enables or disables reliable SET networking mode for the current process.
68, 27, … Sets or clears network hardening for the current process. Network hardening was only used by the obsolete DCP and DDP networks. It does not apply to ECP networks.
68,39, … Enables or disables caching for the current process.
68, 55, … Selects $X/$Y behavior for TCP devices for the current process.
69, 6, … Sets reliable SET networking mode system-wide.
69, 13, … Sets logging of asynchronous SET/KILL errors.
69, 14, … Sets logging of asynch errors to console.
69, 19, … Sets DDP password security system-wide.
69, 20, … Transfers global nodes with null subscripts with DSM-DDP.
69, 27, … Enables or disables network hardening system-wide.
69, 28, … Controls root-level (unsubscripted) global node kills system-wide.
69, 31, … Sets network locks handling system-wide following a DCP outage.
69, 35, … Sets silent retry for domainspace connection attempts system-wide.
69, 39, … Sets caching for future processes system-wide.
69, 55, … Selects $X/$Y behavior for TCP devices system-wide.
69, 67, … Suppresses or displays the stack and register usage message box system-wide.
78, 28, ... Returns journal directory block information.
90, 4, … Starts up in a specified namespace (UNIX®).
100 Determines which Windows operating system is running.
113 Reclaims routine and directory blocks.
130, … Sets or returns the domain ID or index.
133, … Maintains a set of metric counters.

$ZUTIL Function Replacements

Beginning with Caché version 2010.1, the ObjectScript $ZUTIL functions are no longer documented. These functions remain available for use by applications as in prior releases, but the actions they perform are now also available by other means. The list of $ZUTIL functions, their description, and the new and preferred means of accomplishing the same objective are given here.

The following three tables list the $ZUTIL functions for which there are equivalent replacements.

Non-Configuration-Related Functions
$ZUTIL Function Description Class Property / Method

4, …

Terminates a Cache process.

%SYSTEM.ProcessOpens in a new tab

Terminate()Opens in a new tab

5, …

Returns current namespace or switches to another namespace.

<Special variable>

$NAMESPACE

$NAMESPACE is not an exact replacement for $ZUTIL(5); however, $NAMESPACE is almost always preferable, and existing use of $ZUTIL(5) should be phased out. $NAMESPACE provides full support for implied namespaces by establishing default mapping for system routines. $ZUTIL(5) handling of implied namespaces does not establish this default mapping.

9, …

Broadcasts a message to a specified device.

%Library.DeviceOpens in a new tab

Broadcast()Opens in a new tab

Write a message to the system console log, cconsole.log.

%SYS.SystemOpens in a new tab

WriteToConsoleLog()Opens in a new tab

12, …

Converts file or directory name to canonical form.

%Library.FileOpens in a new tab

NormalizeDirectory()Opens in a new tab

15, …

Converts RMS filename to canonical form.

%Library.FileOpens in a new tab

NormalizeFilename()Opens in a new tab

18, …

Sets undefined variable handling for the current process.

%SYSTEM.ProcessOpens in a new tab

Undefined()Opens in a new tab

20, …

Specifies the namespace(s) that contains the routine dataset.

%SYSTEM.ProcessOpens in a new tab

UserRoutinePath()Opens in a new tab

21, …

Returns the location of process-private globals.

%SYSTEM.ProcessOpens in a new tab

PrivateGlobalLocation()Opens in a new tab

21

Deletes all process-private globals.

%SYSTEM.ProcessOpens in a new tab

KillPrivateGlobals()Opens in a new tab

22, 0, …

Specifies the form feed or backspace control code sequence.

%Library.DeviceOpens in a new tab

SetFFBS()Opens in a new tab

28, …

Performs collation conversion.

%SYSTEM.UtilOpens in a new tab

Collation()Opens in a new tab

39, …

Specifies a search path for percent (%) routines.

%SYSTEM.ProcessOpens in a new tab

SysRoutinePath()Opens in a new tab

49, …

Obtains database information.

SYS.DatabaseOpens in a new tab

<various class properties>

53

Passes TCP device name to child process.

%SYSTEM.INetInfoOpens in a new tab

TCPName()Opens in a new tab

53, …

Returns TCP statistics.

%SYSTEM.INetInfoOpens in a new tab

TCPStats()Opens in a new tab

55, …

Returns or changes the current language mode.

%SYSTEM.ProcessOpens in a new tab

LanguageMode()Opens in a new tab

56, 2

Locates source file and line of code for last ObjectScript error.

%SYSTEM.ProcessOpens in a new tab

ErrorLine()Opens in a new tab

56, 6

Returns the operating system error code for a sequential file error.

%SYSTEM.ProcessOpens in a new tab

OSError()Opens in a new tab

62, …

Performs a syntax check of command line code.

%Library.RoutineOpens in a new tab

CheckSyntax()Opens in a new tab

67, 0, …

Returns the activity state of a specified process.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

IsGhostOpens in a new tab

IsGhost()Opens in a new tab

67, 4, …

Returns the process state.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

StateOpens in a new tab

State()Opens in a new tab

67, 5, …

Returns the routine name of a specified process.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

RoutineOpens in a new tab

Routine()Opens in a new tab

67, 6, …

Returns the namespace name for a specified process.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

NameSpaceOpens in a new tab

NameSpace()Opens in a new tab

67, 7, …

Returns the device name for the specified process.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

CurrentDeviceOpens in a new tab

CurrentDevice()Opens in a new tab

67, 8, …

Returns the number of lines executed by the specified process.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

LinesExecutedOpens in a new tab

LinesExecuted()Opens in a new tab

67, 9, …

Returns the number of global references made by the specified process.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

GlobalReferencesOpens in a new tab

GlobalReferences()Opens in a new tab

67, 10, …

Returns the job type of the specified process.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

JobTypeOpens in a new tab

JobType()Opens in a new tab

67, 11, …

Returns the username of the owner of the specified process.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

UserNameOpens in a new tab

UserName()Opens in a new tab

67, 12, …

Returns the name of the system for a client application.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

ClientNodeNameOpens in a new tab

ClientNodeName()Opens in a new tab

67, 13, …

Returns the name of the executable for a client application.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

ClientExecutableNameOpens in a new tab

ClientExecutableName()Opens in a new tab

67, 14, …

Formerly returned the operating system running a client application. Now returns the CSP Session ID.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

CSPSessionIDOpens in a new tab

CSPSessionID()Opens in a new tab

67, 15, …

Returns the IP address of a client application.

%SYS.ProcessQueryOpens in a new tab

%SYSTEM.ProcessOpens in a new tab

ClientIPAddressOpens in a new tab

ClientIPAddress()Opens in a new tab

71, …

Sets date to a fixed value for the current process.

%SYSTEM.ProcessOpens in a new tab

FixedDate()Opens in a new tab

78, 21

Searches journal file for open transactions.

%SYS.Journal.SystemOpens in a new tab

GetImageJournalInfo()Opens in a new tab

78, 22, …

Returns journaling information.

%SYS.Journal.SystemOpens in a new tab

<various class methods>

78, 23, …

Deletes a journal file.

%SYS.Journal.FileOpens in a new tab

PurgeOne()Opens in a new tab

78, 29

Flushes journal buffer.

%SYS.Journal.SystemOpens in a new tab

Sync()Opens in a new tab

82, 12, …

Redirects I/O operations.

%Library.DeviceOpens in a new tab

ReDirectIO()Opens in a new tab

86

Returns configuration file pathname and config name.

%SYS.SystemOpens in a new tab

GetCPFFileName()Opens in a new tab

90, 10, …

Tests whether a namespace is defined.

%SYS.NamespaceOpens in a new tab

Exists()Opens in a new tab

94, …

Broadcasts a message to a specified process.

%SYSTEM.ProcessOpens in a new tab

Broadcast()Opens in a new tab

96, 3, …

Return error number for user-defined command.

%SYSTEM.ProcessOpens in a new tab

ThrowError()Opens in a new tab

96, 4, …

Sets $TEST to reflect I/O redirection.

%SYSTEM.ProcessOpens in a new tab

IODollarTest()Opens in a new tab

96, 5, …

Sets the $DEVICE special variable.

<Special variable>

$DEVICE

96, 9

Returns the calling routine name.

%SYSTEM.ProcessOpens in a new tab

CallingRoutine()Opens in a new tab

96, 10

Returns the calling routine database.

%SYSTEM.ProcessOpens in a new tab

CallingDatabase()Opens in a new tab

96, 14

Returns the current device type.

%Library.DeviceOpens in a new tab

GetType()Opens in a new tab

110

Returns the name of the system that is running.

%SYS.SystemOpens in a new tab

GetNodeName()Opens in a new tab

114, …

Determines Ethernet address.

%SYSTEM.INetInfoOpens in a new tab

EthernetAddress()Opens in a new tab

115, 11, …

Specifies whether a value can be inserted into an identity column.

%SYSTEM.SQLOpens in a new tab

GetIdentityInsert()Opens in a new tab, SetIdentityInsert()Opens in a new tab

128, 1

Returns location of last single step during debugging.

%SYSTEM.ProcessOpens in a new tab

StepInfo()Opens in a new tab

132

Makes the last device in use the principal I/O device.

%Library.DeviceOpens in a new tab

ChangePrincipal()Opens in a new tab

140, 1, …

Returns file, directory, and disk information and performs file operations.

%Library.FileOpens in a new tab

<various class methods>

140, 7, …

Returns a bitmap of file attributes.

%Library.FileOpens in a new tab

Attributes()Opens in a new tab

147, …

Handles spaces in pathnames for the host platform.

%Library.FileOpens in a new tab

NormalizeFilenameWithSpaces()Opens in a new tab

158, 0

Returns number of currently installed printers.

%Library.DeviceOpens in a new tab

InstalledPrinters()Opens in a new tab

158, 1

Lists currently installed printers.

%Library.DeviceOpens in a new tab

GetPrinters()Opens in a new tab

168, …

Returns location of current working directory, or sets current working directory.

%SYSTEM.ProcessOpens in a new tab

CurrentDirectory()Opens in a new tab

186, …

Sets display in programmer prompt for the current process.

%SYSTEM.ProcessOpens in a new tab

TerminalPrompt()Opens in a new tab

188

Returns local date and time with fractional seconds system-wide.

<Function>

$NOW

$NOW is not an exact replacement for $ZUTIL(188). $ZUTIL(188) returns current local time with fractional seconds, adjusted for local time variants such as Daylight Saving Time (DST). $NOW can return current local time with fractional seconds, but does not adjust for local time variants. $HOROLOG returns current local time adjusted for local time variants, but does not support fractional seconds.

189

Checks if TCP device is disconnected.

%SYSTEM.INetInfoOpens in a new tab

Connected()Opens in a new tab

193, …

Converts Coordinated Universal Time (UTC) to local date and time (and vice versa).

<Function>

$ZDATETIMEH

Process-Related Configuration Functions
$ZUTIL Function Description Class Method

68,0

Sets undefined variable handling for the current process.

%SYSTEM.ProcessOpens in a new tab

Undefined()Opens in a new tab

68, 1, …

Enables or disables use of null subscripts for the current process.

%SYSTEM.ProcessOpens in a new tab

NullSubscripts()Opens in a new tab

68, 2, …

Sets sequential file open mode for the current process.

%SYSTEM.ProcessOpens in a new tab

OpenMode()Opens in a new tab

68, 3, …

Sets automatic sequential file creation option for the current process.

%SYSTEM.ProcessOpens in a new tab

FileMode()Opens in a new tab

68, 5, …

Enables or disables processing of argumentless BREAK commands for the current process.

%SYSTEM.ProcessOpens in a new tab

BreakMode()Opens in a new tab

68, 7, …

Retains or strips extended global reference from globals returned to the current process.

%SYSTEM.ProcessOpens in a new tab

RefInKind()Opens in a new tab

68, 11, …

Enables or disables read line recall for the current process.

%SYSTEM.ProcessOpens in a new tab

LineRecall()Opens in a new tab

68, 15, …

Enables or disables I/O device disconnect detection for the current process.

%SYSTEM.ProcessOpens in a new tab

DisconnectErr()Opens in a new tab

68, 21, …

Sets synchronous commit mode for the current process.

%SYSTEM.ProcessOpens in a new tab

SynchCommit()Opens in a new tab

68, 22, …

Sets handling of escape sequences when $X is updated for the current process.

%SYSTEM.ProcessOpens in a new tab

DX()Opens in a new tab

68, 26, …

Sets namespace display in programmer prompt for the current process.

%SYSTEM.ProcessOpens in a new tab

TerminalPrompt()Opens in a new tab

68, 28, …

Restricts or permits kills of root-level global nodes for the current process.

%SYSTEM.ProcessOpens in a new tab

GlobalKillDisabled()Opens in a new tab

68, 30, …

Sets error handling behavior for the current process.

%SYSTEM.ProcessOpens in a new tab

PopError()Opens in a new tab

68, 32, …

Sets date range and invalid date behavior for the current process.

%SYSTEM.ProcessOpens in a new tab

ZDateNull()Opens in a new tab

68, 34, …

Sets whether asynchronous errors can interrupt the current process.

%SYSTEM.ProcessOpens in a new tab

AsynchError()Opens in a new tab

68, 40, …

Sets sequential file end-of-file handling for the current process.

%SYSTEM.ProcessOpens in a new tab

SetZEOF()Opens in a new tab

68, 42, …

Sets $JOB format for the current process.

%SYSTEM.ProcessOpens in a new tab

NodeNameInPid()Opens in a new tab

68, 43, …

Sets clearing of global vectors for the current process.

%SYSTEM.ProcessOpens in a new tab

OldZU5()Opens in a new tab

68, 45, …

Sets truncation mode for string-to-number conversions for the current process.

%SYSTEM.ProcessOpens in a new tab

TruncateOverflow()Opens in a new tab

68, 51, …

Sets whether or not changing namespaces changes operating system directories for the current process.

%SYSTEM.ProcessOpens in a new tab

SwitchOSdir()Opens in a new tab

68, 60, …

Sets handling of asynchronous Telnet disconnect errors for the current process.

%SYSTEM.ProcessOpens in a new tab

AsyncDisconnectErr()Opens in a new tab

68, 63, …

Enables or disables the use of “e” as scientific notation symbol for the current process.

%SYSTEM.ProcessOpens in a new tab

ScientificNotation()Opens in a new tab

68, 66, …

Suppress Telnet NUL at end-of-line for the current process.

%SYSTEM.ProcessOpens in a new tab

TelnetNUL()Opens in a new tab

68, 67, …

Suppresses or displays the stack and register usage message box for the current process.

%SYSTEM.ProcessOpens in a new tab

ExceptionLog()Opens in a new tab

68, 70, …

Enables or disables $DOUBLE returning INF and NAN values for the current process.

%SYSTEM.ProcessOpens in a new tab

IEEEError()Opens in a new tab

68, 71, …

Sets IP address format for the current process.

%SYSTEM.ProcessOpens in a new tab

IPv6Format()Opens in a new tab

68, 72, …

Sets MVBasic handling of undefined variables for the current process.

%SYSTEM.ProcessOpens in a new tab

MVUndefined()Opens in a new tab

System-Related Configuration Functions
$ZUTIL Function Description Class Property

69, 0, …

Sets undefined variable default handling system-wide.

Config.MiscellaneousOpens in a new tab

UndefinedOpens in a new tab

69, 1, …

Sets null subscript mode default system-wide.

Config.MiscellaneousOpens in a new tab

NullSubscriptsOpens in a new tab

69, 2, …

Sets sequential file open mode default system-wide.

Config.MiscellaneousOpens in a new tab

OpenModeOpens in a new tab

69, 3, …

Sets automatic sequential file creation system-wide.

Config.MiscellaneousOpens in a new tab

FileModeOpens in a new tab

69, 5, …

Enables argumentless BREAK processing system-wide.

Config.MiscellaneousOpens in a new tab

BreakModeOpens in a new tab

69, 7, …

Retains or strips extended global reference from globals system-wide.

Config.MiscellaneousOpens in a new tab

RefInKindOpens in a new tab

69, 8, …

Sets ZA and ZD locking modes system-wide.

Config.MiscellaneousOpens in a new tab

ZaModeOpens in a new tab

69, 10, …

Sets system behavior when journal is full.

Config.JournalOpens in a new tab

FreezeOnErrorOpens in a new tab

69, 11, …

Sets Read Line Recall mode system-wide.

Config.MiscellaneousOpens in a new tab

LineRecallOpens in a new tab

69, 15, …

Sets I/O device disconnect detection system-wide.

Config.MiscellaneousOpens in a new tab

DisconnectErrOpens in a new tab

69, 21, …

Sets synchronous commit mode system-wide.

Config.MiscellaneousOpens in a new tab

SynchCommitOpens in a new tab

69, 22, …

Sets $X update mode for escape sequences system-wide.

Config.MiscellaneousOpens in a new tab

DXOpens in a new tab

69, 26, …

Sets namespace display in programmer prompt system-wide.

Config.StartupOpens in a new tab

TerminalPromptOpens in a new tab

69, 30, …

Sets error handling behavior system-wide.

Config.MiscellaneousOpens in a new tab

PopErrorOpens in a new tab

69, 32, …

Sets date range and invalid date behavior system-wide.

Config.MiscellaneousOpens in a new tab

ZDateNullOpens in a new tab

69, 34, …

Sets interruptability of processes by asynchronous errors system-wide.

Config.MiscellaneousOpens in a new tab

AsynchErrorOpens in a new tab

69, 37, …

Sets physical cursor mode system-wide.

Config.NLS.LocalesOpens in a new tab

PhysicalCursorOpens in a new tab

69, 40, …

Sets end-of-file handling for sequential files system-wide.

Config.MiscellaneousOpens in a new tab

SetZEOFOpens in a new tab

69, 42, …

Sets $JOB format default system-wide.

Config.MiscellaneousOpens in a new tab

NodeNameInPidOpens in a new tab

69, 43, …

Sets clearing of global vectors system-wide.

Config.MiscellaneousOpens in a new tab

OldZU5Opens in a new tab

69, 44, …

Sets use of the Nagle algorithm for Telnet transmissions system-wide.

Config.MiscellaneousOpens in a new tab

UseNagleAlgorithmOpens in a new tab

69, 45, …

Truncates numbers during string-to-number conversion system-wide.

Config.MiscellaneousOpens in a new tab

TruncateOverflowOpens in a new tab

69, 49, …

Sets logging of transaction rollbacks system-wide.

Config.MiscellaneousOpens in a new tab

LogRollbackOpens in a new tab

69, 51, …

Sets namespace default directory assignment behavior system-wide.

Config.MiscellaneousOpens in a new tab

SwitchOSdirOpens in a new tab

69, 60, …

Sets handling of asynchronous Telnet disconnect errors system-wide.

Config.MiscellaneousOpens in a new tab

AsyncDisconnectErrOpens in a new tab

69, 63, …

Enables or disables lowercase “e” as scientific notation symbol system-wide.

Config.MiscellaneousOpens in a new tab

ScientificNotationOpens in a new tab

69, 66, …

Suppress Telnet NUL at end-of-line system-wide.

Config.MiscellaneousOpens in a new tab

TelnetNULOpens in a new tab

69, 68, …

Enables or disables the encryption of journal files system-wide.

Security.SystemOpens in a new tab

DBEncJournalOpens in a new tab

69, 69, …

Enables or disables the use of long strings system-wide.

Config.MiscellaneousOpens in a new tab

EnableLongStringsOpens in a new tab

69, 70, …

Enables or disables $DOUBLE returning INF and NAN values system-wide.

Config.MiscellaneousOpens in a new tab

IEEEErrorOpens in a new tab

69, 71, …

Sets IP address format system-wide.

Config.StartupOpens in a new tab

IPv6Opens in a new tab

69, 72, …

Sets MVBasic handling of undefined variables system-wide.

Config.MiscellaneousOpens in a new tab

MVDefinedOpens in a new tab

Note:

The $ZUTIL function descriptions excised from this reference have been removed to their own book. It can be found in the Legacy Documentation archive as ObjectScript $ZUTIL ReferenceOpens in a new tab, Version 2010.1. There are no plans to update this legacy volume.


FeedbackOpens in a new tab