Skip to main content

MSM and Caché Utilities Catalog

This appendix lists MSM commands, functions, operators, preprocessor directives, special variables, and structured system variables, and their Caché equivalents. Bear in mind that many of the Caché equivalents mentioned here are deprecated or have been rendered obsolete by more modern tools. They are presented here only to provide you with the most direct substitutes when porting legacy code. Documentation for most of the utilities mentioned here can be found in the “Legacy Documentation” chapter in Using InterSystems Documentation.

%ACTJOB

Caché equivalent: No direct equivalent

Purpose: Provides a ^-delimited list of all job numbers in the system.

Notes: In Caché, use the following code:

Set (j,p)=""
For{
   Set j=$Order(^$Job(j))  
      ;$Order(^$JOB(j)) is recommended over $ZJOB(j)
   Quit:j=""
   Set p=p_j_"^"}
%CHKSUM

Caché equivalent: $ZCRC

Purpose: Computes a checksum (ASCII summation) of one or more routines.

%D

Caché equivalent: %D

Purpose: Displays the date currently stored in $HOROLOG.

Notes: %D in MSM reports the date in the format DD-MMM-YY, while Caché uses the format MMM-DD-YY. Use $ZDATE($HOROLOG,2) to mimic MSM’s %D output in Caché.

%DEBUG

Caché equivalent: No Direct Equivalent

Purpose: Invokes an interactive program debugging facility.

Notes: See the Caché ObjectScript Reference for information on BREAK and ZBREAK.

%DEVUSE

Caché equivalent: No Direct Equivalent

Purpose: Displays a list of all opened devices and the number of the job that owns each one.

Notes: In Caché, use TTYFREE to check reserved TTY devices and the processes that own them. Use %SS to see all processes and the devices they have open.

%DH

Caché equivalent: %DX

Purpose: Converts a decimal value to hexadecimal.

%DI

Caché equivalent: %DATE

Purpose: Converts a date from external form (for example: 8-SEP-97) to internal HOROLOG format.

Notes: In Caché, you can call %DATE programmatically via the INT line tag.

%DO

Caché equivalent: $ZDATE($H_Value)

Purpose: Converts a date from internal $HOROLOG format to external format.

%ECHO

Caché equivalent: No Direct Equivalent

Purpose: Allows the program to control the echoing of characters at the terminal. Entry points are provided to turn ECHO on and off.

Notes: In Caché, use the Secret-Mode feature of Caché’s terminal I/O. For example, to hide the user’s input from a Caché program, try:

Use 0:(:"s") 
Read rec
%EDP

Caché equivalent: Not Available

Purpose: Performs macro lookup, expansion, and parameter substitution.

%EDP1

Caché equivalent: Not Available

Purpose: Processes directives, has supplementary entry points.

%ER

Caché equivalent: %ER

Purpose: Displays error information trapped by the %ET routine.

%ERRCODE

Caché equivalent: Not Available

Purpose: Display an explanation for database-specific error codes.

%ET

Caché equivalent: %ET, %ETN

Purpose: Error trap routine

Notes: Caché’s %ET(%ETN) routine is much more feature-rich.

%FGR

Caché equivalent: %GIF, %SYS.GIFMSM

Purpose: Fast global restore (block format).

Notes: Use %SYS.GIFMSM to import %FGS-format global saves into Caché.

%FGS

Caché equivalent: %GOF

Purpose: Fast global save (block format)

%FL

Caché equivalent: %RFIRST

Purpose: Display the first line of code for selected routines.

%FLIST

Caché equivalent: Not Available

Purpose: Lists a file stored in the host file system.

%GCH

Caché equivalent: %Library.GlobalOpens in a new tab class, %GDISP (not available in Caché 5.0 or later), PROTECT

Purpose: Display characteristics of global(s) and modify

%GCHANGE

Caché equivalent: %GCHANGE

Purpose: Changes all occurrences of a string in one or more globals.

%GCMP

Caché equivalent: %GCMP

Purpose: Compares two globals in the same or different namespace.

%GCOPY

Caché equivalent: %GCOPY, MERGE

Purpose: Copies one or more globals from one namespace to another. The namespace may be on the same machine or on a remote machine.

%SYS.GD

Caché equivalent: %SYS.GD

Purpose: Display global directory for current namespace.

%GDE

Caché equivalent: %Library.GlobalOpens in a new tab class, %GDISP (not available in Caché 5.0 or later)

Purpose: Provides an extended global directory display.

%GDEL

Caché equivalent: Not Available

Purpose: Deletes one or more globals from a namespace.

%GE

Caché equivalent: INTEGRIT, BLKDIST

Purpose: Display efficiency of global(s).

