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.
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_"^"}
Caché equivalent: $ZCRC
Purpose: Computes a checksum (ASCII summation) of one or more routines.
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é.
Caché equivalent: No Direct Equivalent
Purpose: Invokes an interactive program debugging facility.
Notes: See the Caché ObjectScript Reference for information on BREAK and ZBREAK.
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.
Caché equivalent: %DX
Purpose: Converts a decimal value to hexadecimal.
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.
Caché equivalent: $ZDATE($H_Value)
Purpose: Converts a date from internal $HOROLOG format to external format.
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
Caché equivalent: Not Available
Purpose: Performs macro lookup, expansion, and parameter substitution.
Caché equivalent: Not Available
Purpose: Processes directives, has supplementary entry points.
Caché equivalent: %ER
Purpose: Displays error information trapped by the %ET routine.
Caché equivalent: Not Available
Purpose: Display an explanation for database-specific error codes.
Caché equivalent: %ET, %ETN
Purpose: Error trap routine
Notes: Caché’s %ET(%ETN) routine is much more feature-rich.
Caché equivalent: %GIF, %SYS.GIFMSM
Purpose: Fast global restore (block format).
Notes: Use %SYS.GIFMSM to import %FGS-format global saves into Caché.
Caché equivalent: %GOF
Purpose: Fast global save (block format)
Caché equivalent: %RFIRST
Purpose: Display the first line of code for selected routines.
Caché equivalent: Not Available
Purpose: Lists a file stored in the host file system.
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
Caché equivalent: %GCHANGE
Purpose: Changes all occurrences of a string in one or more globals.
Caché equivalent: %GCMP
Purpose: Compares two globals in the same or different namespace.
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.
Caché equivalent: %SYS.GD
Purpose: Display global directory for current namespace.
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.
Caché equivalent: Not Available
Purpose: Deletes one or more globals from a namespace.
Caché equivalent: INTEGRIT, BLKDIST
Purpose: Display efficiency of global(s).
Caché equivalent: Management Portal
Purpose: The System > Globals > Edit Global Data page allows an administrator or operator to edit and delete global data values.
Caché equivalent: %G
Purpose: Lists all or selected portions of a global file.
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.
Caché equivalent: %GO, %GOGEN, %GOF
Purpose: Saves all or selected portions of one or more globals to a device.
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.
Caché equivalent: %SYS.GSET
Purpose: Allows you to select one or more globals from the current namespace.
Caché equivalent: %GSIZE
Purpose: Display size of one or more globals
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.
Caché equivalent: %XD
Purpose: Converts a hexadecimal number to a decimal.
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.
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.
Caché equivalent: $ZF(-1,"CMD")
Purpose: Allows you to issue host operating system commands from within an M program.
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.
Caché equivalent: ^%CD, ZN, $ZU(5)
Purpose: Allows you to switch from one UCI to another.
Caché equivalent: Not Available
Purpose: Provides a display in hexadecimal format, character format, or both for selected memory locations or the VIEW buffer.
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.
Caché equivalent: Not Available
Purpose: Allows you to change environmental mode flags such as maximum length of routine lines.
Caché equivalent: Not Available
Purpose: Allows you to interrogate the status of a magnetic tape drive.
Caché equivalent: %RD
Purpose: Lists routines that were filed by the program editor during a specified range of dates.
Caché equivalent: No Direct Equivalent
Purpose: Performs operating system-specific tasks.
Caché equivalent: Not Available
Purpose: Allows you to dynamically change the partition size of the current job.
Caché equivalent: %RCHANGE
Purpose: Changes all occurrences of a string in one or more routines.
Caché equivalent: %RCMP
Purpose: Compares two routines in either the current namespace or different namespaces.
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.
Caché equivalent: %RD
Purpose: Display a routine directory for the current namespace.
Caché equivalent: %RDELETE
Purpose: Deletes one or more routines from the current namespace.
Caché equivalent: %RCOMPIL
Purpose: Recompiles one or more routines in a namespace.
Caché equivalent: %RD
Purpose: Prints a listing of one or more routines stored in the current namespace.
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.
Caché equivalent: %RO, %ROMF, %urprint
Purpose: Allows one or more routines to be saved on an external device.
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.
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.
Caché equivalent: %RSET
Purpose: Allows you to select one or more routines from the current namespace.
Caché equivalent: %RD, $$^%ROUOBJ(…)
Purpose: Displays the number of blocks used by selected routines.
Caché equivalent: Not Available
Purpose: Displays the current status, block location, and buffer offsets for the Sequential Block Processor device.
Caché equivalent: %IS
Purpose: Allows you to select and open a device, and specify the OPEN parameters.
Caché equivalent: %SS
Purpose: Displays general system information, including the status of system-related processes.
Caché equivalent: %FREECNT
Purpose: Displays the total amount of disk space within a volume group and the amount of free space.
Caché equivalent: sqr^%math
Purpose: Computes the approximate square root value of a number.
Caché equivalent: %SS $V(-1,PID)
Purpose: Displays status information about each job currently active on the system.
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.
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.
Caché equivalent: $ZTIME
Purpose: Converts a time value from internal $HOROLOG format to external format.
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.
Caché equivalent: ^UTIL
Purpose: Provides a way to invoke most MSM utilities, based on the type of function to be performed.
Caché equivalent: Not Available
Purpose: Allows users to modify contents of the PC Console video buffer. (MSM-PC/PLUS and MSM for Windows only).
Caché equivalent: Not Available
Purpose: Enables communication with another port on the system; this is useful for transferring information between machines.
Caché equivalent: %RD
Purpose: Displays the last-saved time of one or more routines.
Caché equivalent: No Direct Equivalent
Purpose: MSM-Activate management utilities
Notes: In Caché, use the Caché Direct Client and Server Management Utilities.
Caché equivalent: BROADCAS, $ZU(9), $ZU(94)
Purpose: Broadcast messages to other terminals or process IDs
Caché equivalent: Management Portal
Purpose: Manage Before Image Journaling (Write Image Journaling)
Caché equivalent: MSU, MOUNT, DISMOUNT, etc.
Purpose: Perform database maintenance
Caché equivalent: %SYS.GCREATE
Purpose: Create a new global
Caché equivalent: JOBEXAM
Purpose: Display detailed information for a process
Caché equivalent: JRNSTART, JRNSTOP, JRNDUMP, JRNSWTCH, JRNRESTO, %SYS.NOJRN
Purpose: Manage After Image Journaling (Flat File Journaling)
Caché equivalent: RESJOB, , $ZU(4)
Purpose: Terminate a job
Caché equivalent: LOCKTAB
Purpose: Display all active locks in the system
Caché equivalent: BACKUP
Purpose: Perform concurrent backup of databases
Caché equivalent: GCOMPACT
Purpose: Perform online compression
Caché equivalent: Not Available
Purpose: Monitors another terminal device’s activity.
Caché equivalent: LOCKTAB
Purpose: Recover a lock
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.
Caché equivalent: SHUTDOWN, ZSHUTDOWN, %ZSTOP
Purpose: System shutdown utility
Caché equivalent: STU, ZSTU, %ZSTART
Purpose: System startup utility
Caché equivalent: Management Portal
Purpose: Generate system configuration
Caché equivalent: Management Portal
Purpose: Manage UCI configurations
Caché equivalent: INTEGRIT, CHECKPNT, CHECKMAP
Purpose: Check physical integrity of a database
Caché equivalent: See VALIDATE
Purpose: Verify a database’s physical integrity
Caché equivalent: Not Available
Purpose: Manage XCALL functions