%GEDIT

Caché equivalent: Management Portal

Purpose: The System > Globals > Edit Global Data page allows an administrator or operator to edit and delete global data values.

%GL

Caché equivalent: %G

Purpose: Lists all or selected portions of a global file.

%GR

Caché equivalent: %GI, %GIGEN, %GIF

Purpose: Restore global(s) from a device, and allows them to be renamed.

Notes: Caché does not allow the renaming of globals on import.

%GS

Caché equivalent: %GO, %GOGEN, %GOF

Purpose: Saves all or selected portions of one or more globals to a device.

%GSE

Caché equivalent: Management Portal

Purpose: The System > Globals > Edit Global Data page allows an administrator or operator to view globals and search for global data values.

%GSEL

Caché equivalent: %SYS.GSET

Purpose: Allows you to select one or more globals from the current namespace.

%GSIZE

Caché equivalent: %GSIZE

Purpose: Display size of one or more globals

%GUCI

Caché equivalent: %DIR

Purpose: Returns the three-character name and internal UCI number for the current UCI.

Notes: Caché’s %DIR will report the current namespace and default global directory.

%HD

Caché equivalent: %XD

Purpose: Converts a hexadecimal number to a decimal.

%HELP

Caché equivalent: No Direct Equivalent

Purpose: Provides online help for character-based utilities.

Notes: In Caché, you can get online help by entering a “?” at any of the character-based utility prompts.

%HL

Caché equivalent: %PRIO

Purpose: Allows you to change the priority of the current job from high to low or from low to high.

Notes: Call Caché’s %PRIO utility through the LOW, NORMAL, and HIGH line tags.

%HOSTCMD

Caché equivalent: $ZF(-1,"CMD")

Purpose: Allows you to issue host operating system commands from within an M program.

%INDEX

Caché equivalent: Not Available

Purpose: Provides a cross-reference listing of one or more routines, and optionally provides a structured program listing of selected routines.

%LOGON

Caché equivalent: ^%CD, ZN, $ZU(5)

Purpose: Allows you to switch from one UCI to another.

%MDMP

Caché equivalent: Not Available

Purpose: Provides a display in hexadecimal format, character format, or both for selected memory locations or the VIEW buffer.

%MFUNC

Caché equivalent: ^%math

Purpose: Provides mathematical functions including E, PI, SIN, and COS.

Notes: ^%math must be called by the appropriate line tag—see source code.

%MODESET

Caché equivalent: Not Available

Purpose: Allows you to change environmental mode flags such as maximum length of routine lines.

%MTCHK

Caché equivalent: Not Available

Purpose: Allows you to interrogate the status of a magnetic tape drive.

%NEWED

Caché equivalent: %RD

Purpose: Lists routines that were filed by the program editor during a specified range of dates.

%OS

Caché equivalent: No Direct Equivalent

Purpose: Performs operating system-specific tasks.

%PARTSIZ

Caché equivalent: Not Available

Purpose: Allows you to dynamically change the partition size of the current job.

%RCHANGE

Caché equivalent: %RCHANGE

Purpose: Changes all occurrences of a string in one or more routines.

%RCMP

Caché equivalent: %RCMP

Purpose: Compares two routines in either the current namespace or different namespaces.

%RCOPY

Caché equivalent: %RCOPY

Purpose: Copies a routine from one UCI to another.

Notes: Caché’s %RCOPY will not allow you to copy the routine to another namespace. This utility renames a routine in the current namespace.

%RD

Caché equivalent: %RD

Purpose: Display a routine directory for the current namespace.

%RDEL

Caché equivalent: %RDELETE

Purpose: Deletes one or more routines from the current namespace.

%RELOAD

Caché equivalent: %RCOMPIL

Purpose: Recompiles one or more routines in a namespace.

%RPRT

Caché equivalent: %RD

Purpose: Prints a listing of one or more routines stored in the current namespace.

%RR

Caché equivalent: %SYS.RI, %SYS.RIMF, %urload

Purpose: Restores all or selected routines from an external device and allows them to be renamed.

Notes: Caché does not allow the renaming of routines on import.

%RS

Caché equivalent: %RO, %ROMF, %urprint

Purpose: Allows one or more routines to be saved on an external device.

%RSAND

Caché equivalent: %RFIND

Purpose: Searches one or more routines for occurrences of one or more character strings.

Notes: Unlike MSM, if more than one string is specified in Caché, each string may be anywhere in the routine. MSM requires that both strings be on the same line.

%RSE

Caché equivalent: %RFIND

Purpose: Searches one or more routines for any occurrence of one or more character strings. If more than one string is specified, any one of the strings found satisfies the search.

%RSEL

Caché equivalent: %RSET

Purpose: Allows you to select one or more routines from the current namespace.

%RSIZE

Caché equivalent: %RD, $$^%ROUOBJ(…)

Purpose: Displays the number of blocks used by selected routines.

%SBP

Caché equivalent: Not Available

Purpose: Displays the current status, block location, and buffer offsets for the Sequential Block Processor device.

%SDEV

Caché equivalent: %IS

Purpose: Allows you to select and open a device, and specify the OPEN parameters.

%SI

Caché equivalent: %SS

Purpose: Displays general system information, including the status of system-related processes.

%SP

Caché equivalent: %FREECNT

Purpose: Displays the total amount of disk space within a volume group and the amount of free space.

%SQRT

Caché equivalent: sqr^%math

Purpose: Computes the approximate square root value of a number.

%SS

Caché equivalent: %SS $V(-1,PID)

Purpose: Displays status information about each job currently active on the system.

%T

Caché equivalent: %T

Purpose: Displays the time stored in $HOROLOG in the form HH:MM.

Notes: In Caché, use the INT tag to programmatically get the time.

%TI

Caché equivalent: %TI

Purpose: Converts a time value in external format (for example: 1:05 P.M.) to an internal $HOROLOG format.

Notes: In Caché, use the INT tag to programmatically get the $HOROLOG value.

%TO

Caché equivalent: $ZTIME

Purpose: Converts a time value from internal $HOROLOG format to external format.

%TRANS

Caché equivalent: Not Available

Purpose: Enables you to transfer routines and globals between machines. Includes all of the necessary controls (checksums) to ensure proper transmission of the routines and globals.

%UTL

Caché equivalent: ^UTIL

Purpose: Provides a way to invoke most MSM utilities, based on the type of function to be performed.

%VIDEO

Caché equivalent: Not Available

Purpose: Allows users to modify contents of the PC Console video buffer. (MSM-PC/PLUS and MSM for Windows only).

%XMIT

Caché equivalent: Not Available

Purpose: Enables communication with another port on the system; this is useful for transferring information between machines.

%ZSTIME

Caché equivalent: %RD

Purpose: Displays the last-saved time of one or more routines.

APIMGR

Caché equivalent: No Direct Equivalent

Purpose: MSM-Activate management utilities

Notes: In Caché, use the Caché Direct Client and Server Management Utilities.

BCS

Caché equivalent: BROADCAS, $ZU(9), $ZU(94)

Purpose: Broadcast messages to other terminals or process IDs

BIJ

Caché equivalent: Management Portal

Purpose: Manage Before Image Journaling (Write Image Journaling)

DBMAINT

Caché equivalent: MSU, MOUNT, DISMOUNT, etc.

Purpose: Perform database maintenance

GLBPLACE

Caché equivalent: %SYS.GCREATE

Purpose: Create a new global

JOBEXAM

Caché equivalent: JOBEXAM

Purpose: Display detailed information for a process

JRNL

Caché equivalent: JRNSTART, JRNSTOP, JRNDUMP, JRNSWTCH, JRNRESTO, %SYS.NOJRN

Purpose: Manage After Image Journaling (Flat File Journaling)

KILLJOB

Caché equivalent: RESJOB, , $ZU(4)

Purpose: Terminate a job

LOCKTAB

Caché equivalent: LOCKTAB

Purpose: Display all active locks in the system

OLB

Caché equivalent: BACKUP

Purpose: Perform concurrent backup of databases

OLC

Caché equivalent: GCOMPACT

Purpose: Perform online compression

PEEK

Caché equivalent: Not Available

Purpose: Monitors another terminal device’s activity.

RECOVLCK

Caché equivalent: LOCKTAB

Purpose: Recover a lock

SETBAUD

Caché equivalent: Not Available

Purpose: Temporarily modifies terminal characteristics such as number of data bits, number of stop bits, parity, and baud rate of a terminal.

SSD

Caché equivalent: SHUTDOWN, ZSHUTDOWN, %ZSTOP

Purpose: System shutdown utility

STU

Caché equivalent: STU, ZSTU, %ZSTART

Purpose: System startup utility

SYSGEN

Caché equivalent: Management Portal

Purpose: Generate system configuration

UCIMGR

Caché equivalent: Management Portal

Purpose: Manage UCI configurations

VALIDATE

Caché equivalent: INTEGRIT, CHECKPNT, CHECKMAP

Purpose: Check physical integrity of a database

VERIFY

Caché equivalent: See VALIDATE

Purpose: Verify a database’s physical integrity

XCALLMGR

Caché equivalent: Not Available

Purpose: Manage XCALL functions

FeedbackOpens in a new tab