You are on page 1of 275

0608WLOLW\0DQXDO

9HUVLRQ

0DUFK

0LFURQHWLFV'HVLJQ&RUSRUDWLRQ
Disclaimer
Micronetics Design Corporation makes no representations or warranties with respect
to this manual. Further, Micronetics Design Corporation reserves the right to make
changes in the specification of the product described within this manual and without
obligation of Micronetics Design Corporation to notify any person of such revision or
changes.
The software described in this document is furnished under a license by Micronetics
Design Corporation and may only be used or copied in accordance with the terms of
such license.
This document is copyrighted. Micronetics Design Corporation grants you the right
to download and copy this document only in conjunction with a validly licensed copy
of the software and subject to all provisions of the software license agreement.
Copyright  1998
Micronetics Design Corporation
1375 Piccard Drive
Rockville, Maryland 20850
Telephone: 301-258-2605
Fax: 301-840-8943
E-Mail: info@micronetics.com
WWW: www.micronetics.com

LL
Contents

Preface ix
Acknowledgment .....................................................................................................................................ix
Documentation Conventions....................................................................................................................ix

MSM Utility Programs 1


Overview ...................................................................................................................................................1
Using the MSM Utility Programs..............................................................................................................1
%HELP Utility ..........................................................................................................................................2
Library Utilities .........................................................................................................................................3
System Manager Utilities ..........................................................................................................................3
Common Utility Routines .........................................................................................................................3
Utility Routines Supplied with MSM........................................................................................................4

Date/Time Utilities 7
Overview ...................................................................................................................................................7
%D - Display Date ....................................................................................................................................7
%DI - Date Input .......................................................................................................................................8
%DO - Date Output...................................................................................................................................9
%T - Display Time ..................................................................................................................................10
%TI - Time Input.....................................................................................................................................11
%TO - Time Output ................................................................................................................................12

Communications Utilities 13
Overview .................................................................................................................................................13
%ECHO - Echo Characters .....................................................................................................................13
%TRANS - Transfer Data .......................................................................................................................14
Modifying %TRANS for Non-MSM Systems.................................................................................14
Invoking the %TRANS Utility ........................................................................................................17
Option 1 - Connect to Remote CPU ................................................................................................18
Option 2 - Install Transfer Routines ................................................................................................19
Option 3 - Send Routines or Globals...............................................................................................19
Option 4 - Receive Routines or Globals ..........................................................................................20
%XMIT - Terminal to Machine Connect ................................................................................................21

Routine Utilities 23
Overview .................................................................................................................................................23
%CHKSUM - Compute Checksums .......................................................................................................23
%FL - First Line List ...............................................................................................................................24
%INDEX - Index Routines......................................................................................................................25
%INDSTR - Structured Listing ...............................................................................................................28
%NEWED - Search Routines by Date ....................................................................................................29
%RCHANGE - Routine Change .............................................................................................................31
%RCMP - Routine Compare...................................................................................................................32
%RCOPY - Routine Copy.......................................................................................................................35
%RD - Routine Directory........................................................................................................................36
%RDEL - Routine Delete........................................................................................................................37
%RELOAD - Recompile Programs.........................................................................................................38
%RPRT - Routine Print...........................................................................................................................39
%RR - Routine Restore...........................................................................................................................40

MSM Utility Manual Contents• iii


%RS - Routine Save ............................................................................................................................... 42
%RSAND - Routine Search (And) ......................................................................................................... 43
%RSE - Routine Search (Or) .................................................................................................................. 44
%RSEL - Routine Selector ..................................................................................................................... 45
%RSIZE - Routine Size .......................................................................................................................... 47
^%ZSTIME - ZSAVE Date and Time Display....................................................................................... 48

Global Utilities 49
Overview ................................................................................................................................................ 49
%FLIST - File List .................................................................................................................................. 49
%FGR - Fast Global Restore .................................................................................................................. 51
%FGS - Fast Global Save ....................................................................................................................... 52
%G - Global List..................................................................................................................................... 53
%GCH - Global Characteristics.............................................................................................................. 54
Invoking the %GCH Utility............................................................................................................. 54
Option 1 - Collating Sequence ........................................................................................................ 54
Option 2 - Global Growth ............................................................................................................... 56
Option 3 - Protection....................................................................................................................... 56
Option 4 - Journaling ...................................................................................................................... 58
Option 5 - Allow/Prevent KILL ...................................................................................................... 59
%GCHANGE - Global Change .............................................................................................................. 60
^%GCMP - Global Compare .................................................................................................................. 61
%GCOPY - Global Copy........................................................................................................................ 63
%GD - Global Directory......................................................................................................................... 65
%GDE - Extended Global Directory ...................................................................................................... 66
%GDEL - Global Delete......................................................................................................................... 68
%GE - Global Efficiency........................................................................................................................ 69
%GEDIT - Global Edit ........................................................................................................................... 71
%GL - Global List .................................................................................................................................. 72
%GR - Global Restore ............................................................................................................................ 73
%GS - Global Save................................................................................................................................. 74
%GSE - Global Search ........................................................................................................................... 75
%GSEL - Global Selector....................................................................................................................... 76
%GSIZE - Global Size............................................................................................................................ 78
%OS - OS Interface Utility..................................................................................................................... 79
Invoking the %OS Utility................................................................................................................ 79
Directory Functions......................................................................................................................... 79
Show OS Version............................................................................................................................ 80
Available Disk Space ...................................................................................................................... 80
Change Default Path ....................................................................................................................... 80
File Functions.................................................................................................................................. 80

System Status Utilities 85


Overview ................................................................................................................................................ 85
%ACTJOB - Active Jobs........................................................................................................................ 85
%DEVUSE - Devices in Use.................................................................................................................. 86
%GUCI - Get UCI Name........................................................................................................................ 87
%MDMP - Display Memory................................................................................................................... 88
%SBP - Sequential Block Processor....................................................................................................... 89
%SI - System Information ...................................................................................................................... 90
%SP - Free Space Count......................................................................................................................... 92
%SS - System Status............................................................................................................................... 94

Job Execution Utilities 97


Overview ................................................................................................................................................ 97
%DBSYNC - Synchronize Database ...................................................................................................... 97
%DEBUG - Interactive Debugger .......................................................................................................... 98

iv • Contents MSM Utility Manual


Invoking the %DEBUG Utility.................................................................................................... ....98
Enable Debugging Environment....................................................................................................101
Disable Debugging Environment...................................................................................................101
%ER - Error Report...............................................................................................................................102
Invoking the %ER Utility ..............................................................................................................102
Display Errors................................................................................................................................102
Print Errors ....................................................................................................................................104
Erase Errors ...................................................................................................................................104
Summarize Errors ..........................................................................................................................105
%ERRCODE - Display Error Codes .....................................................................................................106
%ET - Error Trap ..................................................................................................................................107
%HL - Change Job Priority...................................................................................................................108
%LOGON - Log on to a New UCI........................................................................................................109
%MODESET - Environmental Switches ..............................................................................................110
Strict ANSI X11.1-1995 Conformance .........................................................................................110
Force $ZDATE to Always Return a Four-Digit Year ....................................................................110
Set MSMSHELL programmer prompt to [UCI,VGP] ...................................................................110
Version 3 Mode for Cross-UCI References in Functions ..............................................................110
No <ASYNC> Error............................................................................................................... .......110
Wait for RVG Transaction.............................................................................................................111
No Wait for DDP Transaction .......................................................................................................111
SET Null Subscripts ......................................................................................................................111
Reference Null Subscripts .............................................................................................................111
SET $T on JOB command .............................................................................................................111
Routine Lines Greater than 255 .....................................................................................................111
No Screen Erase on WRITE # .......................................................................................................111
Terminate ESC Processing on First Alphanumeric........................................................................112
Undefined Global Nodes Return Null ...........................................................................................112
Undefined Local Nodes Return Null .............................................................................................112
%MTCHK - Magnetic Tape Check.......................................................................................................114
^%MTCHK....................................................................................................................................114
%SET^%MTCHK .........................................................................................................................114
%KILL^%MTCHK........................................................................................................................114
%ERRCHK^%MTCHK ................................................................................................................115
%ERR^%MTCHK.........................................................................................................................115
%PARTSIZ - Change Partition Size .....................................................................................................116
%SDEV - Device Selector ....................................................................................................................117
%VIDEO - Modify Video Buffer..........................................................................................................119

Arithmetic Utilities 121


Overview ...............................................................................................................................................121
%DH - Decimal to Hexadecimal...........................................................................................................121
%HD - Hexadecimal to Decimal...........................................................................................................122
%MFUNC - Mathematical Functions....................................................................................................123
%SQRT - Square Root ..........................................................................................................................124

Database Utilities 125


Overview ...............................................................................................................................................125
BLKDMP - Block Dump ......................................................................................................................125
Invoking the BLKDMP Utility ......................................................................................................127
Global Directory ............................................................................................................................127
Global Pointer................................................................................................................................128
Global Data....................................................................................................................................129
Routine Directory ..........................................................................................................................130
Routine Header..............................................................................................................................130
Routine Data..................................................................................................................................130
Map Block .....................................................................................................................................131

MSM Utility Manual Contents• v


Sequential Block Processor........................................................................................................... 131
Journaling Block ........................................................................................................................... 131
DBFIX - Database Block Fix................................................................................................................ 132
Invoking the DBFIX Utility .......................................................................................................... 132
LIST - List the Contents of a Block .............................................................................................. 133
CLEAR - Clear a Block ................................................................................................................ 134
ADD - Add an Entry to the Block................................................................................................. 134
DELETE - Delete an Entry From the Block.................................................................................. 135
RIGHT - Change Right Link Pointer in Block.............................................................................. 136
OFFSET - Change the Offset Pointer in a Block .......................................................................... 136
SPACE - Change the Free Space Count........................................................................................ 137
ASSIGN - Allocate a Block to a UCI............................................................................................ 137
FREE - Deallocate an In-Use Block.............................................................................................. 137
VERIFY - Verify Free Space in Map Block.................................................................................. 138
ALLOCATE - Allocate a Block.................................................................................................... 138
RELEASE - Deallocate a Block.................................................................................................... 138
WRITE - Write the Block Back to Disk........................................................................................ 138
IGNORE - Ignore Changes to the Block ....................................................................................... 139
HEX - Hexadecimal Listing .......................................................................................................... 139
PATCH - Patch the Block in Hexadecimal ................................................................................... 139
VALIDATE - Validate Block Contents ........................................................................................ 140
DISKMAP - Map of Disk Blocks ................................................................................................. 140
GBMAINT - Global Maintenance ........................................................................................................ 143
Invoking the GBMAINT Utility.................................................................................................... 143
Repair Globals............................................................................................................................... 143
Display Global Efficiency............................................................................................................. 144
Map Block Repair ......................................................................................................................... 144
Programmer Entry Point................................................................................................................ 145
GLBPLACE - Global Placement .......................................................................................................... 146
OLC - Online Compression .................................................................................................................. 147
Invoking the OLC Utility .............................................................................................................. 147
Activate (Start) Compression ........................................................................................................ 147
Deactivate (Stop) Compression..................................................................................................... 147
Display (Show) Compression Status ............................................................................................. 148
Resume Interrupted Compression ................................................................................................. 148
Print History Log........................................................................................................................... 148
Reset History Log.......................................................................................................................... 149
Internal Entry Point ....................................................................................................................... 149
Autostart Entry Point..................................................................................................................... 149
RECOVER - Recover Lost Blocks ....................................................................................................... 150
VALIDATE - Database Validate .......................................................................................................... 151
VERIFY - Map Block Verification....................................................................................................... 154

Configuration Utilities 155


Overview .............................................................................................................................................. 155
DBMAINT - Database Maintenance .................................................................................................... 155
Invoking the DBMAINT Utility.................................................................................................... 156
Create a Volume Group ................................................................................................................ 156
Add a Volume to a Volume Group ............................................................................................... 157
Reinitialize a Mounted Volume .................................................................................................... 159
Display Mounted Volume Groups ................................................................................................ 160
Mount a Volume Group ................................................................................................................ 160
Unmount a Volume Group............................................................................................................ 162
Expand a Database Volume .......................................................................................................... 162
Rename a Volume Group.............................................................................................................. 163
Mount a Remote Volume Group................................................................................................... 164
Edit Volume Group Characteristics .............................................................................................. 165

vi • Contents MSM Utility Manual


Before-Image Journal Functions................................................................................................. ...168
Online Backup Functions ..............................................................................................................168
AUTOBACK^OLB .......................................................................................................................169
Full Backup of a Volume Group....................................................................................................169
STUIRQ - LPT Interrupt Override ........................................................................................................170
SYSGEN - System Generation..............................................................................................................171
TRANSLAT - Translate/Replicate ........................................................................................................173
Invoking the TRANSLAT Utility ..................................................................................................173
Translation Table List....................................................................................................................173
Replication Table List....................................................................................................................174
Edit Replication Table ...................................................................................................................174
Edit Translation Table ...................................................................................................................175
Enable Translation .........................................................................................................................177
Disable Translation........................................................................................................................177
UCIMGR - UCI Management ...............................................................................................................178
Invoking the UCIMGR Utility.......................................................................................................179
Create New UCI ............................................................................................................................179
Rename Existing UCI ....................................................................................................................182
List UCI Status ..............................................................................................................................182
Edit UCI Parameters ......................................................................................................................182
Delete Existing UCI.......................................................................................................................184
User Logon Identifier Edit.............................................................................................................185
Edit UCI Routine Search Paths......................................................................................................187

System Operation Utilities 189


Overview ...............................................................................................................................................189
BCS - Broadcast a Message ..................................................................................................................189
JOBEXAM - Job Examine ....................................................................................................................191
KILLJOB - Terminate a Job..................................................................................................................193
LOCKTAB - Display Lock Table .........................................................................................................194
MAPBP - Map Buffer Pool Pointers.....................................................................................................195
MAPDDB - Map Device Descriptor .....................................................................................................197
Invoking the MAPDDB Utility......................................................................................................197
Terminal DDBs..............................................................................................................................199
Host File Server DDBs ..................................................................................................................199
Sequential Block Processor DDBs ................................................................................................199
VIEW DDB ...................................................................................................................................199
Magnetic Tape DDBs ....................................................................................................................199
MPATCH - Memory Patch ...................................................................................................................200
PEEK - Monitor Terminal Session........................................................................................................201
RECOVLCK - Recover Locks ..............................................................................................................202
SETBAUD - Terminal Baud Rate .........................................................................................................203
SSD - System Shutdown .......................................................................................................................204
STU - System Startup............................................................................................................................206
SWREG - Software Switch Register.....................................................................................................207

Performance Monitoring 209


Overview ...............................................................................................................................................209
RTHIST - Routine Histogram ...............................................................................................................209
Invoking the RTHIST Utility.................................................................................................................210
Begin Histogram Monitoring Run.........................................................................................................211
Print Histogram Reports........................................................................................................................214
Routine Command Execution........................................................................................................215
Routine Global Access Report.......................................................................................................217
Globals Report...............................................................................................................................218
System Statistics Report ................................................................................................................219
Computed Ratios Report ...............................................................................................................231

MSM Utility Manual Contents• vii


System Configuration Parameters Report ..................................................................................... 234
Terminal Response Time Report................................................................................................... 236
CPU and Disk Utilization Reports ................................................................................................ 239
Delete Histogram Reports..................................................................................................................... 240
Terminate Histogram Monitoring Run ................................................................................................. 241

SBP and Spooling 243


Overview .............................................................................................................................................. 243
SBP - Sequential Block Processor ........................................................................................................ 243
Invoking the SBP Utility ............................................................................................................... 243
List Current SBP Area................................................................................................................... 244
Allocate and Initialize New SBP Area .......................................................................................... 244
Reset SBP Area to Empty ............................................................................................................. 245
Delete (Release) SBP Area............................................................................................................ 245
SPL - Spooling Utility .......................................................................................................................... 246
Invoking the SPL Utility ............................................................................................................... 246
Create Spool Area ......................................................................................................................... 246
Free Spool Area............................................................................................................................. 247
Initialize Spool Area ..................................................................................................................... 247
List Spool Area ............................................................................................................................. 248
Enable Spooling ............................................................................................................................ 248
Disable Spooling ........................................................................................................................... 248
Start Despooler.............................................................................................................................. 249
Terminate Despooler Job .............................................................................................................. 249
Remove a Spool File ..................................................................................................................... 249

Glossary 251

Index 257

viii • Contents MSM Utility Manual


Preface

Acknowledgment
Micronetics Standard M (MSM) is an implementation, with extensions, of the ANSI
Standard Specification (X11.1-1995) for the Massachusetts General Hospital Utility
Multi Programming System (MUMPS). MUMPS was developed by the Laboratory
of Computer Science at Massachusetts General Hospital under grant number
HS00240 from the National Center for Health Services Research and Development.
MUMPS was a trademark of the Massachusetts General Hospital.

Documentation Conventions
The following documentation conventions are used in this manual.

Convention Description
RETURN The carriage return key (normally labeled RETURN, ENTER, and so
on).
CTRL+X The CTRL key pressed at the same time as the X key, where X is any
valid key used in combination with the control key.
<ERROR> An MSM error message.
'val' In Help messages, 'val' is used to indicate that the user can enter the
indicated value. The value is entered without the quotes.
> The MSM Programmer prompt.
... The series of items repeats a user-specified number of times.
. Shows a break in a list where consecutive lines have been omitted.
.
.
Bold Items in a dialogue are shown in bold to indicate a user response.

MSM Utility Manual Preface • ix


x • Preface MSM Utility Manual
MSM Utility Programs

Overview
This chapter describes the standard set of utility programs provided by MSM and
explains how to access them. It also provides information on conventions supported
by the utilities.

Using the MSM Utility Programs


All of the MSM utility programs are stored in the Manager’s UCI (the first UCI in
the system). Generally, these programs fall into two classes: Library routines that
are accessible by all users of the system from any UCI, and System Manager routines
that are only accessible from the Manager’s UCI. Routines that can be accessed
from all UCIs begin with a percent sign (%).
These routines facilitate program development and system maintenance by
performing the most common tasks associated with these functions. To ensure
consistency and ease of use, the utility routines all follow a standard set of
conventions.
The following conventions apply to all of the utility routines that are stored in the
Manager’s UCI (MGR).
• At any prompt issued by a utility program, enter a question mark (?) to obtain
additional information about the required response.
• In response to any prompt, enter a circumflex (^) to go back to the previous
question. If the system requests data that can consist of any ASCII character,
then it treats the ^ as data.
• Many of the utility programs supply a menu of numbered options. To select an
option, enter the number of the option or enough characters of the option name
to distinguish it from all other listed options. To obtain additional Help
information about a specific option, enter a question mark followed by the
option number (for example: ?3).
• If a default value exists for the prompt, it is displayed in angle brackets
(<value>). If you enter RETURN, the default value is used. To enter a null
response when a default value is present, enter a minus sign (-).
• Terminate all responses to prompts with RETURN unless the prompt indicates
otherwise.

MSM Utility Manual MSM Utility Programs • 1


• When a utility requests a numeric value, enter the response in decimal.
• When a utility prompts you to select from a predefined list of items, enter a
circumflex followed by either an uppercase L or lowercase l (^L or ^l) to obtain
a list of the items.
• To interrupt execution of a utility program, enter CTRL+C at any time. In
response, the routine displays ‘...Aborted’ and terminates execution.
• Output of utility programs that do not prompt for an output device can be
redirected to a different device by using the following procedure:
OPEN n USE n DO ^utility routine name
In this example, n is the device number of the device to which the output is
being redirected. All of the utility prompts are directed to the device that
initiated execution of the utility, and all other outputs are directed to the
specified device.
Use either of the following methods to invoke the utility routines:
• When you are logged on to the system in programmer mode, use the DO
command to initiate execution of the utility. When the utility completes, the
system returns to programmer mode.
• Log on to the system in run mode and specify the name of the utility to be
executed as part of the logon sequence. The following example illustrates how
to invoke the %GD utility in the Manager’s UCI in run mode:
MSM, Version 4.4.0 Line#1 UCI: MGR:%GD
When the utility completes, the job is automatically logged off MSM.

%HELP Utility
MSM’s general-purpose Help facility provides assistance in using the utility
programs. This routine provides a list of all utility programs that are supplied with
the system, as well as a brief description of each utility program. To invoke the Help
facility, enter the following command from any UCI:
DO ^%HELP
The system responds with the following prompt:
Enter Routine Name:
Enter the name of the routine for which you want Help information, or ^L to obtain a
list of all routine names, or ALL to list the Help information for all routines. This
routine also allows you to print out a hardcopy listing of the Help information.
When you specify that you want a list, the system prompts you for an output device.
You can enter the number of a device or a null response to have the report directed to
your terminal.

2 • MSM Utility Programs MSM Utility Manual


Library Utilities
The Library utilities perform common programming functions. These routines begin
with a percent sign (%) and can be accessed from any UCI. These routines provide
services in the areas of date and time conversion, communications, development and
maintenance of programs, global files, system status, job execution, and arithmetic
functions.

System Manager Utilities


The System Manager utilities are designed for use by those individuals responsible
for ensuring correct operation of the system. To obtain information on using these
utility programs, invoke the %HELP utility while you are logged on to the
Manager’s UCI. Information about the System Manager utilities is not available
from any other UCI. Routines contained in the Manager’s UCI which are not
documented in the %HELP utility are subroutines called by other utilities and should
not be directly executed. You should have a thorough understanding of the MSM
system before using any of these routines. If you modify any System Manager
utility, test it thoroughly before using it on the system.

Common Utility Routines


Three common utility routines are used as subroutines to many MSM utility
programs. These routines provide a general selection mechanism for globals
(%GSEL), routines (%RSEL), and input/output devices (%SDEV). Before using the
other utilities, completely review these routines in this manual. When one of these
routines is incorporated into another utility, no additional explanation is provided,
because it is assumed that you are familiar with how the subroutine works.

MSM Utility Manual MSM Utility Programs • 3


Utility Routines Supplied with MSM
The following table lists the Library utility routines that are supplied with MSM and
describes the functions they perform.
/LEUDU\ 8WLOLW\ 5RXWLQHV

Routine Description
%ACTJOB Returns a string containing the job numbers, separated by circumflexes
(^), of all jobs that are currently executing on the system.
%CHKSUM Computes a checksum (ASCII summation) of one or more routines.
%D Displays the date contained in $HOROLOG on the current device in the
form DD-MMM-YY where DD is the day of the month, MMM is the
three character abbreviation for the month, and YY is the year. An
internal entry point is provided to return the date in a local variable.
%DEBUG Invokes the interactive program debugging facility.
%DEVUSE Displays a list of all OPENed devices and the number of the job that
owns each one.
%DH Converts a decimal value to hexadecimal.
%DI Converts a date from external form (for example: 8-SEP-97) to internal
$HOROLOG format.
%DO Converts a date from internal $HOROLOG format to external format.
%ECHO Allows the program to control the ECHOing of characters at the
terminal. Entry points are provided to turn ECHO on and off.
%ER Displays the error code and values of local symbols for errors that were
trapped using the %ET routine.
%ERRCODE Provides an explanation of MSM error codes.
%ET Records the $ZERROR Special Variable and contents of the local
symbol table in the ^UTILITY("%ER") global in the current UCI.
%FGR Restores the low-level data blocks and rebuilds the pointer blocks for
one or more globals stored on an external device.
%FGS Saves the low-level data blocks for one or more globals to an external
device.
%FL Displays the first line of one or more routines stored on disk in the
current UCI.
%FLIST Lists a file stored in the host file system.
%GCH Allows you to change the attributes of a global, including collating
sequence (numeric or string), protection values (Read, Write, and
Delete), whether or not the global is to be journaled, and growth values.
%GCHANGE Changes all occurrences of a string in one or more globals. You can
verify the changes before they are made.
%GCMP Compares two globals in the same or different UCI.
%GCOPY Copies one or more globals from one UCI to another. The UCI may be
on the same or on a different Volume Group.
%GD Lists the contents of the global directory for the current UCI.
%GDE Provides an extended list of global directories for current UCI.
%GDEL Deletes one or more globals from a UCI.
%GE Displays the amount and percentage of space used for one or more
globals.

4 • MSM Utility Programs MSM Utility Manual


Routine Description
%GEDIT Allows you to edit all or selected portions of a global file. Supports
specification of partial subscript values and subscript ranges.
%GL Lists all or selected portions of a global file. Supports specification of
partial subscript values and subscript ranges.
%GR Restores all or selected globals from an external device and allows them
to be renamed.
%GS Saves all or selected portions of one or more global files on external
storage.
%GSE Searches one or more globals for one or more user-specified strings. A
match occurs if a global contains any of the user-specified strings.
%GSEL Allows you to select one or more globals from the current UCI. Full
selection criteria can be specified, including ranges or all globals
beginning with certain characters.
%GSIZE Displays the number of blocks used by selected globals.
%GUCI Returns the three-character name and internal UCI number for the
current UCI.
%HD Converts a hexadecimal number to decimal.
%HELP Provides Help information about the library of MSM utility programs.
%HL Allows you to change the priority of the current job from high to low or
from low to high.
%HOSTCMD Allows you to issue host operating system commands from within an M
program.
%INDEX Provides a cross-reference listing of one or more routines, and
optionally provides a structured program listing of selected routines.
%LOGON Allows you to switch from one UCI to another.
%MDMP Provides a display in hexadecimal format, character format, or both for
selected memory locations or the VIEW buffer.
%MFUNC Provides mathematical functions including E, PI, SIN, COS.
%MODESET Allows you to change environmental mode flags such as maximum
length of routine lines.
%MTCHK Allows you to interrogate the status of a magnetic tape drive.
%NEWED Lists routines that were filed by the program editor during a specified
range of dates.
%OS Performs operating system-specific tasks such as listing a directory or
renaming a file (MSM-PC/PLUS and MSM-Server for Windows only).
%PARTSIZ Allows you to dynamically change the partition size of the current job.
An internal entry point allows routines to change the partition size while
they are executing.
%RCHANGE Changes all occurrences of a string in one or more routines.
%RCMP Compares two routines in the current UCI or a group of routines in two
different UCIs.
%RCOPY Copies one or more routines from one UCI to another.
%RD Displays a list of all routines saved in the current UCI.
%RDEL Deletes one or more routines from the current UCI.
%RELOAD Re-compiles all routines in a UCI after a system upgrade.
%RPRT Prints a listing of one or more routines stored in the current UCI.
%RR Restores all or selected routines from an external device and allows
them to be renamed.
%RS Allows one or more routines to be saved on an external device.

MSM Utility Manual MSM Utility Programs • 5


Routine Description
%RSAND Searches one or more routines for occurrences of one or more character
strings. If more than one string is specified, each string must be present
in a line to satisfy the search.
%RSE 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 Allows you to select one or more routines from the current UCI. You
can specify full selection criteria, such as ranges or all routines
beginning with or containing a string of characters.
%RSIZE Displays the number of blocks used by selected routines.
%SBP Displays the current status, block location, and buffer offsets for the
Sequential Block Processor device.
%SDEV Allows you to select and open a device, and specify the OPEN
parameters.
%SP Displays the total amount of disk space within a volume group and the
amount of free space.
%SQRT Computes the approximate square root value of a number.
%SI Displays general system information, including the status of system-
related processes.
%SS Displays status information about each job currently active on the
system.
%T Displays the time stored in $HOROLOG in the form HH:MM where
HH is the hour and MM is the minutes past the hour. An internal entry
point is provided to return the time in a local variable.
%TI Converts a time value in external format (for example: 1:05 P.M.) to an
internal $HOROLOG format.
%TO Converts a time value from internal $HOROLOG format to external
format.
%TRANS 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 Provides a way to invoke most MSM utilities, based on the type of
function to be performed.
%VIDEO Saves and restores the contents of the video buffer (MSM-PC/PLUS
and MSM for Windows only).
%XMIT Enables communication with another port on the system; this is useful
for transferring information between machines.
%ZSTIME Displays the last-saved time of one or more routines.

6 • MSM Utility Programs MSM Utility Manual


Date/Time Utilities

Overview
This chapter describes the library utilities that can be called from a program to
format dates, format times, convert input dates and convert input times.

%D - Display Date
The %D utility displays the current date (the value in $HOROLOG) on the current
device in the form DD-MMM-YY, where DD is the day of the month, MMM is the
three-character abbreviation of the month (for example: JUN), and YY is the year.
An internal entry point (INT) can be used to perform the date formatting operation
without displaying the result. In this case, the internal date value ($HOROLOG
form) is passed in the %H local variable and the converted date is returned in the
%DAT and %DAT1 local variables. The value in %DAT is in the form MM/DD/YY
and the value in %DAT1 is in the form DD-MMM-YY.

Sample terminal session


>K

>D ^%D
24-AUG-97
>W

>S %H=$H

>D INT^%D

>W

%DAT="08/24/1997"
%DAT1="24-AUG-97"

>

MSM Utility Manual Date/Time Utilities • 7


%DI - Date Input
This utility converts an external date in virtually any recognizable format to its
corresponding internal ($HOROLOG) computer value. The internal value is the
number of days since December 31, 1840. The date to be converted is passed to the
routine in the %DS local variable. The date may be in any of the following formats:
JANUARY 4, 1998 JAN 4, 1998 4 JAN 1998
1/4/1998 1-4-98 1 4 98
T T+20 T-1
In the above example, T is TODAY, T+20 is TODAY plus 20 days, and T-1 is
yesterday. The date input may be any numeric form in which non-numeric characters
are used as delimiters or a month name with any form of non-numeric delimiters. If a
year is not specified, the current year is assumed. After the routine is invoked, the
following variables are defined:
%DS The external form of the date. This value is not changed by the utility.
%DN The corresponding internal computer date.
%ER If an error occurred, the %ER local variable will be defined and have
a value of -1, and the %DN local variable will not be defined
($D(%DN)=0). If no error occurred, then %ER will not be defined.

Sample terminal session


>D ^%DI

>W

%ER=-1
>K

>S %DS="8-SEP-97"

>D ^%DI

>W

%DN=52115 %DS="8-SEP-97"

8 • Date/Time Utilities MSM Utility Manual


%DO - Date Output
This utility converts an internal computer date ($HOROLOG format) to an external
printable format. The internal date value is passed to the routine in the %DN local
variable. After the routine is invoked, the following variables are defined:
%DN The internal form of the date. This value is not changed by the utility.
%DS The external date in the form MMM DD YYYY, where MMM is the
three-character abbreviation for the month, DD is the day of the
month, and YYYY is the year.
%DA The day of the week (for example: MONDAY, TUESDAY).
%ER If an error occurred, the %ER local variable is defined and has a value
of 1, and the %DS local variable is not defined ($D(%DS)=0). If no
error occurred, then %ER is not defined.
This routine also includes several internal entry points that may be called to return
the external date in a different format. In each case, the external date is returned in
the %DS local variable. The same results can be obtained by using the $ZDATE
function. The following shows the entry points that are available, the format of the
date that is returned, and the corresponding $ZDATE function if applicable.
In the following example, the internal date has a value of 52115.

Entry Format of Date $ZDATE Function


^%DO SEP 8 1997 -
INT^%DO 08 SEP 1997 $ZD(%DS,2)
300^%DO 19970908 (numeric order) -
400^%DO 09/08/97 $ZD(%DS)

Sample terminal session


>K

>S %DN=+$H

>W

%DN=52886

>D ^%DO

>W

%DA="FRIDAY"
%DN=52886
%DS="OCT 18 1997"

>K

>D ^%DO

>W
%ER=1

>

MSM Utility Manual Date/Time Utilities • 9


%T - Display Time
This utility displays the current time (the value in $HOROLOG) on the current
device in the form HH:MM AM, where HH is the hour of the day, MM is the
minutes past the hour, and AM is either AM to indicate before noon or PM to
indicate past noon.
An internal entry point (INT) can be used to perform the time formatting operation
without displaying the result. In this case, the internal time value ($HOROLOG
form) is passed in the %H local variable and the converted time is returned in the
%TIM and %TIM1 local variables. The value in %TIM is in the form HH:MM
(military time where HH is 0 to 23), and the value in %TIM1 is in the form HH:MM
AM.

Sample terminal session


>K

>D ^%T

1:13 PM

>W

>D INT^%T

>W

%TIM="13:15"
%TIM1=" 1:15 PM"

>K

>S %H=$H

>D INTT^%T

>W

%H="52889,47838"
%TIM="13:17"
%TIM1=" 1:17 PM"

>

10 • Date/Time Utilities MSM Utility Manual


%TI - Time Input
This utility converts an external time in virtually any recognizable format to its
corresponding internal ($HOROLOG) value. The internal value is the number of
seconds past midnight. The time to be converted is passed to the routine in the %TS
local variable. The time may be in any of the following formats:
11:23PM 23:23
12NOON 12MIDNIGHT
11 (assumes 11:00 A.M.) 13 (assumes 1:00 P.M.)
In the above example, the words AM, PM, NOON, and MIDNIGHT can be
abbreviated using one or more consecutive letters of the word (for example: NO for
NOON), and the Space character can be used in place of the colon (:). If minutes are
not specified, MSM assumes zero minutes past the hour. After execution, the
following variables will exist:
%TS The external form of the time. This value is not changed by the utility.
%TN The corresponding internal computer time.
%ER If an error occurred, the %ER local variable is defined and has a value of
1, and the %TN local variable is not defined ($D(%TN)=0). If no error
occurred, then %ER is not defined.

Sample terminal session


>S %TS="18:36"

>D ^%TI

>W

%TN=66960
%TS="18:36"

>S %TS="6:36 PM"

>D ^%TI

>W

%TN=66960
%TS="6:36 PM"

MSM Utility Manual Date/Time Utilities • 11


%TO - Time Output
This utility converts an internal computer time ($HOROLOG format) to an external
printable format. The internal time value may range from 0 to 86400 and is passed to
the routine in the %TN local variable. After the routine is invoked, the following
variables are defined:
%TN The internal form of the time. This value is not changed by the utility.
%TS The external time in the form HH:MM where hour is the hours past
midnight (0 through 23), and MM is the minutes past the hour (0
through 59).
This routine also includes an internal entry point (100^%TO) that may be called to
return the external time in non-military time. In this case, the external date is
returned in the %TS local variable in the form of HH:MM AM or HH:MM PM.

Sample terminal session


>S %TN=60000

>D ^%TO

>W

%TN=60000
%TS="16:40"

>D 100^%TO

>W

%TN=60000
%TS=" 4:40 PM"

>

12 • Date/Time Utilities MSM Utility Manual


Communications Utilities

Overview
This chapter describes communication utilities that are used to set terminal echo,
transfer routines or globals between machines, and connect to another machine as a
terminal.

%ECHO - Echo Characters


The %ECHO routine can be called from a routine to turn terminal echo ON or OFF
for a device. The routine must be entered at a line label of ON or OFF (DO
ON^%ECHO or DO OFF^%ECHO), or an error message will be issued. The
number of the device for which echo is to be turned ON or OFF is passed in the
%DEVICE local variable. If the %DEVICE local variable does not exist, then an
error message is issued and no action takes place.
This same function can be achieved through the OPEN and USE parameters. The
following shows the USE commands:

Function USE Command


ON U %DEVICE:(:::::1)
OFF U %DEVICE:(::::1)

Refer to the MSM User's Guide for additional information on the OPEN and USE
parameters for terminal devices.

Sample terminal session


>D ^%ECHO

%ECHO must be entered at label 'ON' or 'OFF'

>D ON^%ECHO

Device for ECHO ON not set (%DEVICE)

>O 3 S %DEVICE=3

>D OFF^%ECHO

>

MSM Utility Manual Communications Utilities • 13


%TRANS - Transfer Data
Use this utility to communicate with another MSM system or any ANSI Standard M
system. You can use it as a terminal emulator or to transfer routines, globals, or both
between systems. The transfer can be from or to the remote system. The utility
completely manages the transfer including installation of the transfer utilities,
selection of routines and globals, generation of checksums, and retrying errors.
Unlike many other data transfer utilities, %TRANS is invoked on only one of the
two systems (the remote system acts as a slave).

To transfer routines or globals between computers


1. Connect to the remote computer via a communications port.
2. Log on to the remote system that is to send or receive the data.
3. If the remote system is running DOWN LEVEL MSM-09 or non-MSM
software, install the transfer routines.
If the remote system is not listed on the menu, programming changes will be
required before installation. System-specific subroutines in %TRANS2 should
be edited to reflect differences in the system software. These system-specific
subroutines are labeled as follows: EON, EOF, EOF1, ZSAVE, TRAP, RSEL,
GSEL, LLEN, and ZCRC.
When installed, the Transfer utilities are sent as non-% routines beginning with
the characters MSMTRAN. They should be placed into the remote system UCI
to which the data will be transferred.
4. Select the routines or globals to be transferred. Select the Send or Receive
option as appropriate, and then specify whether routines or globals are to be
transferred. After you select the routines or globals, each routine or global name
is written to the screen, with a dot for each routine line or global record that has
been transferred. MSM displays a message when the transfer is complete, and
then returns you to the menu.
You may reconnect to the remote system and log off before exiting the utility.
Although the port is CLOSEd at exit, the communication line will remain active until
it is disconnected.

Modifying %TRANS for Non-MSM Systems


The %TRANS2 routine must be modified when %TRANS is to be used with a
system that MSM does not recognize. The following excerpt shows the section of the
%TRANS2 routine that must be modified. The comments in the routine should be
adequate to make the necessary changes.
%TRANS2 ;BFH;MSM DATA TRANSFER UTILITY (PART 3 FOR REMOTE SYSTEM)
;COPYRIGHT MICRONETICS DESIGN CORP @1984-1998
;
; THIS ROUTINE CORRESPONDS TO THE FIRST PART OF %TRANS1
; CONTAINS ENTRY POINTS FOR SENDING AND RECEIVING GLOBALS
; AND ROUTINES.
; SUBROUTINES EON THROUGH ZCRC ARE MICRONETICS SPECIFIC
; AND MAY NEED TO BE EDITED FOR NON-MSM SYSTEMS. ALSO, IF
; YOUR SYSTEM HAS A $ZNEXT FUNCTION FOR STEPPING THROUGH
; AN ENTIRE GLOBAL, EDIT LINE 1+1^%TRANS4 TO INCLUDE YOUR
; SYSTEM
;
W *7,!,"THIS PROGRAM CAN ONLY BE CALLED INTERNALLY",*7 Q

14 • Communications Utilities MSM Utility Manual


RGL ;RECEIVE GLOBALS
S %REC=0 D GO G:%ER EXIT S (%NEW,%REC)=1
RGL1 I %MSM>1 D RD^%TRANS3
I %MSM<2 D RD^MSMTRAN3
G EXIT:%ER
I $E(%DATA,1)'="*" S %GNAM=%DATA D @($S(%MSM>1:"RD^%TRANS3
........ ",1:"RD^ MSMTRAN3")) G EXIT:%ER S @%GNAM=%DATA G RGL1
I %DATA'="**" S %NEW=1 G RGL1
G EXIT
RR ;RECEIVE ROUTINES
S %REC=0 D GO G:%ER EXIT S %RNUM=0,%RNAM="",%REC=1
RR1 I %MSM>1 D RD^%TRANS3
I %MSM<2 D RD^MSMTRAN3
G:%ER EXIT I $E(%DATA,1)'="*" S %RNUM=%RNUM+1,^UTILITY($J,
........ %RNUM)=%DATA G RR1
I %RNAM]"",%RNAM'=$E(%DATA,2,9) X "ZR F %I=1:1:%RNUM ZI
........ ^UTILITY($J,%I) I %I=%RNUM ZS @%RNAM"
K ^UTILITY($J) S %RNAM=$E(%DATA,2,9) G:%RNAM="*" EXIT
S ^UTILITY($J)=%RNAM,%RNUM=0 G RR1
;
SR ;SEND ROUTINES
S (%REC,%RNAM)=0 D GO G:%ER EXIT D EON,RSEL,EOF K %IO W
........ $C(1,13)
SR1 S %RNAM=$N(^UTILITY(%JOB,%RNAM)) G EXIT:%RNAM=-1
S %DATA="*"_%RNAM,%II=0
I %MSM>1 D SD^%TRANS3
I %MSM<2 D SD^MSMTRAN3
S:'%TRFLG %TRFLG=1
G EXIT:%RNAM=""!%ER
SR2 S %II=%II+1 X "ZL @%RNAM S %DATA=$T(+%II)" G SR1:%DATA=""
I %MSM>1 D SD^%TRANS3
I %MSM<2 D SD^MSMTRAN3
G EXIT:%ER,SR2
SGL ;SEND GLOBALS
S (%REC,%GSINT)=0 D GO G:%ER EXIT D EON,GSEL,EOF K %IO
........ W $C(1,13)
G:'$D(^UTILITY(%JOB)) EXIT S %GN=""
S %NEW=1 D @$S(%MSM>1:"1^%TRANS4",1:"1^MSMTRAN4")
G EXIT
;
GO ; INITIALIZE STARTUP, ACKNOWLEDGE LINKUP
S %JOB=$J S:%MSM=-3 %JOB=$J#256
B:%MSM'=-4 0 S:%MSM>0!(%MSM=-1) %ZA=$ZA S (%ER,%LAST,%SEQ,
........ %TRFLG)=0,%HEX="0123456789ABCDEF" D EOF,TRAP,LLEN
K %IO S %DATA="#MSMTRANSGO#" D @($S(%MSM>1:"SD^%TRANS3",
........ 1:"SD^MSMTRAN3"))
Q
EXIT ;
I '%REC,'%ER S %DATA="**" D @$S(%MSM>1:"SD^%TRANS3",1:
........ "SD^MSMTRAN3") F %I=0:0 R %X:1 Q:'$T
D EON
KILL Q:%ER K %ANS,%CHK,%CODE,%DATA,%EOD,%ER,%ERR,%FRAG,%GBR,
........ %GN,%GNAM,%GNV,%GPR,%GSINT
K %GUD,%HEX,%HXD,%I,%II,%J,%JOB,%L,%LAST,%MSM,%NEW,%REC,
........ %RNAM,%RNUM,%RT,%SEQ,%SQ,%SYS,%TRFLG,%X,%Y,%ZA
Q
;
EON ;TURN ECHO ON
I %MSM>0 U 0:(:::::#840001) U 0:(::::%ZA) Q ;MSM SPECIFIC
I %MSM=-1 U 0:(:::::1) U:%ZA#32768\16384 0:(::::16384) Q
I %MSM=-2 D ON^%ECHO Q ;U 0:(0:"C") Q ;ISM
I %MSM=-3 U $I:("":"F") Q ;ISM (MVX ON VAX)
I %MSM=-4 U $I:(ECHO) Q ;D/VX
I %MSM=0 ECHO ON FOR OTHER MUMPS GOES HERE
EOF ;TURN OFF ECHO
I %MSM>0 U 0:(::::#840001:16384) Q ;MSM SPECIFIC
I %MSM=-1 U 0:(::::1:16384) Q ;DSM
I %MSM=-2 D OFF^%ECHO Q ;U 0:(0:"S") Q ;ISM
I %MSM=-3 U $I:("":"FS") Q ;ISM (MVX ON VAX)
I %MSM=-4 U $I:(NOECHO) Q ;D/VX
I %MSM=0 ECHO OFF FOR OTHER MUMPS GOES HERE

MSM Utility Manual Communications Utilities • 15


EOF1 ;TURN OFF ECHO CROSS SYSTEM AND ZLOAD ROUTINE
I %MSM>0!(%MSM=-1) W "B 0 U 0:(::::1) ZR S $ZT=""^%ET""
........ F %I=1:1 R %X Q:%X="""" ZI %X",*13 Q ;MSM & DSM SPECIFIC
I %MSM=-2 S ISM="""S""" W "U 0:(0:"_ISM_") ZR F %I=1:1
........ R %X Q:%X="""" ZI %X",*13 Q ;ISM
I %MSM=-3 W "U $I:("""":""FS"") ZR F %I=1:1 R %X
........ Q:%X="""" ZI %X",*13 Q ;ISM (MVX ON VAX)
I %MSM=-4 W "U $I:(NOECHO) ZR F %I=1:1 R %X Q:%X=""""
........ ZI %X",*13 Q ;D/VX
I %MSM=0 CODE FOR OTHER MUMPS GOES HERE
ZSAVE ;EDIT IF SYSTEM DOESN'T HONOR ZLOAD AND ZSAVE COMMANDS
;SUBRTN IS CALLED BY INSTALL1^%TRANS DURING INSTALLATION
H 1 W "ZS MSMTRAN",%RNUM,*13 H 1 W "ZL MSMTRAN",%RNUM,"
........ D SUM",*13 Q
TRAP ;SET SYSTEM ERROR TRAP
I %MSM>0 S $ZT="^%ET" Q ;MSM SPECIFIC
I %MSM=-1!(%MSM=-3) S $ZT="^%ET" Q ;DSM,MVX
I %MSM=-2 S $ZE="^%ET" Q ;ISM
I %MSM=-4 S $ZE="^%ET" Q ;D/VX
Q ;OTHER
RSEL ;SELECT ROUTINES INTO ^UTILITY($J
I %MSM>0!(%MSM=-1) D ^%RSEL Q ;MSM & DSM-11
I %MSM=-2 D ^%RSET Q ;ISM
I %MSM=-4 D INT^%RSEL G DVXSEL
I %MSM=-3 D ^%RSET Q ;MVX
I %MSM=0 ROUTINE SELECTION FOR OTHER MUMPS GOES HERE
GSEL ;SELECT GLOBALS INTO ^UTILITY($J
I %MSM>0!(%MSM=-1) D ^%GSEL Q ;MSM & DSM
I %MSM=-2 D ^%GSET Q ;ISM
I %MSM=-3 D ^%GSET Q ;MVX
I %MSM=-4 D ^%GSEL G DVXSEL
I %MSM=0 GLOBAL SELECTION FOR OTHER MUMPS GOES HERE
DVXSEL ;PUT %UTILITY ARRAY INTO ^UTILITY($J FOR D/VX
K ^UTILITY(%JOB) S %X="" F %I=0:0 S %X=$O(%UTILITY(%X))
........ Q:%X="" S ^UTILITY(%JOB,%X)=""
K %UTILITY Q
LLEN ;TURN OFF LINE WRAP (CR/LF)
I %MSM>0!(%MSM=-1)!(%MSM=-2)!(%MSM=-3) U 0:0 Q
........ ;MSM,DSM,ISM
I %MSM=-4 U $I:(WIDTH=0) Q ;D/VX
I %MSM=0 CODE FOR OTHER MUMPS GOES HERE
ZCRC ;COMPUTE ASCII CHECKSUM OF VARIABLE '%X' (ADD $Z FUNCTION
........ IF AVAILABLE FOR PERFORMANCE)
S %Y=0 F %J=1:1:$L(%X) S %Y=%Y+$A(%X,%J)
Q
;
SUM S %CHK=0 F %I=1:1 S %T=$T(+%I) Q:%T="" F %J=1:1:$L(%T)
........ S %CHK=%CHK+$A(%T,%J)
W "*"_"S"_"U"_"M"_"*"_%CHK,*13 K %CHK,%I,%J,%T Q

16 • Communications Utilities MSM Utility Manual


Invoking the %TRANS Utility
>D ^%TRANS

MSM Data Transfer Utility

Select Remote System Type:

1 - MSM Current Level


2 - Down Level MSM-09
3 - DSM-11 (Digital Standard MUMPS)
4 - ISM (Intersystems MUMPS - M/11 or M/11+)
5 - M/VX (Intersystems MUMPS for VAX)
6 - D/VX (Digital Standard MUMPS for VAX)
7 - Other MUMPS

Select Option: ?

Enter enough characters to identify the type of remote system that you
will be connected to for the transfer.

MSM Current Level indicates MSM-09 version 3, MUMPS/VM, and all other
MSM products except for MSM-APPLE.
Down Level MSM-09 is any release older than 3.0, or MSM-APPLE.
Enter <RETURN> to continue

Select Remote System Type:

1 - MSM Current Level


2 - Down Level MSM-09
3 - DSM-11 (Digital Standard MUMPS)
4 - ISM (Intersystems MUMPS - M/11 or M/11+)
5 - M/VX (Intersystems MUMPS for VAX)
6 - D/VX (Digital Standard MUMPS for VAX)
7 - Other MUMPS

Select Option: 1 - MSM Current Level

Select Data Transfer Option:

1 - Connect to Remote CPU


2 - Install Transfer Routines
3 - Send Routines or Globals
4 - Receive Routines or Globals

Select Option: ?

Enter one or more characters of the option you wish to select.


Enter <RETURN> or '^' to backup to the previous question,
Enter '^Q' to exit this utility.

The transferring of routines or globals between two computers is a


multi-step process involving four primary procedures.

First, the user must Connect to the remote computer via a


communications port.

Second, the user must Logon to the remote system UCI which will be
sending or receiving the data.

An optional third step is the Installation of the Transfer Utilities.


The Transfer Utilities as distributed are set up to treat the remote
system as an MSM system running any MSM product (including MUMPS/VM)
other than MSM-APPLE or older MSM-09 releases. If this is the case, no
Installation of the Transfer Utilities is necessary, since they are
already present on the remote system.

MSM Utility Manual Communications Utilities • 17


If the remote system is running MSM-APPLE, MSM-09 older than v3.0, or
non-MSM software, then the Transfer Routines must be Installed on the
remote system. If the remote system is 'Other MUMPS', some programming
changes will be necessary before the Installation is done. System
specific subroutines in the routine called %TRANS2 should be edited to
reflect differences in the system software. These system-specific
subroutines are labeled as follows: EON,EOF,EOF1,TRAP,RSEL,GSEL,
LLEN,ZSAVE,ZCRC.

No program changes are necessary if the remote system is running MSM,


MUMPS/VM, or any of the MUMPS implementations on the Remote System Type
menu.

When Installed, the Transfer Utilities are sent as non '%' routines
beginning with the characters 'MSMTRAN', and should be placed into the
remote system UCI to/from which the data will be transferred.

Finally, the routines or globals to be transferred must be selected.


Select the Send or Receive option as appropriate, then specify whether
Routines or Globals are to be transferred. After selecting the desired
routines or globals, each routine/global name will be printed as it
transfers. Routine lines are counted as they go; globals are printed
every 50th node. The user will be notified when the transfer is
complete, and will be returned to the menu for further action.

The user may wish to reconnect to the remote system and logoff before
exiting this utility. The port will be CLOSEd upon exiting the utility,
though the communication line will remain active until disconnected.

Select Data Transfer Option:

1 - Connect to Remote CPU


2 - Install Transfer Routines
3 - Send Routines or Globals
4 - Receive Routines or Globals

Select Option:

Option 1 - Connect to Remote CPU


Select Data Transfer Option:

1 - Connect to Remote CPU


2 - Install Transfer Routines
3 - Send Routines or Globals
4 - Receive Routines or Globals

Select Option: 1 Connect to Remote CPU

I/O PORT? > ?

Enter the port number to be used for the transmission.


While the transmission is in progress, all characters except CTRL/A
and CTRL/B will be passed through to the port.
Use CTRL/B to start or stop recording of the information in the XMIT
global, and CTRL/A to exit the program.

I/O PORT? > 5


Connected to port 5,
Enter control A to return to menu.

CTRL/C

18 • Communications Utilities MSM Utility Manual


MSM-PC/PLUS, Version 4.3 Line #7 UCI: ******* Job #10

>D ^%SS

MSM System Job Status


4:03 PM 25-AUG-97

Max Partitions: 7 Current in Use: 4

JOB UCI/VOL ROUTINE PART-SIZE STATUS #-COMMANDS DEVICES


NUM NAME NAME CURR/MAX TOTAL/INCR OWNED
--- ------- -------- --------- ------- ----------- -------
1 MGR,SYS * * * M S M * * *
8 MGR,SYS DI 0.1/20.0 TermI-6 110/0 6pc
9 MGR,SYS CUSTMANT 0.2/20.0 TermI-4 1279/48 4pc
10 MGR,SYS %SS 4.3/20.0 Running 3237/1006 7pc

p - Principal Device
c - Current Device

Total Buffers In System: 1024, Modified#=0


Disk Cache Efficiency: 98.7%
>

CTRL/A

Disconnected

Option 2 - Install Transfer Routines


Select Data Transfer Option:

1 - Connect to Remote CPU


2 - Install Transfer Routines
3 - Send Routines or Globals
4 - Receive Routines or Globals

Select Option: 2 Install Transfer Routines

Transfer Routines
MSMTRAN2....................................................
Waiting for verification...verification received.
MSMTRAN3...............................................
Waiting for verification...verification received.
MSMTRAN4....................................
Waiting for verification...verification received.
Transfer Complete.

Option 3 - Send Routines or Globals


Select Data Transfer Option:

1 - Connect to Remote CPU


2 - Install Transfer Routines
3 - Send Routines or Globals
4 - Receive Routines or Globals

Select Option: 3 Send Routines or Globals

Do you wish to send Routines or Globals? > ?

Enter enough characters to identify the data type to transfer


Enter '^' or <RETURN> to backup
Enter '^Q' to exit this utility

Do you wish to send Routines or Globals? > GLOBALS

MSM Utility Manual Communications Utilities • 19


Global selector: ^TEST*

3 globals selected.

Global selector: ^

Linking with remote system...

Beginning transfer....

^TEST Complete
^TEST1 Complete
^TEST2 Complete

Transmission complete.

Option 4 - Receive Routines or Globals


Select Data Transfer Option:

1 - Connect to Remote CPU


2 - Install Transfer Routines
3 - Send Routines or Globals
4 - Receive Routines or Globals

Select Option: 4 Receive Routines or Globals

Do you wish to receive Routines or Globals? > ?

Enter enough characters to identify the data type to transfer


Enter '^' or <RETURN> to backup
Enter '^Q' to exit this utility

Do you wish to receive Routines or Globals? > ROUTINES


Linking with remote system...

Select Routines

Routine selector: DIST*

5 routines selected.

Routine selector: MSMDR

1 routine selected.

Routine selector: ^L

DIST DIST1 DIST2 DIST3 DIST4 MSMDR

6 routines selected so far.

Routine selector:

Beginning transfer...

DIST Line # 63
DIST1 Line # 45
DIST2 Line # 10
DIST3 Line # 38
DIST4 Line # 64
MSMDR Line # 40

Transfer complete.

20 • Communications Utilities MSM Utility Manual


%XMIT - Terminal to Machine Connect
This utility serves as a terminal emulator that allows your terminal to be logically
connected through a communications port to another computer. Your terminal then
becomes a terminal for the other system.
All characters that you enter are passed through to the other system, with the
following exceptions:
CTRL+A A control character that is interpreted by the %XMIT utility. Typing
CTRL+A disconnects your terminal from the other system and
reconnects it to your system. The communications link is not
disconnected.
CTRL+B A control character that is interpreted by the %XMIT utility; this is a
toggle switch that begins/ends the recording function. When
recording is turned on, all lines received from the other system are
recorded in the ^XMIT global. The delimiter for a line is the carriage
return. If no carriage return is received, then strings are split into 255
character lengths. The lines are displayed at the terminal as they are
recorded.
When information is recorded in the XMIT global, MSM stores the information in
the following form:
XMIT(NodeNum,LineNum)=DataVal
In this example, NodeNum is a sequential number that is automatically assigned by
%XMIT, LineNum is the sequential line number of the data being stored, and
DataVal is the actual data received from the port. The date and time of the recording
in $HOROLOG format is stored as the NodeNum with no LineNum.

Sample terminal session


>D ^%XMIT

MSM Transmission Utility

I/O PORT? > ?

Enter the port number to be used for the transmission.


While the transmission is in progress, all characters except CTRL/A
and CTRL/B will be passed through to the port.
Use CTRL/B to start or stop recording of the information in the
XMIT global, and CTRL/A to exit the program.

I/O PORT? > 5

CTRL/B

Recording Started in ^XMIT(2,1)

>D ^%SS

MSM Utility Manual Communications Utilities • 21


MSM System Job Status
4:37 PM 25-AUG-97

Max Partitions: 7 Current in Use: 4

JOB UCI/VOL ROUTINE PART-SIZE STATUS #-COMMANDS DEVICES


NUM NAME NAME CURR/MAX TOTAL/INCR OWNED
--- ------- -------- --------- ------- ----------- -------
1 MGR,SYS * * * M S M * * *
8 MGR,SYS DI 0.1/20.0 TermI-7 110/0 7pc
9 MGR,SYS CUSTMANT 0.2/20.0 TermI-4 1279/48 4pc
10 MGR,SYS %SS 1.8/20.0 Running 3237/1006 6pc

p - Principal Device
c - Current Device

Total Buffers In System: 1024, Modified#=0

>CTRL/A

Recording halted, last node is ^XMIT(2,24)

Transmission Complete

When recording a session, the %XMIT utility automatically assigns a NodeNum to


store the data. At the start of the recording, it displays the NodeNum when it is
assigned. When recording is terminated, it displays the NodeNum and the LineNum
of the last DataVal stored. The following example illustrates the XMIT global after
the recording shown above.
^XMIT(0)=2
^XMIT(2)="52893,56640"
^XMIT(2,1)=""
^XMIT(2,2)=""
^XMIT(2,3)=""
^XMIT(2,4)=""
^XMIT(2,5)=" MSM System Job Status"
^XMIT(2,6)=" 4:37 PM 25-AUG-97"
^XMIT(2,7)=""
^XMIT(2,8)=" Max Partitions: 7 Current in Use: 4"
^XMIT(2,9)=""
^XMIT(2,11)" JOB UCI/VOL ROUTINE PART-SIZE STATUS #-COMMANDS DEVICES"
^XMIT(2,12)" NUM NAME NAME CURR/MAX TOTAL/INCR OWNED"
^XMIT(2,13)"'--- ------- ------- -------- ------- ---------- -------"
^XMIT(2,14)" 1 MGR,SYS * * * M S M * * *"
^XMIT(2,15)" 8 MGR,SYS DI 0.1/20.0 TermI-7 110/0 7pc"
^XMIT(2,16)" 9 MGR,SYS CUSTMANT 0.2/20.0 TermI-4 1279/48 4pc"
^XMIT(2,17)" 10 MGR,SYS %SS 1.8/20.0 Running 237/1006 6pc"
^XMIT(2,18)"
^XMIT(2,19)"p - Principal Device"
^XMIT(2,20)"c - Current Device"
^XMIT(2,21)"
^XMIT(2,22)"Total Buffers In System: 1024, Modified#=0"
^XMIT(2,23)""
^XMIT(2,24)""

22 • Communications Utilities MSM Utility Manual


Routine Utilities

Overview
This chapter describes the library utilities that can be used to compute checksums on
routines, index routines, list routines by date edited, edit routines, save and restore
routines, and so on.

%CHKSUM - Compute Checksums


Use this utility to compute a checksum value for one or more routines in a UCI. The
checksum value for a routine is the summation of the ASCII values of every
character in the routine. The actual calculation is performed using the $ZCRC
function. The checksum value for each routine is stored in the CHECKSUM global
in the following format:
^CHECKSUM("RoutName")=CheckSum
In this example, RoutName is the name of the Routine, and CheckSum is the
computed checksum.

Sample terminal session


>D ^%CHKSUM

MSM - Routine Checksum Utility

Routine selector: MSM*

7 routine selected.

Routine selector:

Routine: MSMDR Checksum= 191934


Routine: MSMDRDM1 Checksum= 297343
Routine: MSMDRDMP Checksum= 342541
Routine: MSMDRLOG Checksum= 66670
Routine: MSMDRMEN Checksum= 157722
Routine: MSMDRRS1 Checksum= 225408
Routine: MSMDRRST Checksum= 226410

>

MSM Utility Manual Routine Utilities • 23


%FL - First Line List
This utility lists the first line from one or more routines. Generally, the first line of a
routine contains a line label that matches the name of the routine, a comment that
usually contains the programmer’s initials, and a descriptive comment about the
routine. If the routine was filed through the line editor (^%) or the %E or %G editor
using the .F command, the date and time appear at the end of the first line as a
comment.
This utility calls the %RSEL routine to select one or more routines and then calls the
%SDEV routine to select an output device. The default output device is the user’s
terminal.

Sample terminal session


>D ^%FL

MSM - First Line Display Utility

Routine selector: MS*

4 routines selected.

Routine selector: RETURN

Enter output device <10>: RETURN

FIRST LINE LISTING 18-AUG-97


OF MGR,SYS 1:37 PM

MSMDR: MSMDR ;DJM;Dump/Restore Utility; [ 05/03/97 11:41 AM ]


MSMDRDM1: MSMDRDM1 ;DJM;Dump/Restore menu; [ 05/03/97 5:46 AM ]
MSMDRRS1: MSMDRRS1 ;DJM;RESTORE (part II); [ 05/02/97 5:16 AM ]
MSMDRRST: MSMDRRST ;DJM;Database RESTORE; [ 05/01/97 3:14 PM ]

4 Routines processed.

>

24 • Routine Utilities MSM Utility Manual


%INDEX - Index Routines
This utility produces a cross reference of one or more routines. It invokes the
%RSEL utility to select the routines to index and the %SDEV utility to prompt for
the output device. For each routine selected, the routine name is listed followed by
the size of the routine in bytes and then followed by the cross reference.
The cross reference includes errors and warnings about a routine, a list by local
variable name of the lines that reference them, a list by global variable name of the
lines that reference them, and a list of naked references by line. For local variables or
global variables that are modified by the reference, the reference is followed by a
plus sign (+) in parentheses.
The index also includes a list by line label name within the routine of lines that
reference them and a list of external line labels and the lines that reference them. If
more than one routine is referenced, then a final cross reference of all routines is
included. This includes a list of local variables and the routines that reference them,
a list of global variables and the routines that reference them, a list of the routine
names and the routines they invoke, and a list of the routine names and the routines
that they are invoked by.
If you specify that routines are to be listed along with the cross-reference, then a
structured program listing can be produced as an option.

Sample terminal session


>D ^%INDEX

MSM - VA Cross Reference Utility, Version 7.3


23-DEC-97 8:15 AM

Enter output device <HFS>: RETURN Host File Server


File Name >: TT.LIS

Print more than compiled errors and warnings? <Y> ?

Answering 'yes' to this question has the effect that the program will
produce more detailed information.

Print more than compiled errors and warnings? <Y> RETURN

Print summary only? <N> ?

Answering 'yes' to this question has the effect that the program will
omit any details on the various routines.

Print summary only? <N> RETURN

Print routines? <Y> ?

Answering 'yes' to this question has the effect that the program will
produce a print-out of all routines that are analyzed.

Print routines? <Y> RETURN

Print Regular, Structured or Both? <R> ?

Enter 'R' to obtain a regular print-out.


Enter 'S' for a structured, pretty-printed format.
Enter 'B' for both types of print-out.

Print Regular, Structured or Both? <R> B

MSM Utility Manual Routine Utilities • 25


Print errors and warnings with each routine? <Y> ?

Answering 'yes' to this question has the effect that the program will
produce a print-out in which the error messages and warnings are
interspersed with the lines of code in which these issues were
encountered.

Print errors and warnings with each routine? <Y> RETURN

Index all called routines? <N> ?

Answering 'yes' to this question has the effect that the program will
also analyze all routines that are invoked by the routines in the
current selection.

Index all called routines? <N> RETURN

Routine selector: TT

1 routine Selected

Routine selector:

--- D O N E ---
>
Contents of Report File

MSM - VA Cross Reference Utility, Version 7.3


23-DEC-97 8:16 AM
Indexed Routines: 1

TT

--- CROSS REFERENCING ---

Compiled list of Errors and Warnings 23-DEC-1997, 08:16

No errors or warnings to report

--- Routine Detail --- with R/S ROUTINE LISTING ---

TT 436 printed 23-DEC-1997, 08:16


Page 1

%T ;DJM;FORMAT CURRENT TIME; [ 12/23/97 10:25 am ]


+1 ;Copyright Micronetics Design Corp. @1984
10 NEW %M
SET %M=$PIECE($HOROLOG,",",2)\60
20 NEW %I,%N
SET %TIM=%M\60_":"_(%M#60\10)_(%M#10)
+1 SET %N=" AM"
IF %M'<720
SET %M=%M-720
SET %N=" PM"
IF %M<60
SET %M=%M+720
+2 ; This is a test
+3 SET %I=%M\600
IF '%I
SET %I=" "
SET %TIM1=%I_(%M\60#10)_":"_(%M#60\10)_(%M#10)_%N
+4 IF '$DATA(%NP)
WRITE %TIM1
KILL %TIM,%TIM1
+5 KILL %NP
QUIT
INT SET %NP=""
GOTO 10

26 • Routine Utilities MSM Utility Manual


INTT NEW %M
SET %M=$PIECE(%H,",",2)\60
SET %NP=""
GOTO 20

TT * * 11 Lines, 436 Bytes 23-DEC-1997, 08:16


page 2
105 bytes in comments
%T ;DJM;FORMAT CURRENT TIME; [ 12/23/97 10:25 am ]
;Copyright Micronetics Design Corp. @1984
10 N %M S %M=$P($H,",",2)\60
20 N %I,%N S %TIM=%M\60_":"_(%M#60\10)_(%M#10)
S %N=" AM" S:%M'<720 %M=%M-720,%N=" PM" S:%M<60 %M=%M+720
; This is a test
S %I=%M\600 S:'%I %I=" " S
%TIM1=%I_(%M\60#10)_":"_(%M#60\10)_(%M#10)_%N
I '$D(%NP) W %TIM1 K %TIM,%TIM1
K %NP Q
INT S %NP="" G 10
INTT N %M S %M=$P(%H,",",2)\60,%NP="" G 20

***** INDEX OF TT *****

Local Variables Line Occurrences ( >> not killed explicitly)


( * Changed ! Killed ~ Newed)
>> %H INTT
%I 20~,20+3*
%M 10~*,20,20+1*,20+3,INTT~*
%N 20~,20+1*,20+3
%NP 20+4,20+5!,INT*,INTT*
%TIM 20*,20+4!
%TIM1 20+3*,20+4!

Global Variables ( * Changed ! Killed)


NONE

Naked Globals
NONE

Marked Items
NONE

Label References
10 INT
20 INTT

External References
NONE

***** END *****

--- END ---

MSM Utility Manual Routine Utilities • 27


%INDSTR - Structured Listing
This utility produces a structured program listing for one or more routines. The
%RSEL utility is called to select the routines, and the %SDEV utility is called to
prompt for the output device. The structured listing displays all commands,
functions, and special variables using their full name, and indents FOR loops to show
the scope of the FOR loop.

Sample terminal session


>D ^%INDSTR

MSM - Structured Listings Utility

Routine selector: %T

1 routine selected.

Routine selector:

Enter 'listings' device <3>: 0

%T ;DJM;FORMAT CURRENT TIME; [ 9/23/98 4:36 PM ]


;COPYRIGHT MICRONETICS DESIGN CORP. @1998
10 SET %M=$PIECE($HOROLOG,",",2)\60
20 SET %TIM=%M\60_":"_(%M#60\10)_(%M#10)
SET %N=" AM"
IF %M'<720
SET %M=%M-720,%N=" PM"
IF %M<60
SET %M=%M+720
SET %I=%M\600
IF '%I
SET %I=" "
SET %TIM1=%I_(%M\60#10)_":"_(%M#60\10)_(%M#10)_%N
IF '$DATA(%NP)
WRITE %TIM1
KILL %TIM,%TIM1
KILL %M,%N,%I,%NP
QUIT
INT SET %NP=""
GOTO 10
INTT SET %M=$PIECE(%H,",",2)\60,%NP=""
GOTO 20

>

28 • Routine Utilities MSM Utility Manual


%NEWED - Search Routines by Date
Use this utility to search one or more routines to find routines saved during a
specified date range. The routines must have been saved using the .F command of
the program editor (^%), or the .F or .W command of the %E (^%E) or %G (^%G)
editor. The %RSEL utility is called to select the routines, and the %SDEV utility is
called to prompt for the output device.
At the system prompts, enter starting and ending dates for the search. All routines
saved during the specified data range (which includes the starting and the ending
dates), are displayed. The name of the routine and the ZSAVEd time displayed.

Sample terminal session


>D ^%NEWED

MSM - Routine Date Search Utility


02-MAR-98 3:45 PM

Enter output device <190>: ?

Enter device number for saving output.


Valid device numbers are: 1,3-19,64-199,256 and up,47-50,51-54,59-62.
Enter 'HFS' to select the first available Host File Server device.
Enter 'HOSTSPOOL' to select the Host Spooling device.
Enter 'SBP' to select the first available Sequential Block Processor
device.
Enter 'MTD' to select the first Magnetic Tape Device.

Enter output device <190>: RETURN

Do you want to page output? <N> RETURN

Routine selector: ?
Respond with routine selection criteria.
Valid responses:
Routine name.......Eg: ABC
Routine range......Eg: AAA-HZZZ
Routine pattern....Eg: PROG? PRG*AA A*C?D *XYZ ?
Where '?' matches any single character,
and '*' matches zero or more characters
All routines....... * (selects ALL routines)
Precede any of the above with a '-' to unselect previously selected
routines.
Enter '.' or ' ' to retain previously selected range(s).
Enter '^L' for display of previously selected routines.
Enter '^D' to display all routine names.
Enter '^' or '^Q' to exit.

Routine selector: *
Start date? <2-MAR-1998> ?

Enter the start date for the search.


Valid formats are e.g. 12/22/97, 22-DEC-1997,
22-DEC-97, 12-22-97, or T for 'today'.

Start date? <2-MAR-1998> RETURN


End date? <2-MAR-1998> ?

Enter the end date for the search.


Valid formats are e.g. 12/22/97, 22-DEC-1997,
22-DEC-97, 12-22-97, or T for 'today'.

End date? <2-MAR-1998> RETURN

MSM Utility Manual Routine Utilities • 29


MSM - Routine Date Search Utility
02-MAR-98 3:53 PM
Search of UCI [MGR,MDC]
Routines modified on 2-MAR-1998

%FLIST 2-MAR-1998, 13:21:00, ZSaved at 2-MAR-1998, 13:21:18


%GCMP 2-MAR-1998, 11:05:00, ZSaved at 2-MAR-1998, 11:05:56
%LOGON 2-MAR-1998, 11:37:00, ZSaved at 2-MAR-1998, 11:37:10

217 Routines processed.


3 Routines found.

30 • Routine Utilities MSM Utility Manual


%RCHANGE - Routine Change
This utility searches one or more routines for a particular string of characters and
optionally replaces the string with another string. The %RSEL utility is called to
select the routines, and the %SDEV utility is called to select the output device.
Enter the search string (Replace:) and the new string that will replace the search
string (With:), then specify whether or not the change is to be verified before it is
made. If the result of the replacement would create a line longer than the value set in
%MODESET, MSM issues an error message and no change is made.

Sample terminal session


>D ^%RCHANGE

MSM - Routine Change Utility

Routine selector: TEST*

3 routines selected.

Routine selector:

Replace : %CODE
With : %CODEX

Verify <N> ?

Enter YES to have each change displayed before it is made.


If NO is specified, values will be displayed after it is changed.

Verify <N> Y

Enter output device <4>:

Routine Change 23-JUL-97


of MGR,SYS 2:32 PM
Replace :%CODE
With :%CODEX

TEST1+14
OLD: SD2 S %RT=0,%L=$L(%CODE),%SEQ=%SEQ+1,%X=%SEQ#16+(16*%EOD)
NEW: SD2 S %RT=0,%L=$L(%CODEX),%SEQ=%SEQ+1,%X=%SEQ#16+(16*%EOD)

Verified? <Y> Y

TEST2+67
OLD: KILL Q:ERR K %ANS,%CHK,%CODE,%DATA,%EOD,ERR,%GBR,%GN,%GNAM
NEW: KILL Q:ERR K %ANS,%CHK,%CODEX,%DATA,%EOD,ERR,%GBR,%GN,%GNAM

Verified? <Y> N

TEST3+15
OLD: S %X=$E(%CODE,1,%L+2) I %MSM>1 S %CHK=$ZC(%X,1)
NEW: S %X=$E(%CODEX,1,%L+2) I %MSM>1 S %CHK=$ZC(%X,1)

Verified? <Y> Y

3 Routines processed, string found in 3 of them.

Replace :

Routine selector:

>

MSM Utility Manual Routine Utilities • 31


%RCMP - Routine Compare
Use this utility to compare one or more routines in the same UCI or in two different
UCIs. The %SDEV utility is called to prompt you for the output device and settings.
Output may be directed to the console or terminal device, a host file, or a printer. If
you select host file output and specify the host file name with an .RTF extension, a
rich-text format file will be created if the highlighting is selected (see below).
The utility prompts you to specify whether highlighting is to be used. Enter Yes to
use the new-style routine compare, which highlights differences within lines by using
inverse video on the console or terminals, underlining on printers, or colors in RTF
files. Enter No to use the original version of routine compare, which shows changed
lines but not changes within lines.
The %RSEL utility is called to select the routines to be compared. Specify the UCI
that contains the routines that are to be compared with the selected routines. This can
be the current UCI or a different UCI. If you select the current UCI, each selected
routine is displayed, and you must specify a compare-with routine.
If you selected the old-style non-highlighting option, the system next prompts you to
specify the level of detail to be displayed. Select from the following:
B A brief list of lines that have been added, deleted, and modified. Identical
lines are not listed.
D A detailed list that shows the entire source program and indicates which
lines were added, deleted, and modified; and which lines are identical.
S A statistical list that provides a count of the number of lines added,
deleted, and modified; and the number of lines that are the same.
The compare now is performed. If a device other than the current device is chosen
for the listing and multiple routines are being compared, then the name of each
routine will be written to the current device as it is compared.

Sample terminal sessions


Traditional format:
>D ^%RCMP

MSM - Routine Compare Utility


23-DEC-97 8:11 AM

Enter output device <HFS>: 0

Do you want to page output? <N> RETURN

Line width? <80> 66

Display summary only? <N> ?

Answering 'yes' to this question has the effect that the program will
not display any lines of compared text, but a summary with numbers of
similarities and differences only.

Display summary only? <N> RETURN

Enable highlighting? <N> ?

Answering 'yes' to this question has the effect that the program
produces output with the differences between the various programs shown
in a highlighted fashion.

32 • Routine Utilities MSM Utility Manual


Display identical lines? <Y> ?

Answering 'yes' to this question has the effect that the program will
include lines that are identical in its output.
Answering 'no' will cause such lines to be omitted.

Display identical lines? <Y> RETURN

Routine selector: TT

1 routine Selected

Routine selector: RETURN

Compare [TST,TST] with UCI: ?

Enter the name of the UCI in which the routines are stored that are to
be compared with the selected routines in the current UCI (TST,TST). If
this UCI is in the same volume group as the current one, the name of
the volume group may be omitted.

Compare [TST,TST] with UCI: MGR

Selective compare? <N> ?

Answering 'yes' to this question has the effect that the program will
ask (for all selected routines) for the name of the routine with which
each routine is to be compared. When this option is selected, it will
also be possible to skip comparison of selected routines.

Selective compare? <N> Y

Compare [TST,TST]TT to [MGR,TST]<TT>: %T

Report at: 23-DEC-1997, 8:13 AM

= Status = = Lines from [TST,TST]TT = = Lines from [MGR,TST]%T =

[MODIFIED]%T ;DJM;FORMAT CURRENT TI <> %T ;DJM;FORMAT CURRENT TI


ME; [ 12/23/97 10:25 am <> ME; [ 07/16/92 11:47 am
] <> ]
[ SAME ] ;Copyright Micronetics D <> ;Copyright Micronetics D
esign Corp. @1984 <> esign Corp. @1984
[ SAME ]10 N %M S %M=$P($H,",",2) <> 10 N %M S %M=$P($H,",",2)
\60 <> \60
[ SAME ]20 N %I,%N S %TIM=%M\60_" <> 20 N %I,%N S %TIM=%M\60_"
:"_(%M#60\10)_(%M#10) <> :"_(%M#60\10)_(%M#10)
[ SAME ] S %N=" AM" S:%M'<720 %M= <> S %N=" AM" S:%M'<720 %M=
%M-720,%N=" PM" S:%M<60 % <> %M-720,%N=" PM" S:%M<60 %
M=%M+720 <> M=%M+720
[MODIFIED] ; This is a test <> S %I=%M\600 S:'%I %I=" "
<> S %TIM1=%I_(%M\60#10)_":
<> "_(%M#60\10)_(%M#10)_%N
[ ADDED ] S %I=%M\600 S:'%I %I=" " <>
S %TIM1=%I_(%M\60#10)_": <>
"_(%M#60\10)_(%M#10)_%N <>
[ SAME ] I '$D(%NP) W %TIM1 K %TI <>I '$D(%NP) W %TIM1 K %TI
M,%TIM1 <>
M,%TIM1
[ SAME ] K %NP Q <>K %NP Q
[ SAME ]INT S %NP="" G 10 <>
INT S %NP="" G 10
[ SAME ]INTT N %M S %M=$P(%H,",", <>
INTT N %M S %M=$P(%H,",",
2)\60,%NP="" G 20 <>
2)\60,%NP="" G 20
Statistics: 8 Lines are the same
2 Lines are modified in source routine
1 Line is added to source routine
Zero Lines are deleted from source routine

**** DONE ****


>

MSM Utility Manual Routine Utilities • 33


Highlighted format:
>D ^%RCMP

MSM - Routine Compare Utility


23-DEC-97 8:13 AM

Enter output device <HFS>: 0

Do you want to page output? <N> RETURN

Line width? <80> RETURN

Display summary only? <N> RETURN

Enable highlighting? <N> Y

Type of device (A/E/H/U) <A> ?

The program currently recognizes the following device types:


A = ANSI (X3-64), VT-100 compatible display
E = Epson 850 compatible printer
H = HP-LaserJet compatible printer
U = Unknown (device type for any other situation

Type of device (A/E/H/U) <A> A

Ignore comments? <N> Y

Display identical lines? <Y> N

Routine selector: TT

1 routine Selected

Routine selector: RETURN

Compare [TST,TST] with UCI: MGR

Selective compare? <N> Y

Compare [TST,TST]TT to [MGR,TST]<TT>: %T

23-DEC-1997, 8:13 AM
Comparing:
Name #Lines #Bytes
1: [TST,TST]TT 11 414
2: [MGR,TST]%T 10 397

1:%T ;DJM;FORMAT CURRENT TIME; [ 12/23/97 10:25 am ]


2:%T ;DJM;FORMAT CURRENT TIME; [ 07/16/92 11:47 am ]

1*:20+2 ; This is a test

<done>
Identical lines: 8
Different lines: 2
Lines in 1 only: 1
Lines in 2 only: 0

**** DONE ****


>>

34 • Routine Utilities MSM Utility Manual


%RCOPY - Routine Copy
This utility copies one or more user-selected routines from the current UCI to
another UCI. The %RSEL utility is called to select the routines. Enter the name of
the UCI where the routines are to be copied. You must specify a UCI name other
than the name of the current UCI.
You can selectively copy the programs, which allows some or all of the routines to
be copied and allows renaming of each program. If you select the selective copy
option, MSM prompts you with each routine name before it is copied. For each
routine, select one of the following options: <Y/N/R>
Y{ES} Copies the routine as named.
N{O} Does not copy the routine.
R{ENAME} Renames the routine before copying it. Only the copy is renamed;
the original is not renamed. If you select rename, MSM prompts you
for the new name. If you provide the name, MSM copies the routine
using the new name. If you do not want to copy the program, enter a
carat (^) at this prompt.
If you do not choose selective copy, copying begins immediately. As each routine is
copied, MSM displays the routine’s name. When copying is complete, a message is
displayed. Routines that were saved without source code cannot be copied over a
network using this utility.

Sample terminal session


>D ^%RCOPY

MSM - Routine Copy Utility

Routine selector: TEST*

3 routines selected.

Routine selector:

Copy to UCI: ?

Enter the UCI to which the selected routines are to be copied,


If the UCI is on a volume group different from the one you are
currently logged on to, enter 'UCI,VGP' where VGP is the name of
the volume group containing the UCI to copy to.
Enter '^' to re-select routines,
Enter <RETURN> or '^Q' to quit.
Copy to UCI: BFH
Selective copy (allows rename) <N>: ?

If you choose selective copy, you will be prompted for each routine
that is to be copied.
You must then respond to each prompt to copy the routine, possibly
with a different name.
Selective copy (allows rename) <N>: YES

Routine: TEST1 Copy (Y/N/R) <N>? Y --Copied


Routine: TEST2 Copy (Y/N/R) <N>? Rename to: TEST --Copied
Routine: TEST3 Copy (Y/N/R) <N>? N --Not copied
** DONE **

>

MSM Utility Manual Routine Utilities • 35


%RD - Routine Directory
This utility lists, in alphabetical order, every routine that is saved in the current
directory. The utility’s heading, lists the name of the UCI and volume group, and the
date and time.

Sample terminal session


>D ^%RD

Routine Directory 23-JUL-97


of MGR,SYS 12:04 PM

%ACTJOB %CHKSUM %CURSOR %D %DEVUSE %DH %DI


%DO %ECHO %ER %ER1 %ERRCODE %ET %FL
%GCH %GCH1 %GCHANGE %GD %GDEL %GE %GE1
%GEDIT %GEDIT1 %GEDIT2 %GL %GLO %GPROC %GR
%GS %GSEL %GSEL1 %GSEL2 %GSEL3 %GSEL4 %GUCI
%HD %HELP %HL %ICMSM %ICMSMC %INDEX %INDSTR
%INDX1 %INDX2 %INDX3 %INDX4 %INDX5 %INDX6 %INDX7
%INDX8 %LOGON %MDMP %NEWED CKAGE %PARTSIZ %RCHANGE
%RCOPY %RD %RDEL %RE %RELOAD %ROU %RPRT
%RR %RS %RSAND %RSE %RSEL %SBP %SDEV
%SP %SQRT %SS %T %TI %TO %TRANS
%TRANS1 %TRANS2 %TRANS3 %TRANS4 %TRANS5 %XMIT BENCH
BFH1 BLKCALC BLKDMP BLKDMP1 BVERIFY DBEXPAND DBFIX
DBFIX1 DBFIX2 DBFIX3 DBINIT DBMOUT DEJRNL DEJRNL1
DEJRNL2 DEJRNL3 DISKMAP DIST DIST1 DIST2 DIST3
DIST4 DISTLOAD GLBPLAC1 GLBPLAC2 GLBPLACE GSEL4 JRNALL
JRNDEALL JRNINIT JRNL JRNLSHOW JRNRECOV JRNSTART JRNSTOP
JUNK1 JUNK2 JUNK3 KILLJOB LOCKTAB LOGON MAPBP
MAPDDB MAPDDB0 MAPDDB1 MAPDDB2 MAPDDB3 MAPDDB4 MAPDDB5
MAPSYSB MAPUCI MGRUTIL MPATCH MSMDR MSMDRDM1 MSMDRDMP
MSMDRLOG MSMDRMEN MSMDRRS1 MSMDRRST MSMTRAN2 MSMTRAN3 PCUTIL
PCUTILMU PCXMIT RCOMPARE SBP SBPADD SBPALLOC SBPDEL
SBPFIND SBPINIT SBPLIST SETBAUD SGBKSP SGBUFF SGCFGMSM
SGCNFG SGDDB SGDDB2 SGDDB3 SGDDBDSP SGDEL SGJOB
SGMENU SGMODBUF SGOPSYS SGPAC SGPART SGPSIZE SGTTT
SGTTT2 SGUCI SSD STU STU1 STU2 STUDDB
SWREG SYSGEN SYSGEN2 UCIADD UCIADDG UCIADDR UCIADDV
UCIDUMP UCIEDIT UCIFIND UCIMGR UCIREN UCISTA UPDATE
VALIDAT1 VALIDATE VERIFY ZEDITD ZEDITD1 ZEDITD2 ZEDITD3
ZEDITD4 ZEDITOR ZEDITOR0 ZEDITOR1 ZEDITOR2 ZEDITOR3 ZEDITOR4
ZEDITOR5 ZEDITOR6 ZEDITOR7 ZEDITOR8 ZPCUTIL

217 Routines.

>

36 • Routine Utilities MSM Utility Manual


%RDEL - Routine Delete
Use this utility to delete one or more routines from the current UCI. The %RSEL
utility is called to select the routines to be deleted and then prompts you to verify that
the routines are to be deleted. As each routine is deleted, its name is displayed.

Sample terminal session


>D ^%RDEL

MSM - Routine Delete Utility

Routine selector: TEST*

3 routines selected.

Routine selector:

Delete Selected Routines? <N> ?

Enter Y to delete the selected routines.


Enter anything else to exit the utility

Delete Selected Routines? <N> Y

Deleting ...

TEST1 TEST2 TEST3

>

MSM Utility Manual Routine Utilities • 37


%RELOAD - Recompile Programs
This routine recompiles all routines in the current UCI. Although you only need to
run this routine after each upgrade of MSM to a new release, running it more often
has no negative impact on the system.
Occasionally between releases of MSM, there are changes in the code that is
produced when M routines are compiled. Therefore, running a routine which was
compiled under a previous release of MSM could cause unpredictable results and
possibly, database corruption.
%RELOAD recompiles every routine in a UCI except for those that were ZSAVEd
with no text. Routines with no text (no source code) must be reloaded from their
source text before they are run. %RELOAD saves the names of all routines which
could not be recompiled in the ^UTILITY("%RELOAD","RoutName") global. In
this example, RoutName is the name of the routine that could not be compiled.

Sample terminal session


>D ^%RELOAD

Routine: %ACTJOB ...reloaded


Routine: %CHKSUM ...reloaded
.
.
.
Routine: %FIFI3 ...reloaded

%FIFI4 has no source code, please re-ZSAVE this routine


from its source before running it.

Routine: %FIFMR ...reloaded


.
.
.
Routine: ZEDITOR7 ...reloaded
Routine: ZEDITOR8 ...reloaded

294 routines reloaded.

The list of non-RELOADed routines is in ^UTILITY("%RELOAD"

>

38 • Routine Utilities MSM Utility Manual


%RPRT - Routine Print
This utility prints one or more routines to a user-selected device. The utility calls
%RSEL to select the routines and %SDEV to select the output device. At the
prompts, enter the number of lines per page and the number of characters per line.
For each routine that is printed, a header line is displayed that includes the routine
name, the name of the UCI where the routine is stored, and the date and time the
routine was printed. If the number of characters per line is greater than 80, MSM
prompts you to enter a comment that will appear in the header line.
During printing, lines that are longer than the specified number of characters per line
are split across multiple lines. Periods are inserted in the listing to show where
spaces were inserted by the print utility.

Sample terminal session


>D %RPRT

MSM - Routine Print Utility

Routine selector: %DO

1 routine selected.

Routine selector:

Enter output device <3>: 0


Lines per page <60>: 60
Characters per line <132>: 80

Routine: %DO UCI: MGR,SYS Date/Time: 3-AUG-97, 9:05 AM Page: 1 - 1

%DO ;RTM;INTERNAL DATE TO EXTERNAL; [ 01/29/97 10:38 AM ]


;COPYRIGHT MICRONETICS DESIGN CORP. @1984-1997
K %DS,%ER I '$D(%DN) S %ER=1 Q
100 S %DS=$E("JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC",%2*3-2,%2
........ %2*%3)_" "_+3_$S(%DN<21550!(%DN>58073):" ",1:" 19")_%4 G Q
INT D A S %DS=%3_" "_$E("JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC"
........ ,%2*3-2,%2*3)_" "_%4 G Q
A S %1=$ZD(%DN),%2=$P(%1,"/",1),%3=$P(%1,"/",2),%4=$P(%1,"/"
........ ,3) Q
Q S %DA=$P("THURS FRI SATUR SUN MON TUES WEDNES"," ",%DN#7+1
........ ),%DA=%DA_"DAY" K %1,%2,%3,%4 Q

Done.

>

MSM Utility Manual Routine Utilities • 39


%RR - Routine Restore
Use this utility to restore routines that were saved using the %RS utility. The routine
calls the %SDEV utility to select the input device, which can be any sequential
device, such as the HFS, SBP, or a tape drive. After the device is selected, the utility
reads the first two records from the device (the header information saved by the %RS
utility) and displays it on the terminal. The header information includes the date and
time that the routines were saved and the user comment that was specified when the
routines were saved. Before beginning a restore, use this information to verify that
you are using the correct file.
When restoring routines, you must specify whether or not a selective restore is to be
performed; if so, you can specify which routines are to be restored, rename routines
as they are being restored, skip forward in the restore process until a specified
routine is reached, or continue restoring with prompts until a specified routine is
reached. If you choose not to perform a selective restore, then MSM restores all
routines. As each routine is restored, its name is displayed.
When restoring routines with no source code, %RR restores only the p-code version
that matches the volume group characteristics. If a routine already exists and an
attempt is made to restore it although the required p-code type was not saved, then
the existing routine is deleted. A list of all routines not restored because the correct
p-code type was not saved is created in the global ^UTILITY("%RR",$J).

Sample terminal session


>D ^%RR

MSM - Routine Restore Utility

Enter input device <HFS>:


File Name >: TESTRS

Routine(s) saved at 11:51 AM 23-JUL-97


Header comment is: DEMO USE OF %RS AND %RR UTILITIES.

Selective restore? (Allows rename) <N>: ?

If you chose selective restore (reply YES), you will be prompted


for each routine. You must respond to each prompt to restore the
routine, possibly with a different name.
Enter NO to restore all routines that were saved.
Enter ^ to exit without restoring any routines.

Selective restore? (Allows rename) <N>: YES

Routine: MSMDR Restore (Y/N/R/S/C) <N>? ?

Enter 'Y' to restore the routine using the same name.


Enter 'N' to bypass restoring this routine.
Enter 'R' to restore the routine and rename it.
Enter 'S' to skip without restoring up to a specified routine.
Enter 'C' to continue restoring (no prompts) to specified routine.
Enter '^' to end the entire restore process.

40 • Routine Utilities MSM Utility Manual


Routine: MSMDR Restore (Y/N/R/S/C) <N>? Y --Restored
Routine: MSMDRDM1 Restore (Y/N/R/S/C) <N>? Rename: T1 --Restored
Routine: MSMDRDMP Restore (Y/N/R/S/C) <N>? Y --Restored
Routine: MSMDRLOG Restore (Y/N/R/S/C) <N>? Skip until: ?

Enter the routine name where skipping should stop,


or '^' to return to the previous question
Skip until: MSMTRAN2
Routine: MSMDRLOG --Not restored
Routine: MSMDRMEN --Not restored
Routine: MSMDRRS1 --Not restored
Routine: MSMDRRST --Not restored
Routine: MSMTRAN2 Restore (Y/N/R/S/C) <N>? Y --Restored
Routine: MSMTRAN3 Restore (Y/N/R/S/C) <N>? Y --Restored

4 Routines restored.

>

MSM Utility Manual Routine Utilities • 41


%RS - Routine Save
Use this routine to output one or more routines to a sequential device. For terminal
and printer type devices, use the %RPRT utility, which produces output tailored for
these devices. This utility’s output is in the following format:
date and time in external format
comment supplied by the user
RoutName
routine body
.
.
.
RoutName
routine body
null line to terminate the file
The routine calls the %SDEV utility to select the output device and then prompts for
the size of the output medium in 1-K blocks. After the utility writes the specified
number of blocks, it prompts you to replace the output medium with the next one in
the sequence. After MSM prompts you to enter a comment for use in the dump
header, the %RSEL utility is called to select the routines to be saved. If no source
code is available for a selected routine, any p-code that exists for the routine is saved.

Sample terminal session


>D ^%RS

MSM - Routine Save Utility


Enter output device <HFS>:
File Name >: TESTRS
Enter size of save medium (if applicable): ?

If using removable disks or tape for save, enter the number of 1-K
blocks which each disk will hold. As each disk becomes full, you will
be asked to replace it with an empty one.
If not using removable media, press <RETURN>

Enter size of save medium (if applicable):

Enter comment for dump header : ?


The comment will be displayed with the date and time before the
routines are restored.
Enter comment for dump header : DEMO USE OF %RS AND %RR UTILITIES.

Routine selector: MSM*

9 routines selected.
Routine selector:
Saving ...

MSMDR MSMDRDM1 MSMDRDMP MSMDRLOG MSMDRMEN MSMDRRS1 MSMDRRST


MSMTRAN2 MSMTRAN3
Done.

>

42 • Routine Utilities MSM Utility Manual


%RSAND - Routine Search (And)
This utility searches one or more routines for one or more user-specified strings. A
match occurs if a routine contains all of the user-specified strings. The utility calls
the %RSEL utility to select the routines that are to be searched, and the %SDEV
routine to select the output device where the list of routines that match the search
criteria will be printed. At the prompts, enter the search strings.

Sample terminal session


>D ^%RSAND

MSM - Routine Search Utility

This utility lists only those routines in which all of the specified
strings are found

Routine selector: MSM*

9 routines selected.

Routine selector:

Search for all of the following ...


Search string: W !
Search string: RESTORE
Search string:

Enter output device <4>:

Routine search 23-JUL-97


of MGR,SYS 11:45 AM
search for all of the following:
W !
RESTORE

MSMDR MSMDRLOG MSMDRMEN MSMDRRS1 MSMDRRST

9 Routines processed, string(s) found in 5 of them.

Search for all of the following...


Search string:

Routine selector:

>

MSM Utility Manual Routine Utilities • 43


%RSE - Routine Search (Or)
This utility searches one or more routines for one or more user-specified strings. A
match occurs if a routine contains any of the user-specified strings. The utility calls
the %RSEL utility to select the routines that are to be searched and the %SDEV
routine to select the output device at which the list of routines matching the search
criteria will be printed. At the prompts, enter the search strings.

Sample terminal session


>D ^%RSE

MSM - Routine Search Utility

Routine selector: MSM*

9 routines selected.

Routine selector:

Search for any of the following...


Search string: ALLOCATED
Search string: INCREMENTAL
Search string:

Enter output device <4>:

Routine search 23-AUG-97


of MGR,SYS 2:32 PM
search for any of the following:
ALLOCATED
INCREMENTAL

MSMDR+23: : ALLOCATED - Makes a copy of all blocks in a database


MSMDR+28: : INCREMENTAL - Copy all blocks that have been modified
MSMDR+34: : ALLOCATED options of the database DUMP utility) and
MSMDRDM1+41: W !,"ALLOCATED DUMP, map#=",MAPN+1," of ",DBNAME,!
MSMDRDM1+46: W !,"INCREMENTAL DUMP, map#=",MAPN+1," of ",DBNAME,!
MSMDRLOG+20: W ?39,$S(DXX="F":"FULL",DXX="A":"ALLOCATED",DXX="I":
"INCREMENTAL",1:"**unknown**")
MSMDRMEN+27: ;ALLOCATED;allocated;Dump only blocks actually used
MSMDRMEN+28: ;INCREMENTAL;incremental;Dump only blocks updated

9 Routines processed, string(s) found in 4 of them.

Search for any of the following...


Search string:

Routine selector:

>

44 • Routine Utilities MSM Utility Manual


%RSEL - Routine Selector
Use this general-purpose routine to select one or more routine names from the
routine directory of the current UCI. All MSM utility routines that prompt for routine
selection use this utility. To select the routines, the %RSEL utility uses the $ORDER
function to step through the routine directory. Each routine name returned by the
$ORDER function is examined according to user-specified criteria. If the routine
name matches the specified criteria, the routine is selected. Otherwise, it is skipped
and the next routine name is examined.
You may specify any of the following:
• A single routine name (ABC)
• A range of routine names (AAA-HZZZ)
• A routine name prefix (AB*)
• A wild-card character that matches any single character (AB?DE)
• All routines (*)
If you precede the selection criteria with a minus sign (-), MSM deletes the
corresponding entries from the list of selected routines. Selected routines are stored
in the UTILITY global in the following format:
^UTILITY($J,"RoutName")=""
In this example, $J is the job number of the current job, and RoutName is the name
of the routine. If a list of routines already exists under the job number, enter a period
(.) to use the existing list of routines. The utility will display the existing list and
prompt for additional routine selection criteria.

Sample terminal session


>D ^%RSEL

Routine selector: ?

Respond with routine selection criteria.


Valid responses:
Routine name........Eg: ABC
Routine range.......Eg: AAA-HZZZ
Routine pattern.....Eg: PROG? PRG*AA A*C?D *XYZ
Where '?' matches any single character,
and '*' matches zero or more characters
All routines........ * (selects ALL routines)
Precede any of the above with '-' to unselect previously selected
routines.
Enter '.' or ''to retain previously selected range(s)
Enter '^L' for display of previously selected routines.
Enter '^D' to display all routine names.
Enter '^' or '^Q' to exit.

Routine selector: MSM*

7 routines selected.

Routine selector: %TRA-%TRZ

6 routines selected.

MSM Utility Manual Routine Utilities • 45


Routine selector: ^L

%TRANS %TRANS1 %TRANS2 %TRANS3 %TRANS4 %TRANS5 MSMDR


MSMDRDM1 MSMDRDMP MSMDRLOG MSMDRMEN MSMDRRS1 MSMDRRST

13 routines selected so far.

Routine selector: -%TRANS1-%TRANS3

3 routines de-selected.

Routine selector: ^L

%TRANS %TRANS4 %TRANS5 MSMDR MSMDRDM1 MSMDRDMP


MSMDRLOG MSMDRMEN MSMDRRS1 MSMDRRST

10 routines selected so far.

Routine selector:

>

46 • Routine Utilities MSM Utility Manual


%RSIZE - Routine Size
Use this utility to display the size of one or more routines. Specify the routines to be
displayed and the output device for the report. The report provides the routine name,
the number of p-code and text blocks that exist for the routine, and the total number
of blocks for the routine.

Sample terminal session


>D ^%RSIZE

MSM - Routine Size Utility

Routine selector: %IND*

10 routines selected.

Routine selector:

Enter output device <76>:

MSM - Routine Size Display


of MGR,MDC 20-NOV-97 12:41 PM

Routine P-code Blks Text Blks Total Blks


-------- ---------- --------- ----------
%INDEX 4 4 8
%INDSTR 1 1 2
%INDX1 1 2 3
%INDX2 5 4 9
%INDX3 4 4 8
%INDX4 3 2 5
%INDX5 2 2 4
%INDX6 2 2 4
%INDX7 1 0 1
%INDX8 5 4 9
===========================================

10 Routines Processed

Total P-code Blocks....: 28


Total Text Blocks.....: 25
Total All Blocks......: 53

>

MSM Utility Manual Routine Utilities • 47


^%ZSTIME - ZSAVE Date and Time Display
Use this utility to display the last-saved time of one or more routines. Select a sort
option and the routines to be displayed. The report consists of the routine name,
date, and time saved. The sort option may be by routine name, or by save time
(chronological or reverse chronological).
These routine save times come from the routine directory itself rather than from
textual time stamps added by editors, so the times are guaranteed to be present and
accurate.

Sample terminal session


>D ^%ZSTIME

MSM - Routine 'ZSAVE' Date/Time Display Utility


22-DEC-97 2:39 PM

Enter output device <HFS>: 0

Do you want to page output? <N> Y

Number of lines per page? <23> RETURN

Sort Option? <N> ?

The text to be entered here indicates how the report will be sorted.
N means sort (ascending) by name of routine.
T means sort (ascending) by date and time of update.
-T means sort (decending) by date and time of update.

Sort Option? <N> -T

Routine selector: X*

16 routines Selected

Routine selector: RETURN


Scanning

XCALLMGR 22-DEC-1997, 12:23:06


XCALST 22-DEC-1997, 12:23:06
XCAPRM 22-DEC-1997, 12:23:06
XCAPSEL 22-DEC-1997, 12:23:06
XCAWHDR 22-DEC-1997, 12:23:06
XCAWRT 22-DEC-1997, 12:23:06
XCDEFPK 22-DEC-1997, 12:23:06
XCADEF1 22-DEC-1997, 12:23:04
XCADEF2 22-DEC-1997, 12:23:04
XCAEP 22-DEC-1997, 12:23:04
XCAGEN 22-DEC-1997, 12:23:04
XCAINS 22-DEC-1997, 12:23:04
XCAIP 22-DEC-1997, 12:23:04
XCALL 22-DEC-1997, 12:23:04
XCACHK 22-DEC-1997, 12:23:02
XCADEF 22-DEC-1997, 12:23:02

>

48 • Routine Utilities MSM Utility Manual


Global Utilities

Overview
This chapter describes the library utilities that perform functions such as listing host
files and globals, changing globals and global characteristics, and copying globals.

%FLIST - File List


Use this utility to list a file from the host operating system. Specify the name of the
file to list and whether or not scrolling should occur.
This utility enables you to skip forward or backward a specified number of lines, to
display the next 'n' lines, and to terminate the listing.

Sample terminal session


>D ^%FLIST

MSM - Host File Lister Utility

Enter input device <HFS>: ?

Enter device number for input.


Valid device numbers are: 1,3-19,64-199,256 and up,47-50,51-54,59-62.
Enter 'HFS' to select the first available Host File Server device.
Enter 'HOSTSPOOL' to select the Host Spooling device.
Enter 'SBP' to select the first available Sequential Block Processor
device.
Enter 'MTD' to select the first Magnetic Tape Device.

File Name: ?

Enter the name of the host operating system file to read from.

File Name: ^L

Directory: <C:\MSM\MUMPS> C:\

DMS ARDEPROG.COM ARDLPROG.BIN ARDLPROG.PS2 ARDLPTCH.PS2


CONFIG.EDT DATABASE.MSM DATABASE.OLD DDP386.EXE DDPLAT.EXE
%VGUTIL MGRDMS.RTN MP.EXE

File Name: C:\AUTOEXEC.BAT

MSM Utility Manual Global Utilities • 49


Lines/Page <23>: ?

Please enter number of lines per output page, 0 means no paging.

At the end of every page, the file name will be displayed in angle
brackets, the current line number in the file and the amount of data
above the current line (expressed as a percentage of the file size)
will be displayed, and the output will pause.

When the output pauses, choose one of the following:

To proceed in the normal fashion, press RETURN.


To proceed after skipping a number of lines, enter the number.
To backup several lines, enter a '-' then the number of lines.
To display several lines, enter a '+' then the number of lines.
To choose another host file enter '^'.
To exit this routine enter '^Q'.

Lines/Page <23>:

------Start of file: C:\AUTOEXEC.BAT------------------------------

echo off
prompt $p$g
set edconfig=\utility
path c:;c:\dos;c:\utility
mode com2 9600,n,8,1,p
mode lpt1=com2
mode co80
mskermit set baud 9600
cd \msm

------End of file: READ.ME ----------------------------------

File Name:

>

50 • Global Utilities MSM Utility Manual


%FGR - Fast Global Restore
Use this utility to restore globals that were saved using the %FGS utility. The
routine calls the %SDEV utility to select the input device, which may be any
sequential device, such as the HFS, SBP, or a tape drive. After the device is selected,
the utility reads the first two records from the device (the header information saved
by the %FGS utility) and displays it on the terminal. The header information
includes the date and time that the globals were saved and the user comment that was
specified when the globals were saved. Before you perform a restore, use this
information to verify that you are using the correct file.
When restoring the globals, specify whether or not a selective restore is to be
performed; if so, you can specify which globals are to be restored, skip forward in
the restore process until a specified global is reached, or continue restoring without
prompts until a specified global is reached. If you do not perform a selective restore,
then all globals are restored. As each global is restored, its name is displayed.

Sample terminal session


>D ^%FGR

MSM - Fast Global Restore

Enter input device <HFS>: 47


Parameters <ASU4>: RETURN

Global(s) saved at 1:56 PM 26-OCT-97


Header comment is : ^DD and ^DIC

Selective restore <N>: ?

If you chose selective restore (reply YES), you will be prompted


for each global. You must respond to each prompt to restore the
global, possibly with a different name.
Enter NO to restore all globals that were saved.
Enter ^ to exit without restoring any globals.

Selective restore <N>: NO

Global: ^DD ... Restored with 134 Data Blocks


Global: ^DIC ... Restored with 5 Data Blocks

Restore Complete

>

MSM Utility Manual Global Utilities • 51


%FGS - Fast Global Save
Use this utility to output one or more entire globals (subscript sets are not allowed) to
a sequential device. The routine calls the %SDEV utility to select the output device
and then prompts you for a comment to be stored in the dump header. It then calls
the %GSEL utility to select the globals to be saved.
This utility differs from the %GS utility in the method by which globals are saved. In
the %GS utility, each individual global node is retrieved from the MSM database and
written to the sequential device. In the %FGR utility, the actual low level data
blocks, each containing multiple nodes, are retrieved and written to the sequential
device. This approach is more efficient and requires less space.

Sample terminal session


>D ^%FGS

MUMPS/VM - Fast Global Save Utility

Enter output device <HFS>: 47


Parameters <ASU4>:
Enter comment for dump header : ?

The comment will be displayed with the date and time before the globals
are restored.

Enter comment for dump header : ^DD and DIC Globals

Global selector: ^DD

Global selector: ^DIC

Global selector: ^

Saving Global DD with 134 Data Blocks


Saving Global DIC with 5 Data Blocks

>

52 • Global Utilities MSM Utility Manual


%G - Global List
Use this utility to list one or more globals. The %GSEL utility is called to select the
globals to be listed, and the %SDEV utility is called to prompt for the output device.
If the list is being output to the current device, specify whether or not the list is to be
scrolled. If the global that is listed contains control characters, they are displayed as
\nnn where nnn is the ASCII value of the character.
This utility differs from the %GL utility in that it allows the use of variables to
specify the nodes to be displayed in a partial global list. To specify a string node in a
partial selection, you enclose the node with quotation marks. Unlike the other global
utilities, %G and %GL invoke the %GSEL utility in such a way that ^UTILITY($J is
not modified. You can use the two Global Lister utilities to examine ^UTILITY($J.

Sample terminal session


>S NODE="%ER" D ^%G

MSM - Global Lister Utility

Global selector: ^UTILITY(NODE,52816

Enter output device <0>: RETURN

Do you want to page output? <N> ?

Enter "Y" if you want the listing to pause every 'n' lines and wait for
a Carriage Return before continuing. You will be prompted for 'n'.

Do you want to page output? <N> RETURN

How many lines per screen? <23> ?

Enter the number of lines to list before pausing for a RETURN.

How many lines per screen? <23> RETURN

^UTILITY("%ER",52816,0)="1"
^UTILITY("%ER",52816,1,0)="$ZE=^%ET"
^UTILITY("%ER",52816,1,1)="$H=
^UTILITY("%ER",52816,1,111)="%ERR("3")=2"
^UTILITY("%ER",52816,1,112)="%ERR("4")=3"
^UTILITY("%ER",52816,1,112)="%ERR("5")=4"
^UTILITY("%ER",52816,1,112)="%ERR("6")=5"

Global selector: ^UTILITY($J

Output device for display <0> RETURN


Do you want to scroll? <N> RETURN

^UTILITY(3,0)="4"
^UTILITY(3,"%ZIS")=""
^UTILITY(3,"%ZIS1")=""
^UTILITY(3,"%ZIS2")=""
^UTILITY(3,"%ZIS4")=""

Global selector: ^

>

MSM Utility Manual Global Utilities • 53


%GCH - Global Characteristics
Use this utility to change the characteristics of selected globals, including: the
collating sequence, growth values, protection attributes, whether or not the global is
to be journaled, and whether to allow a KILL of the entire global. To change the
characteristics for a specific global, you must either be logged on to the UCI
containing the global when the utility is run, or logged on to the Manager’s UCI and
using cross-UCI notation to identify the global.
Enter the names of the globals to modify. If a single global is selected, and the global
does not exist, MSM prompts you to specify whether the utility should create the
global. The following sections describe the purpose and use of each function
available in the utility.

Invoking the %GCH Utility


>D ^%GCH

MSM - Global Characteristics Utility

Global selector: ^ MDS does not exist..

Do you want to create global ^MDS <Y> Y

Global created..

Select OPTION

1 Collating Sequence
2 Global Growth
3 Protection
4 Journaling
5 Allow/Prevent KILL

Enter option for ^MDS: ?

Enter '^' or <RETURN> to back up to the previous question, or


Enter '^Q' to exit, or
Enter C-Collating Sequence, P-Protection, G-Global Growth,
A-Allow/Prevent KILL, J-Journaling or Enter the Option number.

Enter option for ^MDS:

Option 1 - Collating Sequence


Subscripted global variables may include numeric-valued subscripts, string-valued
subscripts, or the two types can be intermixed. MSM allows you to specify the order
(either numeric or string) in which the subscripts are to be collated.
For globals where a collating sequence type of string has been specified, all
subscripts (numeric and non-numeric) are treated as character strings and stored in
ASCII collating sequence. For globals where the collating sequence is numeric, the
system stores canonic numbers (numeric values with no leading zeroes or trailing
zeroes after the decimal point) first, followed by the non-numeric values in ASCII
collating sequence. Assume that a global variable X has subscripts of -2, -1.7, -1, 1,
1.1, 2, 3, 10, 20, 30, and "ABC" defined.

54 • Global Utilities MSM Utility Manual


The following table shows the global in both string sequence and numeric sequence.
Note the differences in the negative subscripts and the two-digit numeric subscripts.
&ROODWLQJ 6HTXHQFH
STRING Order NUMERIC Order
^X(-1) ^X(-2)
^X(-1.7) ^X(-1.7)
^X(-2) ^X(-1)
^X(1) ^X(1)
^X(1.1) ^X(1.1)
^X(10) ^X(2)
^X(2) ^X(3)
^X(20) ^X(10)
^X(3) ^X(20)
^X(30) ^X(30)
^X("ABC") ^X("ABC")

When a global is created, it is assumed to be in numeric collating sequence. The


Collating Sequence option of this utility can be used to modify the collating
sequence for any global. In order to change the sequence, the global must exist, but
must not have any subscripts defined. For additional information on the globals,
refer to the MSM User's Guide.

Sample terminal session


Select OPTION

1 Collating Sequence
2 Global Growth
3 Protection
4 Journaling
5 Allow/Prevent KILL

Enter option for ^MDS: 1 Collating Sequence

Enter Collating Sequence for ^MDS <N>: ?

Enter '^' to back up to the previous question, or


Enter '^Q' to exit, or
Enter N-Numeric, S-String

Enter Collating Sequence for ^MDS <N>: STRING

Select OPTION

MSM Utility Manual Global Utilities • 55


Option 2 - Global Growth
MSM allows you great flexibility in determining where global data is to be stored on
disk. After a global is created, additional controls within the system allow you to
specify the areas of the disk that are available to it as it grows. These areas are
referred to as global growth areas. When additional space is required, the system
looks for free blocks with numbers greater than or equal to the block number
specified for global growth. If no free space is found, a <DKFUL> or <DKRES>
error occurs.
You can specify global growth areas for each individual global in a UCI by using the
Global Growth option of this utility. If an expansion area has not been specified for
a particular global, the system uses the expansion parameters defined in the UCI
Table. The expansion parameters for a UCI are specified as part of the SYSGEN
process and can be modified at any time. For additional information on the UCI
Table and the SYSGEN process, refer to the MSM User's Guide.

Sample terminal session


Select OPTION

1 Collating Sequence
2 Global Growth
3 Protection
4 Journaling
5 Allow/Prevent KILL

Enter option for ^MDS: 2 Global Growth

Enter Global Growth Pointer <0>: ?

Enter '^' to back up to the previous question, or


Enter '^Q' to exit, or
Enter a Map number for global growth. The Map Number can be specified
as "Volume Number:Relative Map" if the actual Map Number is not known,
or
Enter '0' to remove the Global Growth Pointer:

Enter Global Growth Pointer <0>: 1:1

Option 3 - Protection
MSM allows you to control who is allowed to access information and the degree of
access permitted. This is done by assigning protection attributes to the global using
the Protection option. Within MSM, protection is divided into the following groups
or classes of user:
SYSTEM Includes all users and programs that are running in the Manager’s UCI
(UCI \#1).
USER Includes all users and programs running in the same UCI where the
global is stored.
GROUP Includes all users and programs that belong to the same UCI group. A
UCI group is the set of all UCIs on the same volume group.
WORLD Includes all users and programs that do not belong to any of the other
three classes.

56 • Global Utilities MSM Utility Manual


Separate protection codes can be assigned for each class of user. Within a class, you
can specify one of the following types of protection:
READ Allows users within the specified class to look at, but not modify, the
global.
WRITE Allows users within the specified class to look at and modify the
global. Users are not permitted to delete (KILL) the global or nodes
within the global.
DELETE Allows users within the specified class to look at, modify, and delete
the global.
NONE Denies all access to the global for users within the specified class.
When a global is created, MSM automatically assigns it default protection codes that
allow the USER and SYSTEM classes READ, WRITE, and DELETE access. The
GROUP and WORLD classes are denied all access to the global. For globals that
begin with a percent sign (%), the GROUP and WORLD classes are allowed READ
access. To modify the default settings, use the Edit Configuration Parameters option
of SYSGEN.

Sample terminal session


Select OPTION

1 Collating Sequence
2 Global Growth
3 Protection
4 Journaling
5 Allow/Prevent KILL

Enter option for ^MDS: Protection

Current --> System = RWD World = NONE Group = NONE User = RWD

Select PROTECTION STATUS

1 N - None
2 R - Read
3 RW - Read/Write
4 RWD - Read/Write/Delete

Enter protection for ^MDS: ?

Enter '^' or <RETURN> to back up to the previous question, or


Enter '^Q' to exit, or
Enter N-None, R-Read, RW-Read/Write, RWD-Read/Write/Delete
or Enter the Protection number.

None means that no access is possible to the class to be specified.


Read means that the class can read the global, but not write or delete
nodes.
Read/Write means that the class can read from and write to the global.
Read/Write/Delete means that the class can also delete nodes.

Select PROTECTION STATUS

1 N - None
2 R - Read
3 RW - Read/Write
4 RWD - Read/Write/Delete

Enter protection for ^MDS: 4 RWD - Read/Write/Delete

MSM Utility Manual Global Utilities • 57


Select CLASS

1 System
2 World
3 Group
4 User

Enter class for ^MDS: ?

Enter '^' or <RETURN> to back up to the previous question, or


Enter '^Q' to exit, or
Enter the class of user that you wish to apply the protection
previously entered as follows: S-System, U-User, G-Group, W-World
or Enter the Class number.

To enter more than one class, separate by commas,


i.e. U,S <RETURN> or 4,1 <RETURN> for User and System classes.

The user classes are defined as follows.

System is the manager's UCI


User is the UCI in which the global resides.
Group is the set of all UCIs on the same volume group.
World is the set of UCIs that does not fall into any
of the other categories.

Protection status is maintained in the following priority order:


System,User,Group,World. For example, if a global in the manager's UCI
has no access for SYSTEM, but has RWD access for USER, a <PROT> error
will be generated when this global is accessed from the manager's UCI.
In this example, when the global is accessed, MSM first checks the
protection status for SYSTEM (MGR) and finds that no access is allowed.
Even though USER access is allowed, MSM preferentially uses the SYSTEM
class protection status in determining global access.

Select CLASS

1 System
2 World
3 Group
4 User

Enter class for ^MDS: 2,3 World, Group

New Status --> System = RWD World = RWD Group = RWD User = RWD

Option 4 - Journaling
In MSM, global journaling is the method used to record information about global
SET and KILL operations. The information that is captured during the SET or KILL
operation is stored on the primary disk device. If a system failure occurs, the global
journal can provide the information necessary to automatically reprocess all or part
of the global SET and KILL operations that have occurred since the last system
backup. Use the Journal option of this utility to specify whether or not journaling is
to occur for a particular global.

Sample terminal session


Select OPTION

1 Collating Sequence
2 Global Growth
3 Protection
4 Journaling
5 Allow/Prevent KILL

Enter option for ^MDS: 4 Journaling

58 • Global Utilities MSM Utility Manual


Select Journaling Option

1 Always journal
2 Journal only when UCI is journaled
3 Never journal

Select Option: ?

Enter '^' to back up to the previous question, or


Enter '^Q' to exit, or
Select option 1 to journal selected global(s) regardless of the
journal status for the UCI.
Select option 2 to journal selected global(s) when the UCI
is journaled.
Select option 3 to disable journaling for the global(s)
regardless of the journaling status for the UCI.

Select Option: 1 - Always journal

Option 5 - Allow/Prevent KILL


Use this option to protect against inadvertent deletion of an entire global by
preventing an unsubscripted KILL. When an unsubscripted KILL is issued to the
global, a <PROT > error occurs, and the global is not deleted. KILLs to individual
subscripted nodes are not affected by this option.

Sample terminal session


Select OPTION

1 Collating Sequence
2 Global Growth
3 Protection
4 Journaling
5 Allow/Prevent KILL

Enter option for ^MDS: 5 Allow/Prevent KILL

Prevent KILL of Entire Global <N>: ?

Enter '^' to back up to the previous question, or


Enter '^Q' to exit, or
Enter YES to prevent unsubscripted KILLs to the selected global(s), or
Enter NO to allow unsubscripted KILLs (allow
the global(s) to be deleted).

Prevent KILL of Entire Global <N>: Y

MSM Utility Manual Global Utilities • 59


%GCHANGE - Global Change
This utility searches one or more globals for a particular string of characters and
optionally replaces the string with another string. The %GSEL utility is called to
select the globals, and the %SDEV utility is called to select the output device. Enter
the search string (Replace:) and the new string that will replace the search string
(With:). Specify whether or not the change is to be verified before it is made. If the
result of the replacement would create a data value longer than 255 characters, an
error message is issued and no change is made.

Sample terminal session


>D ^%GCHANGE

MSM - Global Change Utility

Global selector: ^TEST1

Global selector: ^

Replace : 18
With : 23

Verify <N> ?

Enter YES to have each change displayed before it is made.


Enter NO to have each value displayed after it is changed.

Verify <N> Y

Enter output device <4>: 0

^TEST1(0,"%DMSCON",1)
OLD: ^^^^^^100^110^120^^130^140^150^^160^170^180^^190^200^210
NEW: ^^^^^^100^110^120^^130^140^150^^160^170^230^^190^200^210

Verify <Y> N

^TEST1(0,"%DMSCON/D",5)
OLD: 18^0^1^79^0^^^78^CHECK(%LP(%LW+3))
NEW: 23^0^1^79^0^^^78^CHECK(%LP(%LW+3))

Verify <Y>

Replace :

Global selector: ^

>

60 • Global Utilities MSM Utility Manual


^%GCMP - Global Compare
Use this utility to compare two globals in the same or different UCI. The program
highlights differences within nodes by using inverse video on the console or
terminals, underlining on printers, or colors in RTF files. Nodes that are present in
only one of the two globals are shown by default. Options enable you to ignore
nodes that are present in only one global, and to either display or not display the data
in such nodes.
The %SDEV utility is called and prompts you for the output device and settings.
Output may be directed to the console or terminal device, a host file, or a printer. If
you select host-file output and specify the host file name with the .RTF extension, a
rich-text format file is created.
The %GSEL utility is called to select the globals to be compared. Sub-trees may be
compared, and extended global references may be used to perform cross-UCI
compares.
After you specify how to handle nodes that are present in only one of the two
globals, the compare is performed. Summary information at completion displays the
number of identical nodes, different nodes, nodes found only in the first global, and
nodes found only in the second.

Sample terminal session


> D ^%GCMP

MSM - Global Variable Compare Utility


24-FEB-98 1:55 PM

Enter output device <HFS>: ?

Enter device number for output.


Valid device numbers are: 1,3-19,64-199,256 and up,47-50,51-54,59-62.
Enter 'HFS' to select the first available Host File Server device.
Enter 'HOSTSPOOL' to select the Host Spooling device.
Enter 'SBP' to select the first available Sequential Block Processor
device.
Enter 'MTD' to select the first Magnetic Tape Device.

Enter output device <HFS>: 1

Do you want to page output? <N> ?

Answering 'yes' to this question has the effect that the program will
wait after every screenful.

Do you want to page output? <N> N

Type of device (A/E/H/U) <A> ?

The program currently recognizes the following device types:


A = ANSI (X3-64), VT-100 compatible display
E = Epson 850 compatible printer
H = HP-LaserJet compatible printer
U = Unknown (device type for any other situation

Type of device (A/E/H/U) <A> A

Name of first global variable: ONE

Name of second global variable: TWO

MSM Utility Manual Global Utilities • 61


Show only nodes defined in both? <N> ?

Answering 'yes' to this question has the effect that the program will
display all nodes that it finds in either global variable.

Show only nodes defined in both? <N> RETURN

22-DEC-1997, 14:42 PM
Comparing:
1: ^ONE
2: ^TWO
Press any key to interrupt.

different at ...(0,"BKS"):
1: Modified data
2: 0

2 only: ...("allnew")

Done

Identical nodes: 20
Different data: 1
Nodes in 1 only: 0
Nodes in 2 only: 1

>

62 • Global Utilities MSM Utility Manual


%GCOPY - Global Copy
Use this utility to copy one or more user-selected globals from the current UCI to
another UCI. The %GSEL utility is called to select the globals. Enter the name of
the UCI where the globals are to be copied. The UCI name you specify must be
different than the name of the current UCI.
You can choose to selectively copy the globals, which allows some or all of the
globals to be copied and allows renaming of each global. If you choose the selective
copy option, MSM prompts you with each global name before it is copied and offers
you the following choices: <Y/N/R>.
Y{ES} Copy the global as named.
N{O} Do not copy the global.
R{ENAME} Rename the global before copying it. This does not rename the
original, only the copy. If you select Rename, MSM prompts you for
the new name; if you provide it, the global is copied using the new
name. Enter a carat (^) if you do not want to copy the globals.
If you do not choose selective copy, then copying begins immediately. As each
global is copied, the name of the global is displayed. When copying is complete, a
message is displayed.
%GCOPY does not copy the global characteristics with the data. Before copying
globals that have a collating sequence other than the system default, first create the
global in the destination UCI using either the %GCH or GLBPLACE utilities, and
the proper collating sequence set.

Sample terminal session


>D ^%GCOPY

MSM - Global Copy Utility

Global selector: ^TEST*

3 globals selected.

Global selector: ^^L

TEST TEST2 TEST3

3 globals selected so far.

Global selector: ^

Copy to UCI: ?

Enter the UCI to which the selected globals are to be copied. If


the UCI is on a volume group different from the one you are
currently logged onto, enter 'UCI,VGP' where VGP is the name of the
volume group containing the UCI to copy to.
Enter '^' to re-select globals,
Enter <RETURN> or '^Q' to quit.

Copy to UCI: CLJ

Selective copy (allows rename) <N>: ?

If you choose selective copy, you will be prompted for each global.
You must respond to each prompt to copy the global, possibly with a
different name.

MSM Utility Manual Global Utilities • 63


Selective copy (allows rename) <N>: N

Global: TEST ..Copied


Global: TEST2 ..Copied
Global: TEST3 ..Copied.

Global selector: ^TEST*

3 globals selected.

Global selector: ^

Copy to UCI: GAP

Selective copy (allows rename) <N>: Y

Global: TEST Copy (Y/N/R) <N>? Rename to: TEST4 ..Copied


Global: TEST2 Copy (Y/N/R) <N>? N .. Not copied
Global: TEST3 Copy (Y/N/R) <N>? Y ..Copied.

Global selector: ^

>

64 • Global Utilities MSM Utility Manual


%GD - Global Directory
This utility lists, in alphabetical order, the name of every global saved in the current
directory. As a heading, it lists the name of the UCI and volume group, and the date
and time. In addition, %GD lists translated or replicated globals. For replicated
globals, the replication index is displayed before the translated global name.
In the example below, the DD global and all globals beginning with either DI or DO
are translated to the UCI named VAH,SYS. Globals that begin with %Y are
replicated to the UCI named BAK,SYS.

Sample terminal session


>D ^%GD

Global Directory 16-JUL-98


OF MGR,SYS 6:16 PM

^% ^%HELP ^%RLOADV ^%ZIS ^%ZOSF ^%ZTSCH ^%ZTSK


^BFH ^CDS ^CHKSUM ^CHUCK ^DIFFS ^HELP ^M
^SCR ^SCRDEF ^SCRNST ^SCRUTL ^STATS ^SYS ^SYSGEN
^T ^UTILITY ^XCR ^XMIT ^ZUT

26 - Globals

Translation Table for MGR,SYS

|VAH,SYS|DD |VAH,SYS|DI* |VAH,SYS|DO* 1|BAK,SYS|%Y*

>

MSM Utility Manual Global Utilities • 65


%GDE - Extended Global Directory
Use this utility to produce an extended display of the current UCI’s global directory.
Enter the output device for the report. The following items are provided:
NAME The name of the global.
CS The collating sequence in effect for the global: either
Numeric (N) or String (S).
JOURNAL This flag indicates whether or not the global is to be
journaled. If the global is always to be journaled, this
field will display ON. If the global is never to be
journaled, the field will display OFF. If the field is
blank, then the global will honor the journal status of
the UCI.
PROTC (S,W,G,U) The protection attributes associated with the global.
For each class (S=System, W=World, G-Group, and
U=User), the level of access allowed is displayed
(R=Read, W=Write, and D=Delete). If a type of access
is not allowed, then a period is displayed in that
position.
NOKILL Indicates whether or not the entire global can be
deleted via a KILL on the top level node (a KILL
^gname with no subcripts). The letter Y is displayed if
global delete has been prevented (see %GCH).
TOP POINTER The absolute block number of the top level pointer
BLOCK block. It is followed by the block number expressed in
the form of volume number:relative block number
(0:65).
GROWTH POINTER The map number of where the search for global
expansion is to begin. It is followed by the map
expressed in the form of volume number:relative map
number (0:65).

66 • Global Utilities MSM Utility Manual


Sample terminal session
>D ^%GDE

MSM - Extended Global Directory

Global selector ^*

30 globals selected.

Global selector ^RETURN

Enter output device <65>:

NAME CS JOURNAL PROTC (S,W,G,U) NOKILL TOP POINTER BLOCK GROWTH


------- -- ------- --------------- ------ ----------------- ------
^AC N RWD,...,...,RWD 278300 (1:16156) 0
^BAD N RWD,...,...,RWD 265218 (1:3074) 0
^BFH N RWD,...,...,RWD 265219 (1:3075) 0
^BH N RWD,...,...,RWD 265221 (1:3077) 0
^C N RWD,...,...,RWD 265229 (1:3085) 0
^CDS1 N RWD,...,...,RWD 265512 (1:3368) 0
^DD S RWD,...,...,RWD Y 265231 (1:3087) 0
^DIA N RWD,...,...,RWD Y 265234 (1:3090) 0
^DIBT S RWD,...,...,RWD Y 265235 (1:3091) 0
^DIC S RWD,...,...,RWD Y 265236 (1:3092) 0
^DIE S RWD,...,...,RWD Y 265237 (1:3093) 0
^DIPT S RWD,...,...,RWD Y 265238 (1:3094) 0
^DISV S RWD,...,...,RWD Y 265239 (1:3095) 0
^DIZ S RWD,...,...,RWD Y 265240 (1:3096) 0
^DMS S RWD,...,...,RWD Y 265313 (1:3169) 0
^DMSDEF N RWD,...,...,RWD Y 265321 (1:3177) 0
^DMSNST N RWD,...,...,RWD 265326 (1:3182) 0
^DMSRN N RWD,...,...,RWD 265347 (1:3203) 0
^DMSSYS S RWD,...,...,RWD 265327 (1:3183) 0
^DMSUTL N RWD,...,...,RWD 265328 (1:3184) 0
^UTILITY N RWD,...,...,RWD 265359 (1:3215) 0
^X N RWD,...,...,RWD 265371 (1:15227) 0
^XAC N RWD,...,...,RWD 280023 (1:17879) 0
^XCT N RWD,...,...,RWD 265367 (1:3223) 0
^XMA N RWD,...,...,RWD 265224 (1:3080) 0
^XMB N RWD,...,...,RWD 265223 (1:3079) 0
^XMIT N RWD,...,...,RWD 265439 (1:3295) 0
^XMPORT N RWD,...,...,RWD 265448 (1:3304) 0
^XX N RWD,...,...,RWD 280206 (1:18062) 0

30 - Globals

MSM Utility Manual Global Utilities • 67


%GDEL - Global Delete
Use this utility to delete one or more globals from the current UCI. The %GSEL
utility is called to select the globals to be deleted and prompts you to verify that the
globals are to be deleted. As each global is deleted, its name is displayed.

Sample terminal session


>D ^%GDEL

MSM - Global Delete Utility

Global selector: ^TEST*

3 globals selected.

Global selector: ^^L

TEST TEST2 TEST3

3 globals selected so far.

Global selector: ^

Delete Selected Globals? <N> ?

Enter Y to delete the selected Globals.


Enter anything else to exit the utility

Delete Selected Globals? <N> Y

Deleting ...

^TEST ^TEST2 ^TEST3

>

68 • Global Utilities MSM Utility Manual


%GE - Global Efficiency
Use this utility to display the size and efficiency of one or more globals. The
%GSEL routine is called to select the globals that are to be displayed. For each
global, information is displayed about the highest pointer block (depth 1), the next
level pointer block (depth 2), all the way down to the bottom-level pointer block
(depth n-1) and the data block (depth n), followed by long data blocks, if applicable.
The following information is provided:
Pointer Blk At each level, the address of the left-most block in the tree is
displayed. Use the right-link address in the block to access
all blocks at the same depth.
Space Allocated At each level in the global, the total number of blocks
allocated and the total number of bytes allocated are
displayed. The number of bytes per block is 1012 due to
system overhead associated with control information about
the block.
Bytes Used At each level in the global, the actual number of bytes used
is displayed. This is determined by looking at the byte offset
pointer in each block on the level.
Percent Utilization At each level in the global, the total utilization is computed
using the number of bytes allocated versus the number used.
After all selected globals are displayed, a summary is presented for all globals. It
includes the total space used, and total space utilization expressed as a percentage.

Sample terminal session


>D ^%GE

MSM - Global Size/Efficiency Display


of MGR,SYS 11-MAY-98 10:32 AM

Global selector: ^SCR*

3 globals selected.

Global selector: ^

Enter output device <4>:

MSM Utility Manual Global Utilities • 69


MSM - Global Size/Efficiency Display
of MGR,SYS 10:32 AM

Global Pointer blk Space Allocated Bytes Percent


Name Depth Leftmost Blocks Bytes Used Utilization
-------- ------- -------- ------ ------- ------- -----------
^SCR 1 1371 1 1012 54 5.34
2 1466 3 3036 1607 52.93
3 1372 141 142692 87361 61.22
---- ------ ----- -----
Total for global: 145 146740 89022 60.67

^SCRDEF 1 1308 1 1012 816 80.63


2 1309 62 62744 61318 97.73
---- ------ ----- -----
Total for global: 63 63756 62134 97.46

^SCRSYS 1 1517 1 1012 12 1.19


2 1518 1 1012 192 18.97
---- ------ ----- -----
Total for global: 2 2024 204 10.08
==================================================================

3 Globals processed.

Total space allocated............: 210 blocks


Actual space used................: 151360 characters
Total Space utilization..........: 71.222 %>

70 • Global Utilities MSM Utility Manual


%GEDIT - Global Edit
Use this utility to edit the data values of one or more globals. The %GSEL utility is
called to select the globals. Specify the mode in which the globals are to be edited:
either R (Replace) or E (Edit) mode. In Replace mode, enter the string to replace
(Replace:) and the string that will replace it (With:). This continues until a null
response is given for the replace string; then, the utility processes the next selected
global or exits if no more globals have been selected.
In Edit mode, the global node is displayed. Use the spacebar, TAB, and backspace
characters to move the cursor under the position to be changed. Enter I to insert, D to
delete, or R to replace characters.

Sample terminal session


>D ^%GEDIT

MSM - Global Editor Utility

Global selector: ^TEST1

Mode <R>: ?

Enter E for Edit or R for Replace mode or ?? for more information.

Mode <R>: ??

Replace mode will prompt you for 'replace' and 'with' strings.

Enter ABC...XYZ to replace all characters from ABC through XYZ.

Edit mode means the global will be displayed and you can edit any part
of it by moving the cursor under the part to be edited and then
entering R to Replace, D to Delete, or I to Insert characters.
Press <RETURN> to terminate the Replace and Insert modes.
Cursor movement is controlled by using the space bar to move to the
next punctuation, the period to move to the next character, or the TAB
key to move 8 characters to the right.

Mode <R>:

^TEST1(0,"%DMSCON",1)=^^^^^^100^120^^130^140^150^^160^170^180^^190
Replace: 180 With: 230 Replace:
^TEST1(0,"%DMSCON",1)=^^^^^^100^120^^130^140^150^^160^170^230^^190
Replace:

^TEST1(0,"%DMSCON/D",5)=18^0^1^79^0^^^78^CHECK(%LP(%LW+3))
Replace: 18 With: 23 Replace:
^TEST1(0,"%DMSCON/D",5)=23^0^1^79^0^^^78^CHECK(%LP(%LW+3))
Replace:

^TEST1(0,"%DMSCON/R",190)=44^0^1^0^^^^^78^CHECK(%LP(%LW+3))^L^^160
Replace: 78 With: 192 Replace:
^TEST1(0,"%DMSCON/R",190)=44^0^1^0^^^^^192^CHECK(%LP(%LW+3))^L^^160
Replace:

Global selector: ^

>

MSM Utility Manual Global Utilities • 71


%GL - Global List
Use this utility to list one or more globals. The %GSEL utility is called to select the
globals to be listed, and the %SDEV utility is called to prompt for the output device.
If the list is to be output to the current device, the utility prompts you to specify
whether or not the list is to be scrolled. If the global to be listed contains control
characters, they are displayed as \nnn where nnn is the ASCII value of the character.
This utility differs from the %G utility in that you need not specify quotes around
string subscripts when selecting a partial global to be listed. You cannot use
variables to specify the nodes to be listed. Unlike all other global utilities, %G and
%GL invoke the %GSEL utility in such a way that ^UTILITY($J is not modified.
Use the two Global Lister utilities to examine ^UTILITY($J.

Sample terminal session


>D ^%GL

MSM - Global Lister Utility

Global selector: ^UTILITY(%ER,52716

Enter output device <0>: RETURN


Do you want to scroll? <N> ?

Enter 'Y' if you want the listing to pause every 'n' lines and wait for
a <RETURN> before continuing. You will be prompted for 'n'.

Do you want to scroll? <N> Y


How many lines per screen? <23> ?

Enter the number of lines to list before pausing for a RETURN.

How many lines per screen? <23>

^UTILITY("%ER",52816,0)="1"
^UTILITY("%ER",52816,1,0)="$ZE=^%ET"
^UTILITY("%ER",52816,1,1)="$H=
^UTILITY("%ER",52816,1,111)="%ERR("3")=2 "

Global selector: ^UTILITY(,52816,1

Output device for display <0>


Do you want to scroll? <N>

^UTILITY("%ER",52816,1,0)="$ZE=^%ET"
^UTILITY("%ER",52816,1,1)="$H=
^UTILITY("%ER",52816,1,111)="%ERR("3")=2 "

Global selector: ^

72 • Global Utilities MSM Utility Manual


%GR - Global Restore
Use this utility to restore globals that were saved using the %GS utility. The routine
calls the %SDEV utility to select the input device, which may be any sequential
device such as the HFS, SBP, or a tape drive. After the device is selected, the utility
reads the first two records from the device (the header information saved by the
%GS utility) and displays it on the terminal. The header information includes the
date and time that the globals were saved and any user comment that was specified
when the globals were saved. This allows the user who performs the restore to
verify that the file’s identity before the restore operation begins.
When restoring the globals, MSM prompts you to indicate whether or not a selective
restore is to be performed. If you choose a selective restore, then you can specify
which globals are to be restored, rename globals as they are being restored, skip
forward in the restore process until a specified global is reached, or continue
restoring without prompts until a specified global is reached. If you do not choose
the selective restore, then all globals are restored. As each global is restored, its
name is displayed.

Sample terminal session


>D ^%GR

MSM - Global Restore Utility

Enter input device <HFS>:


File Name >: TESTGS

Global(s) saved at 10:56 AM 17-JUL-98.


Header comment is : DEMO USE OF %GS AND %GR UTILITIES.

Selective restore (allows rename) <N>: ?

If you chose selective restore (reply YES), you will be prompted


for each global. You must respond to each prompt to restore the
global, possibly with a different name.
Enter NO to restore all globals that were saved.
Enter ^ to exit without restoring any globals.

Selective restore (allows rename) <N>: Y

Restoring...

Global: ^TEST1 Restore (Y/N/R/S/C) <N>? ?

Enter 'Y' to restore the global using the same name.


Enter 'N' to bypass restoring this global.
Enter 'R' to restore the global and rename it.
Enter 'S' to skip without restoring up to a specified global.
Enter 'C' to continue restoring (no prompts) to specified global.
Enter '^' to end the entire restore process.

Global: ^TEST Restore (Y/N/R/S/C) <N>? Rename to: T1 ... Restored


Global: ^TEST2 Restore (Y/N/R/S/C) <N>? Y ... Restored
Global: ^TEST3 Restore (Y/N/R/S/C) <N>? Y ... Restored

Restore Complete

>

MSM Utility Manual Global Utilities • 73


%GS - Global Save
Use this routine to output one or more globals to a sequential device. For terminal
and printer devices, use the %GL utility, which produces output tailored for those
devices. The output of the %GS utility is in the following format:
date and time in external format
comment supplied by the user
GloName(SubScripts)
global data for node
.
.
.
GloName(SubScripts)
global data for node
* or ** to indicate end of global or end of file
* or ** to indicate end of global or end of file
The routine calls the %SDEV utility to select the output device. It then prompts for
the size of the output media in 1-K blocks. After the utility writes the specified
number of blocks, it prompt you to replace the medium with the next one in the
sequence. This allows different types of tape drives and floppy disk drives to be
used. After you enter a comment to be used in the dump header, the %GSEL utility
is called to select the globals to be saved.

Sample terminal session


>D ^%GS

MSM - Global Save Utility

Enter output device <HFS>:


File Name >: TESTGS
Enter size and save medium (if applicable):
Enter comment for dump header : ?

The comment will be displayed with the date and time before the globals
are restored.

Enter comment for dump header : DEMO OF %GS AND %GR UTILITIES

Global selector: ^TEST*

3 globals selected.

Global selector: ^

Saving ...

^TEST(12)
^TEST2
^TEST3("DEMO")

Save complete.

>

74 • Global Utilities MSM Utility Manual


%GSE - Global Search
Use this utility to search one or more globals for one or more user-specified strings.
A match occurs if a routine contains any of the user-specified strings. The utility
calls the %GSEL utility to select the globals that are to be searched, and the %SDEV
routine to select the output device where the list of globals that match the search
criteria will be printed. MSM then prompts you for the search strings.

Sample terminal session


>D ^%GSE

MSM - Global Search Utility

Global selector: ^HELP

1 global selected.

Global selector: ^
Search string: program
Search string:

Enter output device <4>:

Global search 23-AUG-98


of MGR,SYS 2:32 PM
search for any of the following:
program

^HELP("ZEDF",0)=Load ^%E with Full Screen program editor

Search string:

Global selector: ^

>

MSM Utility Manual Global Utilities • 75


%GSEL - Global Selector
This general-purpose routine is used for selecting one or more global names from the
global directory of the current UCI. All of the MSM utility routines that prompt for
global selection use this utility. To select the globals, the %GSEL utility uses the
$ORDER function to step through the global directory. Each global name returned
by the $ORDER function is examined using the user-specified criteria. If the global
name matches the specified criteria then the global is selected; otherwise, it is
skipped and the next global name is examined.
You may specify a single global name (ABC), a range of global names
(AAA-HZZZ), a global name prefix (AB*), or all globals (*). The selection criteria
may be preceded by a minus sign (-) to delete the corresponding entries from the list
of selected globals. Selected globals are stored in the UTILITY global in the
following format:
^UTILITY($J,"GloName")=""
In this example, $J is the job number of the current job, and GloName is the name of
the global. If a list of globals already exists under the job number, enter a period (.)
to use this list. When this is done, the utility displays the existing list and prompts
for additional global selection criteria. When called from the %G and %GL (Global
Lister) utilities, selected globals are stored in the %UTILITY local variable, which
allows ^UTILITY($J) to be examined.
By default, %GSEL allows selection of globals in other UCIs and on remote systems
accessible through MSM-NET. It also allows the selection of portions of globals.
Any or all of these features can be disabled using an internal entry point called
SELECT. Flags are passed to %GSEL using the parameter passing syntax which can
specify which of the features are allowed.
For example, DO SELECT ^%GSEL("UR") allows cross-UCI and remote system
selection but not partial selection. The following table describes all of the options
that are available in %GSEL utility program.

Parameter Function
U Allows cross-UCI selection of globals on local system.
R Allows selection of globals on remote systems.
P Allows partial global selection.
1 Allows only one global to be selected.

If %GSEL is invoked at the routine start (D ^%GSEL), a default value of "URP" is


used. When one or more features is disabled, the Help displayed reflects only the
available features.

Sample terminal session


>D ^%GSEL

Global selector: ^?

Enter '^' or <RETURN> to exit, or


global selector, or
'^L' for a list of globals selected so far, or
'^D' for a list of all globals, or
'.' to retain previously selected globals, or
'??' for how to specify the global selector

76 • Global Utilities MSM Utility Manual


Global selector: ^??

The global selector may be specified as:

name - select entire global (all nodes)


begin-end - select all globals from 'begin' to 'end'
prefix* - select all globals which start with 'prefix'
* - select all globals
name(subscripts - select specified level and all descendants
name(subscripts) - select specified level only

Any selector may be preceded by a '-' to deselect a previously


selected global.
Cross UCI notation and Cross Volume group notation is supported.
For example: ["TST"]XYZ ["VAH","UCD"]DD.
Each subscript may be a normal value, or a range in the form
begin-end, or null (omitted) to select all values.
Character subscripts need not be enclosed in quotes unless they
contain a dash (-) or comma (,).

Global selector: ^^D

^% ^%HELP ^%RLOADV ^%ZIS ^%ZOSF ^%ZTSCH ^%ZTSK


^SCR ^SCRDEF ^SCRNST ^SCRUTL ^STATS ^SYS ^SYSGEN

14 - Globals

Global selector: ^SCR(1-99,,TEST Global selector: ^

MSM Utility Manual Global Utilities • 77


%GSIZE - Global Size
Use this utility to display the size of one or more globals. The %GSEL routine is
called to select the globals that are to be displayed. For each global, information is
displayed about the highest pointer block (depth 1), the next level pointer block
(depth 2), all the way down to the bottom level pointer block (depth n-1) and the data
block (depth n). The following information is provided:
Pointer Blk At each level, the address of the left-most block in the tree is
displayed. By using the right-link address in the block, all
blocks at the same depth can be accessed.
Space Allocated At each level in the global, the total number of blocks
allocated is displayed.
After all selected globals are displayed, the total number of 1-K blocks used by all of
the globals is displayed. This utility is a significantly faster option than the %GE
utility when only the size of the globals needs to be known.

Sample terminal session


>D ^%GSIZE

MSM - Global Size Display


of MGR,SYS 12:27 PM 30-MAR-98

Global selector: ^SCR*

3 globals selected.

Global selector: ^

Enter output device <4>:

MSM - Global Size Display


of MGR,SYS 12:27 PM 30-MAR-98

Global Blocks
Name Depth Leftmost Used
-------- ------- ---------- -------

^SCR Ptr 1 1371 1


Ptr 2 1466 3
Data 1372 141
-------
Total for global: 145

^SCRDEF Ptr 1 1308 1


Data 1309 62
-------
Total for global: 63

^SCRSYS Ptr 1 1517 1


Data 1518 1
-------
Total for global: 2
==========================================

3 Globals processed

Total space allocated.........: 210 blocks

>

78 • Global Utilities MSM Utility Manual


%OS - OS Interface Utility
Use this utility to invoke various operating system functions from within the MSM
environment. This utility is available in MSM-PC/PLUS and MSM-Server for
Windows. The functions provided include directory maintenance, disk space
management, default disk drive assignments, and file maintenance.

Invoking the %OS Utility


>D ^%OS

MSM - DOS Interface Utility

Available options:

1 - Directory Functions
2 - Show DOS Version (or Windows 95 Version or Windows NT Version)
3 - Available Disk Space
4 - Change Default Path
5 - File Functions

Select Option: ?

Select option by specifying the option number or supplying enough


characters to uniquely identify the option.
To get help information specific to an option, enter a '?' followed
by the option number.
Enter <RETURN> or '^' to exit with no action,

Select option: 1 Directory Functions

Directory Functions
Available options:

1 - Create Directory
2 - Delete Directory
3 - List Directory

Select option: 1 Create Directory

Enter drive <C>: ?

Enter the name of the disk drive (A, A:, etc).


Enter <RETURN> to select the default drive.
Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

Enter drive <C>: C

Enter Directory: NEWDIR ...created

Available options:

1 - Create Directory
2 - Delete Directory
3 - List Directory

Select option: Delete Directory

Enter drive <C>: C

MSM Utility Manual Global Utilities • 79


Enter Directory <\MSM20>: ?

Enter the name of the directory to be deleted.


If the drive name is omitted, the current drive is assumed.
Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

Enter Directory <\MSM20>: \MSM20\NEWDIR ...deleted

Available options:

1 - Create Directory
2 - Delete Directory
3 - List Directory

Select Option: 3 - List Directory

Enter directory listing specifier <C:\MSM20\*.*>: ?

Show OS Version
Currently running under DOS version 5.00

Press any key to continue

Available Disk Space


Enter drive <C>: C

Free space on drive C: 962560 bytes (.9 Megabytes)


Total space on drive C: 21309440 bytes (20.3 Megabytes)

Press any key to continue

Change Default Path


Enter drive <C>: C

Enter Directory <\MSM>: ?

Enter the full path name of a directory on drive C.


Enter '^' to return to the previous question, or
Enter '^Q' to exit the utility.

Enter Directory <\MSM>: \

Press any key to continue

File Functions
Available options:

1 - Delete File
2 - Rename File
3 - Set File Attributes
4 - List File
5 - Copy File

Select option: 1 - Delete File

80 • Global Utilities MSM Utility Manual


Enter file name: ?

Enter the name of the file to be deleted.


If the drive name or directory path is omitted, the default values are
assumed.
Enter '^' or <RETURN> to backup to the previous question, or
Enter '^Q' to exit the utility.

Enter file name: C:\MUMPS\NEWFILE ...deleted

Press any key to continue

Available options:

1 - Delete File
2 - Rename File
3 - Set File Attributes
4 - List File
5 - Copy File

Select option: Rename File

Enter old file name: ?

Enter the name of the file to be renamed.


If the drive name or directory path is omitted, the default values are
assumed.
Enter '^' or <RETURN> to backup to the previous question, or
Enter '^Q' to exit the utility.

Enter old file name: C:\MUMPS\CLJ

Enter new file name: ?

Enter the new name for the file.


If the directory path is specified and it is different from the
original, the old file will be moved to the new directory.
If the drive name is specified, it must be the same as the drive
specified for the old file name.
Enter '^' or <RETURN> to backup to the previous question, or
Enter '^Q' to exit the utility.

Enter new file name: NEWFILE ...file renamed.

Press any key to continue

Available options:

1 - Delete File
2 - Rename File
3 - Set File Attributes
4 - List File
5 - Copy File

Select option: 3 - Set File Attributes

Enter file name: ?

Enter the name for the file whose attributes are to be changed.
If the drive name or directory path is omitted, the default values will
be assumed.
Enter '^' or <RETURN> to backup to the previous question, or
Enter '^Q' to exit the utility.

Enter file name: C:\MUMPS\NEWFILE

Attribute: Read-only - Off Hidden - Off System - Off Archive - On

MSM Utility Manual Global Utilities • 81


Enter attribute to toggle: ?

Enter enough characters to identify the attribute to toggle.


Enter '^L' to list current attributes.
Enter '^' or <RETURN> to backup to the previous question, or
Enter '^Q' to exit the utility.

Enter attribute to toggle: Read-only - now on

Enter attribute to toggle: ^L

Attribute: Read-only - On Hidden - Off System - Off Archive - On

Enter attribute to toggle:

Press any key to continue

Available options:

1 - Delete File
2 - Rename File
3 - Set File Attributes
4 - List File
5 - Copy File

1RWH The following option is a call to the %FLIST utility, which is documented in
“%FLIST - File List” in this manual.

Select option: 4 - List File

Enter input device <HFS>: ?

Enter device number for input.


Valid device numbers are: 1,3-19,64-199,256 and up,47-50,51-54,59-62.
Enter 'HFS' to select the first available Host File Server device.
Enter 'HOSTSPOOL' to select the Host Spooling device.
Enter 'SBP' to select the first available Sequential Block Processor
device.
Enter 'MTD' to select the first Magnetic Tape Device.

Enter input device <HFS>: RETURN

File Name:

Enter the name of the host operating system file to read from.

Available options:

1 - Delete File
2 - Rename File
3 - Set File Attributes
4 - List File
5 - Copy File

Select option: 5

Enter source file name: ?

Enter the name of the DOS file to be copied. If the drive and
directory name are not entered with the file name, the file is
assumed to be in the current directory, C:\MSM.

Enter source file name: \CONFIG.SYS

82 • Global Utilities MSM Utility Manual


Enter destination file name: ?

Enter the name of the DOS file to which CONFIG.SYS will be copied.
If the name ends with a '\' or a ':', it will be assumed that a
directory name has been entered. In that case, the source file
will be copied to the specified directory using the same file name
as the source file.

Enter destination file name: B:

Copying file \CONFIG.SYS to B:CONFIG.SYS (269 bytes)

100% done

MSM Utility Manual Global Utilities • 83


84 • Global Utilities MSM Utility Manual
System Status Utilities

Overview
This chapter describes the system status routines that can be called from a program
or directly from the open command language to obtain status information.

%ACTJOB - Active Jobs


This utility is used to check if a particular job is active or to obtain a list of all jobs
that are active in the MSM system. After a list of jobs is obtained, an entry point is
provided to extract the next job number from the list. Each entry point is called as an
extrinsic function.
$$ACTIVE(jobnum) Returns 0 if the specified job number is not active and
returns 1 if it is active.
$$LIST(.jlist) Returns the number of jobs currently active in the
system. It also creates an array in the specified variable.
This array contains strings of ones and zeroes indicating
the status of each possible job in the system. The
variable must be passed using Call by Reference (the
name is preceded by a period).
$$NEXT(.jlist,jobnum) Examines the list, beginning with the specified job
number, and returns the job number of the next active
job or zero if there are no more active jobs. It requires
that $$LIST be called first, in order to set up the array in
the jlist variable.

Sample terminal session


>W $$ACTIVE^%ACTJOB($J)
1
>S X=$$LIST^%ACTJOB(.JOBS)

>W X
3
>S J=0 F S J=$$NEXT^%ACTJOB(.JOBS,J) Q:J=0 W J," "
1 16 20
>

MSM Utility Manual System Status Utilities • 85


%DEVUSE - Devices in Use
Use this utility to display the job number ($J) of the job that owns each active device.
A device is considered active if it has been OPENed. For Host File Server devices,
the name of the file being accessed also is displayed.

Sample terminal session


>D ^%DEVUSE

MSM - Devices in Use Utility

DEVICE# $JOB FILENAME


------- ------ ----------
1 3
3 3
6 8
7 7
10 9
51 9 c:\msm\config.msm

6 - DEVICES IN USE

>

86 • System Status Utilities MSM Utility Manual


%GUCI - Get UCI Name
This utility returns the name and number of the UCI and volume group where the
current job is running. The name is returned in the %UCI local variable as two parts
separated by a comma. The first part is the UCI name; the second part is the volume
group name. The number is returned in the %UCN local variable as a number
formed by multiplying the volume group number by 32 and then adding the UCI
number.

Sample terminal session


>K

>D ^%GUCI

>W

%UCI="MGR,SYS"
%UCN=1

>

MSM Utility Manual System Status Utilities • 87


%MDMP - Display Memory
Use this utility to examine MSM system memory, memory associated with the
current partition, or memory associated with the VIEW buffer. When displaying the
VIEW buffer, the user must own device 63. The utility displays the selected memory
in hexadecimal format, ASCII character format, or both.

Sample terminal session


>OPEN 63 VIEW 593

>D ^%MDMP

MSM - Memory Display Utility

FROM OFFSET...: ?

Enter the location, in hexadecimal, from which to display memory.


Precede the number with an 'N' to indicate decimal values.
Or, enter ^ or ^Q to exit the utility.

FROM OFFSET...: 0
TO OFFSET.....: ?

Enter the ending location for the memory dump, or


^ to return to the previous question, or
^Q to exit the utility.

TO OFFSET.....: 2F
MEMORY TYPE...: ?

Enter -3 to indicate an absolute memory location, or


0 to indicate an address in the view buffer, or
a positive integer to indicate an address in a partition, or
^ to return to the previous question, or
^Q to exit the utility.

MEMORY TYPE...: 0

HEX FORMAT....: ?

Enter YES to produce a hexadecimal listing of memory, or


NO to bypass the hexadecimal listing of memory, or
^ to return to the previous question, or
^Q to exit the utility.

HEX FORMAT....: Y

CHAR FORMAT...: ?

Enter YES to produce a character listing of memory, or


NO to bypass the character listing of memory, or
^ to return to the previous question, or
^Q to exit the utility.

CHAR FORMAT...: Y

Enter output device <1>:

0: 001B0055 20302049 20244927 3D254445 562C2B25 44455620 43202544


...... U 0 I $ I ' = % D E V , + % D E V C % D

20: 00472044 45560005 044C4F41 443B0004 00572021 213B0010 00552025


.. G D E V.... .. L O A D ;.... .. W ! ! ;.... .. U %

>

88 • System Status Utilities MSM Utility Manual


%SBP - Sequential Block Processor
Use this utility to display the status of the Sequential Block Processor (SBP) devices
in the system. The following information is displayed:
ADDR Address of the Device Descriptor Block (DDB) associated with
the device. The address is displayed in hexadecimal.
$I Device number of the SBP device ($IO). The device numbers
range from 59 to 62, inclusive.
$J Job number ($JOB) of the job (the user) that owns the SBP device
if it is open.
$X Current value of the $X special variable for the device.
$Y Current value of the $Y special variable for the device.
$ZC Current value of the $ZC special variable for the device.
TYPE Block type of the block currently being accessed by the SBP
device. This may be either a Journal Block or an SBP block.
VGP# Volume group number of the block that is currently being
accessed by the SBP device.
BLOCK# Block number of the block that is currently being accessed by the
SBP device.
OFFSET Offset into the block where the next Read or Write operation will
take place. The first byte is 0, the second is 1, and so on. The
offset is displayed in decimal.
DELIMS Current delimiter character, in hexadecimal, that is in effect for the
device. The delimiters are displayed in hexadecimal and separated
by commas.
If the SBP device is not open at the time of the display, the utility displays zeros for
all of the items except the ADDR and $I fields. These values are always valid. For
additional information, refer to the MSM User's Guide.

Sample terminal session


>D ^%SBP

MSM - SBP Device Descriptor Blocks Display

Sequential Block Processor Control Block

ADDR $I $J $X $Y $ZC TYPE VGP# BLOCK# OFFSET DELIMS


----- -- --- --- --- ------ ---- ---- ------ ------ ------
B3AA2 59 1 0 0 2 SBP G0 1780 626 FF
B3A52 60 0 0 0 0 0 - 0 0
B3A7A 61 0 0 0 0 0 - 0 0
B3ACA 62 0 0 0 0 0 - 0 0

>

MSM Utility Manual System Status Utilities • 89


%SI - System Information
This utility displays general system information and the status of system-related
processes. The first page of the display shows the maximum partitions and the
number in-use, the number of disk buffers, the number of modified buffers, and the
disk cache efficiency. Use the %SS utility to display the same information.
For MSM-PC/PLUS, %SI displays the following additional information:
• The percentage of CPU resources (CPU Utilization) currently in use, and the
percentage of the disk subsystem (Disk Utilization) that is in use.
• For each database volume in the system, an indicator specifies which Disk I/O
Mode is being used. Refer to the MSM-PC/PLUS System Manager's Guide for a
complete description of the available Disk I/O Modes.
The second page of output indicates the status of various system-related processes.
Certain of these processes, or subsystems, include background tasks (utility routines)
that perform functions related to the system process. For tasks that require an
associated background task, the job number and status of the job also are shown. For
example, when Journaling (After-Image Journaling) is active, the JRNDAEMN
utility routine runs in the background to control the switching of journal areas and
other related tasks.
System Process The name of an MSM subsystem or feature, including Distributed
Data Processing (DDP), the LAT (Local Area Transport)
Advertiser, Journaling (Before-Image and After-Image), Cross-
System Journaling, Online Backup, Print Spooling, and the
Performance Monitor (RTHIST).
Job Number The job number of the utility routine associated with the system
process.
Status An indicator that specifies whether or not a process is active or
inactive, or whether or not a feature is enabled or disabled.
Job The job number of the MSM partition (where applicable) which
is associated with the process.
Job Status The status of the active job. This is the state (or queue) in which
it is currently executing, or the resource for which it is waiting.
The statuses defined are the same as those displayed by the %SS
utility, with one exception: jobs that are executing a HANG
command are listed in Normal Wait status, and jobs that are not
executing a HANG command are listed as Enabled (or another
applicable status).

90 • System Status Utilities MSM Utility Manual


Sample terminal session
>D ^%SI

MSM - System Status

Enter output device <105>:

MSM - System Status


29-MAR-98 4:43 PM

The system has been up since 28-MAR-98 at 11:45 AM (4 hrs., 58 min.)

Maximum Partitions: 36 Active Partitions: 21


CPU Busy: 94.5% Disk busy: 4.4%
Total disk buff: 2327 Mod buff: 1 Disk cache efficiency: 99.1%

All local mounted volumes are using DOS Bypass I/O

Status of System Processes

System Process Status Job# Job Status


-----------------------------------------------------------------
MSM system 1 Running
Distributed Data Processing active 4 DDP
LAT Advertizer active 5 Normal Wait
After-Image Journaling active 3 Jrnl_Dmn
Print Spooling enabled
Print Despooler active 6 Normal Wait
>

MSM Utility Manual System Status Utilities • 91


%SP - Free Space Count
Use this utility to display the amount of free space that remains in one or more MSM
volume groups. Although the display defaults to all volume groups that are currently
mounted, a single volume group may be specified. The following items are
displayed:
Vol# The volume number of the volume within the volume group that is
being displayed. The value may range from 0 through 7 inclusive.
Maps The number of map blocks contained in the volume. Each map
block represents up to 512 blocks, each 1024 characters in size, in
the volume group.
Tot Blks The total number of disk blocks, each 1024 characters in size,
contained in the volume.
Free Space The total number of blocks in the volume that are free (not
allocated).
%-Free The number of free blocks expressed as a percentage of the total
number of blocks in the volume.
Host File The host file system name of the volume within the volume group.
Name This may be the name of a file in the host operating system or the
name of a device.
The internal entry point INT^%SP is provided to return (in local variables), the size
(%TOTBLK) and remaining free space (%FTOTBLK) for a volume within a volume
group. Device 63 does not need to be owned by the current job when the internal
entry point is called. The %VGI local variable is used to pass the volume group
number to the routine. If this variable does not exist, volume group 0 is assumed.

Sample terminal session


>D ^%SP

MSM - Disk Space/Free Space Utility

Select volume group to display <ALL>: RETURN

Volume group: SYS Index: 0

Vol# Maps Tot Blks Free Spc %-Free Host File Name
---- ---- -------- -------- ------ ------------------------
0 5 2098 234 11.15 \MUMPS\DATABASE.MSM
1 3 1074 105 9.78 \USR\MUMPS\DATABASE1.MSM
======== ======== ======
3172 339 10.69

Volume group: TST Index: 1

Vol# Maps Tot Blks Free Spc %-Free Host File Name
---- ---- -------- -------- ------ -------------------
0 10 5120 497 11.15 D:\MSM\DATABASE.MSM

>K

>D INT^%SP

>W

92 • System Status Utilities MSM Utility Manual


%FTOTBLK=339
%NOSHOW=1
%TOTBLK=3172
%VGI=0
VGVOLS=1

>S %VGI=1

>D INT^%SP

>W

%FTOTBLK=497
%TOTBLK=5120
%VGI=1

>

MSM Utility Manual System Status Utilities • 93


%SS - System Status
This utility displays the status of each active job in the system. In addition to user
jobs, one system job is displayed in multi-user MSM systems. This job is a
background task that processes delayed write operations to the database and
periodically flushes all modified disk buffers. The following information is
displayed:
JOB NUMBER Job number of the job being displayed. A plus (+) after
the job number indicates a high job priority level.
UCI/VOL NAME Name of the UCI and the volume group where the job
is executing.
ROUTINE NAME Name of the routine that is currently being executed by
the job. If no name routine is displayed, then the job is
executing in direct mode.
PART-SIZE Current amount of space being used by the job within
CURR/MAX the partition (the value of $STORAGE), and the
maximum amount of storage that can be used by the
job (the partition size).
STAT Status of the active job. This is the state in which it is
currently executing or the resource for which it is
waiting. The following states are defined:
RunQue Current active job
WaitQxx Waiting for next command slice
Qpart Waiting for a partition
Buff Waiting for a buffer
Lock Waiting for LOCK to be free
LckTbFull Waiting for free memory in LOCK
table
Device Waiting for device to be free
Hang HANG command being executed
DDPxxxx Waiting DDP transfer
Journal Waiting for Journal operation
Jrnl_Dmn Journal Daemon queue
BufInUse Waiting for a buffer
TermI/O-n Waiting for I/O on terminal n
TermOpn-n OPEN of terminal n in progress
TermCls-n CLOSE of terminal n in progress
IjcI/O-n Waiting for I/O on IJC device n
xxxxIO Waiting for tape or disk I/O
HostCmd Waiting for Host Operating System
Muserver I/O
ServerQ Waiting for available muserver
process

94 • System Status Utilities MSM Utility Manual


GenChng Waiting for BIJ generation change
Apixxxx Waiting for Application Program
Interface (API) action
Qspecial Waiting for journal switch or database
reads/write to be enabled
Qlat_sol Attempting to identify LAT server
Qlat_cmd Waiting for LAT server to respond
Latsvbuf Waiting for buffer for LAT server
#-CMDS TOT/INCR The number of commands executed by the job since it
began (TOT) and the number of commands executed
since the last terminal Read (INCR).
DEVICE OWNED A list of the devices owned by the job. The letter ‘p’ or
‘c’ after Device indicates that it is the principal or
current device, respectively. If the device is a LAT
device, the LAT PORT and SERVER name are
displayed within parentheses after the device number.
At the end of the display, the total number of buffers in the system is displayed and
the number of buffers that are currently modified but not yet written to the disk is
displayed. There is also a reference that indicates the current cache efficiency (see
RTHIST utility for additional information on this value). In MSM-PC/PLUS, the
current percentage of CPU and disk usage also are displayed.

Sample terminal session


>D ^%SS

MSM System Job Status


25-JUL-98 4:03 PM

Max Partitions: 7 Current in Use: 4

JOB UCI/VOL ROUTINE PART-SIZE STATUS #-COMMANDS DEVICES


NUM NAME NAME CURR/MAX TOTAL/INCR OWNED
--- ------- -------- --------- ------- ----------- -------
1 MGR,SYS * * * M S M * * *
8 MGR,SYS DI 0.1/20.0 TermI-1 110/0 1pc
9 MGR,SYS CUSTMANT 0.2/20.0 TermI-4 1279/48 4pc
10 MGR,SYS %SS 4.3/20.0 RunQue 3237/1006 6pc

p - Principal Device
c - Current Device

Total Buffers In System: 109, Modified#=0


Disk Cache Efficiency: 98.7%, CPU busy: 5.6%, Disk busy: 3.2%

>

MSM Utility Manual System Status Utilities • 95


96 • System Status Utilities MSM Utility Manual
Job Execution Utilities

Overview
This chapter describes the library utilities that can be called from a program during
execution to trap errors, select devices, change priority, and so on.

%DBSYNC - Synchronize Database


This utility contains entry points which assist a job in synchronizing operations on a
remote database. Operations also function properly if only local databases are used.
To verify that all transactions to a database were processed by the remote server
(there are no pending asynchronous errors), use the ERRORCNT entry point. This
extrinsic function issues a ZSYNC command to wait for all transactions to be
processed and then returns the number of asynchronous errors that have occurred. If
there were errors, it also returns the major and minor error numbers of the first error
and resets the counter to zero.
To check the error counter at any time without waiting for synchronization, use the
ERRORQRY entry point. This extrinsic function only returns the current error
counter, and the major and minor error numbers of the first error. It does not issue a
ZSYNC command or reset the counter.
To reset the counter to zero, use the RESET entry point.
Use entry points to set or clear the mode flag that controls whether asynchronous
errors should interrupt the job with an <ASYNC> error. The error counter is always
incremented, regardless of the mode flag’s setting. To enable the job for <ASYNC>
errors, use the ASYNCON entry point. To disable <ASYNC> errors, use the
ASYNCOFF entry point.
The following sample terminal session illustrates the results of receiving a
<DKFUL> error on a remote database.
Sample terminal session
>D RESET^%DBSYNC,ASYNCOFF^%DBSYNC

>W $$ERRORCNT^%DBSYNC ; illustrates a <DKFUL> error 1:7:34

>W $$ERRORQRY^%DBSYNC ; illustrates that the counter was reset 0

>D ASYNCON^%DBSYNC ; allows the next error to occur

> <ASYNC>*XECUTE*:::6:22:1826

MSM Utility Manual Job Execution Utilities • 97


%DEBUG - Interactive Debugger
The MSM interactive debugger is a programmer tool that facilitates the isolation and
correction of errors in M programs. Use this comprehensive tool to interactively step
through the execution of a program, display the contents of local variables, modify
their values, and resume execution. The following sections describe the debugger’s
capabilities.

Invoking the %DEBUG Utility


>D ^%DEBUG

MSM - Interactive Debugging Utility

Available Options:

1 - Run a Program
2 - Enable Debugging Environment
3 - Disable Debugging Environment
4 - HELP Information

Select Option: ?

Enter the option number to select an option, or


Enter enough characters to identify the option, or
Enter <RETURN> or '^' to exit the utility.

Select Option:

Run a program
Use this option to interactively debug a program. A program in execution will be
interrupted at user-specified locations, and the interactive debugger will be invoked
at each of these points so that you can examine the current state of the routine.
The program can be interrupted by explicit breakpoints in the program (a BREAK
command with no arguments), the interrupt CTRL+C key, program errors (which may
or may not be handled by the $ZTRAP facility), or implicit breakpoints (defined to
you through the debugger without modifying the code). Use the debugger to specify
that an implicit breakpoint should occur at the start of each line in a routine (line
stepping) or at the start of each command in each line in a routine (command
stepping).
It is important to understand the debugger’s basic capabilities and the terminology
used in the debugger commands. Generally, for basic debugger functions, there is a
corresponding command to invoke an action.

98 • Job Execution Utilities MSM Utility Manual


Breakpoint
An implicit breakpoint is a user-specified location within a program where execution
is to be interrupted and the interactive debugger is to receive control. When the
breakpoint is encountered, the system saves all of the information necessary to restart
program execution from the point at which it was interrupted. The debugger is then
invoked, and the system prompts you for an action.
To define an implicit breakpoint, specify the EntryRef in the routine where the break
is to occur. This can be a routine name (^TEST), line reference within a routine
(ABC^MYPGM), or a line reference and offset within a routine
(LABEL+4^YOURPROG). You also can specify the command within the line (the
first command is 1, the second is 2, and so on) and the action to be performed (a line
of M code to be XECUTEd when the breakpoint is encountered). A maximum of
ten implicit breakpoints, numbered zero through 9, can be set. The /B, /B=, /Bn, and
/Bn= commands are all associated with breakpoints.

Line stepping
In this mode, an implicit breakpoint is inserted at the start of each line. This means
that the debugger will receive control at the start of execution of each line. To invoke
line stepping, press RETURN.

Command stepping
In this mode, an implicit breakpoint is inserted at the start of each command in each
line. This means that the debugger will receive control at the start of execution of
each command within a line. The space key, the PF1 key (ANSI terminals only), and
the /C command all can be used to invoke command stepping.
An especially useful feature is the ability to break after every command and drop
into Command Stepping mode or continue executing, depending on the execution of
user-defined code. For example, a test could be made for the value of a particular
variable, and execution stopped when the variable contains a certain value. Using
this feature, the precise command on which an event occurs can be identified. The
following example illustrates how this is done.
DEBUG>/C=IF ACCOUNT=12765 ZGO

The code "IF ACCOUNT=12765 ZGO" will be executed by the debugger after each
command in the application code. If the ZGO is executed, the application continues
to execute at the next command. If the ZGO is not executed, then you are dropped
back into Command Stepping mode. This particular command would find the
location in the application at which the ACCOUNT variable is equal to 12765.

Line stepping breakpoint


You also can break after every line and drop into Line Stepping mode or continue
executing, depending on the execution of user-defined code. For example, a test
could be made for the value of a particular variable, and execution stopped when the
variable contains a certain value. Using this feature, the precise line on which an
event occurs can be identified, as illustrated by the following example:
DEBUG>/L=IF $GET(ACCOUNT)'?.E1C.E ZGO

MSM Utility Manual Job Execution Utilities • 99


The code "IF $GET(ACCOUNT)'?.E1C.E ZGO" will be executed by the debugger
after each line of application code. If the ZGO is executed, the application continues
to execute at the next line. If the ZGO is not executed, you are dropped back into
Line Stepping mode. This particular command would find the location in the
application at which the ACCOUNT variable contained a control character.

Environmental variables
The debugger can report on the state of environmental variables that are maintained
by the MSM system, including $TEST, $JOB, $IO, $X, $Y, $ZUCI,
$ZREFERENCE, and subroutine step mode. The /E command displays the
environmental variables.

Subroutine step mode


When a program is being debugged in line step mode or command step mode, there
is an option to continue inserting breakpoints at the line or command level for a
subroutine that is being called. When step mode is set to Into and a subroutine is
called by a line step or command step, MSM continues to insert breakpoints in the
subroutine. If step mode is set to Over, then no breakpoints are inserted into the
subroutine (the called subroutine is treated as a single command). When debugging
is in Into mode, the /R command can be issued to treat the remainder of the
subroutine as a single command. Use the /T command to toggle between Into and
Over mode.

Miscellaneous commands
The debugger responds to several additional commands. For example, use the ZGO
command to have the debugger resume execution of a routine and continue
processing until the next implicit or explicit breakpoint is encountered. When you
enter the debugger from a breakpoint, you can use the line step, command step, or
ZGO command to resume execution.
Sometimes it is desirable to exit completely from a program that is being debugged
(for example: the program error has been found). Use the QUIT command to do this.
When you enter this command, the debugger terminates and returns to programmer
mode with debugging disabled.
Tthe /S command within the debugger displays the current execution stack. This
provides a traceback of how control passed to the current routine and shows all
nested DO and XECUTE commands down to the current execution level.
Select Option: 1 - Run a Program

Enter Routine Name: ?

Enter the name of the routine to be debugged.


You may enter a routine name, or lineroutine.
Enter '^' to return to the previous question, or
Enter '^Q' to exit the utility.

Enter Routine Name: INVOICE


Debug Device <1>: ?

Enter the terminal device number which will be used for controlling the
debugger. All debugging prompts and error messages will be directed to
this drive. This can be used for full screen applications so that the
contents of the screen are not disturbed.

100 • Job Execution Utilities MSM Utility Manual


Debug Device <1>:

1) +1^TEST:0:0:0: ;RTM;INVOICE PREPARATION ROUTINE;


0) *XECUTE*:1:1:0 D ^%DEBUG
<Break Point 0>+1^TEST:0:0:0: ;RTM;INVOICE PREPARATION ROUTINE;

DEBUG> ?

Enter a MUMPS command, a shell command, a DEBUG command, or /H for


DEBUG help.

Shell commands and editing keys are:


? or F1 - Display this help
?? - Display last 10 lines of command history
?n - Display 10 lines of command history from line n
<PGUP> or Ctrl-P - Display previous 10 lines of history
<PGDN> or Ctrl-N - Display next 10 lines of history
!n - Recall line n from the command history
F2 or Ctrl-Z - Recall the original (unedited) line
F3 - Recall last line of command history
<UP> or Ctrl-K - Recall previous line of command history
<DOWN> or Ctrl-J - Recall next line of command history
<LEFT> or Ctrl-L - Move cursor left one character
<RIGHT> or Ctrl-R - Move cursor right one character
<HOME> or Ctrl-B - Move cursor to beginning of line
<END> or Ctrl-E - Move cursor to end of line
<BS> or Ctrl-H - Delete the character before the cursor
<DEL> - Delete the character under the cursor
Ctrl-D - Delete from cursor to end of the line
Ctrl-U or Ctrl-X - Delete entire command line
F4 or Ctrl-V - Toggle Volume Group/UCI display

DEBUG>

Enable Debugging Environment


Use this option to enable the debugging environment without actually debugging a
specific program. This is necessary because argumentless BREAK commands
within a program are ignored unless debugging is enabled.
When debugging mode is on, MSM maintains additional information about the
program that is executing: extended error information (including the location of the
command within the line where the error occurred) and the location of the argument
within the command where the error occurred. When debugging is enabled, the
programmer prompt is preceded by the letter D.
Select Option: 2 - Enable Debugging Environment

Debug Device <1>:

Debugging Environment Enabled

D>

Disable Debugging Environment


Use this option to disable the debugging environment. When debugging is off,
argumentless BREAK commands are ignored and the extended error processing
information is not maintained.
Select Option: 3 - Disable Debugging Environment

Debugging Environment Disabled

>

MSM Utility Manual Job Execution Utilities • 101


%ER - Error Report
Use this utility to display, print, erase, or summarize errors that were logged using
the %ET utility program. To display an error, enter the date on which the error
occurred and specify which error to display if more than one error was logged.
For printing, erasing, or summarizing errors, enter a date (for example: 8/24/97) or
range of dates (for example: 8/12/97 through 8/24/97). When specifying a range of
dates, separate them with a colon (for example: 8/12/97:8/24/97). For printing and
summarizing errors, the %SDEV utility is called to select an output device for the
report.

Invoking the %ER Utility


>D ^%ER

MSM - Error Report Utility


Select OPTION
1 Display errors
2 Print errors
3 Erase errors
4 Summarize errors
Enter option: ?

ENTER:

'D' to display individual errors and symbols on the terminal.


'P' to print a list of errors logged during a range of dates.
'E' to erase errors logged during a range of dates.
'S' to display a summarized list of errors.
An option number, or
'^' or '^Q' or <RETURN> to exit the utility.
Enter option:

Display Errors
Select OPTION

1 Display errors
2 Print errors
3 Erase errors
4 Summarize errors
Enter option: Display

Enter date of error: ?

Errors have been logged the following days:


T-47 (March 26, 1998), T-44 (March 29, 1997)

ENTER:
'^Q' to exit this utility, or
<RETURN> or '^' to return to the previous question.
a date as 'MM/DD/YY' or, 'T' (today) or, 'T-1' (yesterday), etc.
Date of error: T

3 ERRORS LOGGED ON 5/14/97


Error #: ?

102 • Job Execution Utilities MSM Utility Manual


3 ERRORS LOGGED ON 5/14/97
ENTER:
'^Q' to exit this utility.
<RETURN> or '^' to return to the previous question.
Enter number of error desired.
'^L' to list all errors for this date.
Error # > ^L

1) $ZE=<UNDEF>+37^%FIP6100:::4:0:
$H=54657,46687 AUG 24 1997 12:58 PM

2) $ZE=<DKFUL>+15^%TRANS2:::7:12:3
$H=54657,48600 AUG 24 1997 1:30 PM

3) $ZE=<DIVER>+12^%FSCRDCF:::5:2:
$H=54657,54000 AUG 24 1997 3:00 PM

Error #: 1

Symbol: ?

ENTER:
name of symbol to be displayed.
'^L' to obtain a list of all symbols.
'^S' to set symbols into the symbol table of this partition,
and exit this utility.
'^' or <RETURN> to return to the last question.
'^Q' to exit this utility.

Symbol > ^L

$ZE=<UNDEF>+37^%FIP6100:::4:0:
$H=54657,46687 AUG 24 1997 12:58 PM
$J=1
$I=1
$S=8456
LAST GLOBAL REFERENCED=^SCR(0,"%DMS",0)
%A=0
%B=0
%C=23
%DMNST=1
%DMPAG=0
%ED=0
%FTYP=0
%GI1=0
%GT=^UTILITY("%RD","BLKDMP1")
%GV=^UTILITY("%RD","BLKDMP1")
%I=1^52997,44409^^^15^23^78
%IOD=0
%IOT("1")=%FIP6100
%IOT("2")=%FIR6100
%KN=0
%LINQ=
%LPOS=
%S=%DMS
%SV=,%DMS,0,23,0,78,0,23,0
%U=^
Symbol> ^S

Symbols have been set into this partition


You are exiting this utility

Error defined as: $ZE=<UNDEF>+37^%FIP6100:::4:0:

>

MSM Utility Manual Job Execution Utilities • 103


Print Errors
Select OPTION

1 Display errors
2 Print errors
3 Erase errors
4 Summarize errors

Enter option: Print

Enter date(s): ?

Errors have been logged the following days: T-12, T-10, T-3, T-1, T

ENTER:
'^Q' to exit this utility.
<RETURN> or '^' to return to the last question.
Date as 'MM/DD/YY' or, 'T' (today) or, 'T-1' (yesterday), etc.
two dates, in either format, separated by ':' for a date range.
Example: 8/7/97:8/30/97 for period between August 7 and 30.

Enter date(s): T
3 ERRORS LOGGED ON 8/24/97

Enter output device <1>:

UCI 'MGR,SYS' ERRORS ON 8/24/97 PAGE 1


(RUN 8/24/97 3:42 PM)

ERROR NUMBER 1 OF 3 LOGGED ON 8/24/97

$ZE=<UNDEF>+37^%FIP6100:::4:0:
$H=54657,46687 AUG 24 1997 12:58 PM
$J=1
$I=1
$S=9934
LAST GLOBAL REFERENCED=^SCR(0,"%DMS",0)
%A=0
%B=0
%C=23
.
.
.
%IOT("1")=%FIP6100
%IOT("2")=%FIR6100
%KN=0
%LINQ=
%LPOS=
%S=%DMS
%SV=,%DMS,0,23,0,78,0,23,0
%U=^

Enter date(s) >

Erase Errors
Select OPTION

1 Display errors
2 Print errors
3 Erase errors
4 Summarize errors

Enter option: Erase

Enter date(s): ?

Errors have been logged the following days: T-12, T-10, T-3, T-1, T

104 • Job Execution Utilities MSM Utility Manual


ENTER:
'^Q' to exit this utility.
<RETURN> or '^' to return to the last question.
Date as 'MM/DD/YY' or, 'T' (today) or, 'T-1' (yesterday), etc.
two dates, in either format, separated by ':' for a range.
Example: 8/7/97:8/30/97 for period between August 7th and 30th.

Enter date(s): T

Are you sure you want to delete errors logged on 8/24/97? <N>: Y

ERRORS DELETED

Summarize Errors
Select OPTION

1 Display errors
2 Print errors
3 Erase errors
4 Summarize errors

Enter option: Summarize

Enter error date(s): T

Enter output device <1>:

UCI 'MGR,SYS' ERRORS ON 8/24/97 PAGE 1


(RUN 8/24/97 3:46PM)

3 ERRORS LOGGED ON 8/24/97

1) $ZE=<UNDEF>+37^%FIP6100:::4:0: 46687= 12:58 PM


2) $ZE=<DKFUL>+15^%TRANS2:::7:12:3 48600= 1:30 PM
3) $ZE=<DIVER>+12^%FSCRDCF:::5:2:
$H=54657,54000 AUG 24 1997 3:00 PM

MSM Utility Manual Job Execution Utilities • 105


%ERRCODE - Display Error Codes
Use this utility to display the meaning of the various MSM error codes. The error
codes can be broken into three categories: language errors (<UNDEF>, major/minor
numbered errors (3:5 for bad numeric constant), and database validation errors (1 for
Unknown block type). This utility displays the meaning of any of these errors.
For additional information on language and major/minor number errors, refer to the
MSM User's Guide. For additional information on the database validation errors,
refer to the MSM Language Reference Manual (the $ZVERIFY function) and the
VALIDATE utility description in this manual.

Sample terminal session


>D ^%ERRCODE

MSM - Error Code Description Utility

Error code: ?

Enter an error code in one of the following formats:


major:minor Example: 4:1
<text> Example: <SYNTX>
nnn Error code from $ZVERIFY(), ex: 21
Enter <RETURN> or '^' or '^Q' to exit the utility.

Error code: 4:1

undefined global variable

Error code: <SYNTX>

invalid syntax in expression, command, etc.

Error code: 21

leading key does not match expected value

Error code:

>

106 • Job Execution Utilities MSM Utility Manual


%ET - Error Trap
This utility provides a generalized mechanism for recording information about
programming or environmental errors that occur during execution of a program or
application. When this routine is invoked, it saves the error code ($ZERROR), the
date and time of the error, job number, current device number, last global referenced,
and all of the local variables that existed at the time of the error. The % local variable
is not saved since it is used by the %ET routine itself. If the current device is 51
through 63, $ZA, $ZB, and $ZC also are saved.
The most common method of invoking the error trap utility is to set the $ZTRAP
special variable to the routine name. To do so, execute the following code from
within a program:
SET $ZTRAP="^%ET"

When an error occurs, the error trap utility is automatically invoked. Before logging
the error, the utility displays a message indicating that a program error has occurred
and the value of the $ZERROR special variable. To suppress the message, enter the
error trap utility at the INT entry point (INT^%ET).

Sample terminal session


>ZL TESTRTN ZP

TESTRTN ;MWD 8/24/97 SAMPLE OF %ET UTILITY [ 8/24/97 4:08 PM ]


S $ZT="^%ET"
S A=1,B=2,C=3
S X=1/0 ; force divide error
ALT S $ZT="ERR^TESTRTN"
S A=11,B=22,C=33
S X=1/0 ; force divide error
ERR W !,"ROUTINE ERROR"
D INT^%ET

>D ^TESTRTN

***PROGRAM ERROR***

$ZE=<DIVER>+4^TESTRTN:::5:2:

>D ALT^TESTRTN

ROUTINE ERROR

>

MSM Utility Manual Job Execution Utilities • 107


%HL - Change Job Priority
Use this utility to change the priority of an M job. In MSM, the dispatcher (job
scheduler) maintains a series of queues that contain jobs waiting to execute. Each
queue corresponds to a resource for which a job may wait (for example: buffer,
timer, lock). Frequently, a job is put into a wait queue not because it needs a
resource, but rather because it has used its allotted amount of CPU time. In this case,
it is put on one of three CPU wait queues, depending on the amount of CPU time that
it has used since its last terminal I/O operation.
The three CPU queues are arbitrarily designated high, medium, and low (WAITA,
WAITB, and WAITC, respectively). The dispatcher normally dispatches all of the
high priority queue, followed by the medium priority queue, and finally, the low
priority queue. In actuality, it is more complicated than this example indicates.
The less active a job is with respect to CPU resources, the higher it is in the CPU
queues. Priorities are further subdivided so that each queue can contain high and low
priority jobs. In this case, the high priority jobs are dispatched before low priority
jobs within the same queue.
Use this utility to control whether a job will be high or low priority within a queue.
It does not affect which queue the job is assigned to. When a job begins execution, it
is automatically assigned a priority of high within the queues. When the utility is
invoked, it displays the current priority and prompts the user for a new priority. The
following internal entry points also are provided to change priorities:
HIGH^%HL Sets the priority of the current job to high.
LOW^%HL Sets the priority of the current job to low.
INT^%HL Sets the priority to the value contained in the %P local variable. A
value of 0 indicates low priority, and a value of 1 indicates high
priority.
When the utility is called using one of the entry points, no message is displayed on
the terminal. In addition, the %P local variable is killed by the utility.

Sample terminal session


>D ^%HL

MSM - Job Priority Utility

Current Priority for Job is HIGH


Enter New Priority for Job <LOW> ?

Enter the new priority for the job


The priority can be either HIGH or LOW

Current Priority for Job is HIGH


Enter New Priority for Job <LOW> LOW

Job Priority changed from HIGH to LOW

>D HIGH^%HL

>

108 • Job Execution Utilities MSM Utility Manual


%LOGON - Log on to a New UCI
Use this utility to change from one UCI to another without logging off the system.
The routine can be invoked from any UCI and will prompt you for logon
information. It also can be used to log on to a UCI in a different volume group. As
you type the response, an asterisk (*) echoes each character entered. If you fail to
enter the correct information three successive times, the logon is aborted, and you are
logged off the system (returned to the host operating system). Refer to the MSM
User's Guide for additional information about logging on to the system.

Sample terminal session


>D ^%LOGON

MSM-UNIX, Version 4.4.0 Line #4 UCI: MGR:XXX Job #3

>D ^%LOGON

MSM-UNIX, Version 4.4.0 Line #5 UCI: MGR,SYS:XXX Job #4

>

MSM Utility Manual Job Execution Utilities • 109


%MODESET - Environmental Switches
Use this utility to set or reset environmental mode switches in the MSM system.
These switches are used to control various functions such as maximum routine line
length, error trapping level, and so on. They are primarily intended to facilitate
conversion from other implementations and dialects of M to the MSM system.
This utility sets the options for the partition (job) that invoked the utility. These
options remain in effect until the job terminates or until they are modified again
using this utility. To apply these features on a system-wide basis, use the Mode Flags
option of the SYSGEN utility. Refer to the MSM User's Guide for additional
information about SYSGEN.

Strict ANSI X11.1-1995 Conformance


When this mode flag is set, MSM will not recognize language features, such as the
$NEXT function, that were removed from the language by the X11.1-1995 standard.

Force $ZDATE to Always Return a Four-Digit Year


By default, the $ZDATE function returns a two-digit value for the year if the given
date is within the current century. When this mode flag is set, $ZDATE will always
return a full four-digit value for the year.

Set MSMSHELL programmer prompt to [UCI,VGP]


By default, the MSM shell program prompts you with the greater than sign (>).
When this switch is set to yes, the system prompts you with the UCI name and
volume group name in addition to the > prompt ([MGR,SYS]>).

Version 3 Mode for Cross-UCI References in


Functions
Prior to Version 4.0, cross-UCI and cross-system references were made using square
brackets ([ ]) around the UCI,VOL name. In Version 4.0 and later versions, this
syntax is still supported, but functions such as $QUERY and $NAME, and the
$ZREFERENCE system variable return vertical bars in accord with the ANSI
standard. This mode forces the system to return brackets for applications which are
coded to require them.

No <ASYNC> Error
By default, if a buffered DDP or Remote Volume Group transaction fails, an
<ASYNC> error is issued for the job that issued the SET or KILL. Enabling this
mode flag suppresses the <ASYNC> error. Use the %DBSYNC utility to to
determine whether errors occur while this flag is enabled.

110 • Job Execution Utilities MSM Utility Manual


Wait for RVG Transaction
By default, when a SET or KILL is issued to a global on a Remote Volume Group
that is locally mounted, the system buffers the transaction, allowing the job to
continue executing without waiting for a response from the remote system. If the
transaction fails, an <ASYNC> error occurs unless Mode Flag #4 is turned on.
Enabling this mode flag forces the system to wait for an acknowledgment for all
RVG transactions.

No Wait for DDP Transaction


By default, when a SET or KILL is issued via DDP to a global on a remote Volume
Group which is not locally mounted, the system waits for a response from the remote
system indicating success or failure before continuing. Enabling this mode flag
allows the system to buffer the transaction and allow the job to continue executing
without an acknowledgement from the remote system. If the transaction fails, an
<ASYNC> error occurs unless Mode Flag #4 is turned on.

SET Null Subscripts


When this feature is enabled, globals and local nodes can be created in which one or
more subscript values are null. Globals and locals can also be killed with null
subscript values. Care must be exercised when using this option since it impacts the
behavior of the $ORDER function.

Reference Null Subscripts


This functions controls whether or not a program can reference (fetch) data from a
global or local variable by specifying a key that contains one or more null subscripts.

SET $T on JOB command


The ANSI standard indicates that after a JOB command is issued, the value of the
$TEST special variable will be changed only if the JOB command contained a
timeout value. For compatibility with certain other systems, the option causes $T to
be set after each JOB command regardless of whether or not it contains a timeout
value.

Routine Lines Greater than 255


Normally, a line within a routine is limited to 255 characters. This option removes
that limit. When this limit is removed, the only restriction is that a line of text must
fit entirely within one disk buffer and the compiled code for the line of text must also
fit completely within one disk buffer. Because the compiled code for a line of text
will vary depending on the content of the text, the maximum length of a text line
cannot be precisely defined.

No Screen Erase on WRITE #


Normally, MSM-PC/PLUS erases the screen when a WRITE # command is issued to
the console. This only applies to the MSM-PC/PLUS console or window devices.
This option instructs the system to bypass the screen erase function.

MSM Utility Manual Job Execution Utilities • 111


Terminate ESC Processing on First Alphanumeric
Normally, when Escape Processing is enabled, MSM terminates a READ when the
last character of the function key sequence is received. For example, the up-arrow
key generates EscA, and MSM terminates the READ after the A is received. For
VT200-type terminals, certain functions generate sequences with multiple numeric
characters followed by the tilde (~) character. In this case, MSM terminates the
READ when the tilde is received.
In Version 2.1, MSM terminated the READ when the first alphanumeric character
was received. Alhough this prevents VT200-style function keys from being
supported, certain applications might have been coded to work this way. Turning on
this mode flag disables the processing of VT200-style function key sequences for
backward compatibility with Version 2.1.

Undefined Global Nodes Return Null


Normally, when a non-existent node within a global is referenced, MSM generates
an error condition. Use this option to indicate that the system should return a null
value rather than treating this condition as an error. The program then determines the
course of action to be taken.

Undefined Local Nodes Return Null


Normally, when a non-existent node within a local variable is referenced, MSM
generates an error condition. Use this option to indicate that the system should return
a null value rather than treating this condition as an error. The program then
determines the course of action to be taken.

Sample terminal session


>D ^%MODESET

MSM - Environmental Mode Utility

Current Mode Settings:

Switch Description Status


------ ----------------------------------------------- ------
0 Strict ANSI X11.1-1995 Conformance NO
1 Force $ZDATE to Always Return a Four-Digit Year NO
2 Set MSMSHELL programmer mode prompt to [UCI,VGP] NO
3 Version 3 Mode for Cross-UCI References in NO
Functions
4 No Error Message for <ASYNC> Error NO
5 Wait for RVG Set or Kill Global Request NO
6 No Wait for DDP Set or Kill Global Request NO
7 Allow SET with Null Subscripts NO
8 Allow Reference to Null Subscripts NO
10 Always Set $T on JOB Command NO
11 Allow Routine Lines Greater than 255 NO
12 On WRITE # Command, Do Not Erase Screen NO
13 Terminate ESC Processing on First Alphanumeric NO
14 Treat Undefined Global Nodes as Null Valued NO
15 Treat Undefined Local Nodes as Null Valued NO

ENTER SWITCH TO TOGGLE > ?

Enter either the switch number, or one or more characters of the switch
you wish to turn on/off. The switch will be toggled opposite from its
current value.
Enter <RETURN>, or '^', or '^Q' to exit this utility.
ENTER SWITCH TO TOGGLE > 8 Allow Reference to Null Subscripts

112 • Job Execution Utilities MSM Utility Manual


Switch Description Status
------ ------------------------------------------- ------
0 Strict ANSI X11.1-1995 Conformance NO
1 Force $ZDATE to Always Return a Four-Digit Year NO
2 Set MSMSHELL programmer prompt to [UCI,VGP] NO
3 Version 3.0 Mode for Cross-UCI References in NO
Functions
4 Get Error Message for <ASYNC> Error NO
5 Wait for RVG Set or Kill Global Request NO
6 No Wait for DDP Set or Kill Global Request NO
7 Allow SET with Null Subscripts NO
8 Allow Reference to Null Subscripts YES
10 Always Set $T on JOB Command NO
11 Allow Routine Lines Greater than 255 NO
12 On WRITE # Command, Do Not Erase Screen NO
13 Terminate ESC Processing on First Alphanumeric NO
14 Treat Undefined Global Nodes as Null Valued NO
15 Treat Undefined Local Nodes as Null Valued NO

ENTER SWITCH TO TOGGLE >

Two internal entry points allow application programs to control environmental mode
flags. One or more switches can be turned on or off with a single call to
%MODESET. The following examples illustrate how these entry points are used. If
only one switch is being changed, the quotes around it are optional.
D ON^%MODESET(7) Turn on switch 7
D OFF^%MODESET("7,8,14,15") S Turn off switches 7, 8, 14, 15
X="9,10" D ON^%MODESET(X) Turn on switches 7 and 8

MSM Utility Manual Job Execution Utilities • 113


%MTCHK - Magnetic Tape Check
The %MTCHK utility assists the programmer in determining the status of a magnetic
tape drive. It provides all of the tools necessary to interrogate the status of a tape
drive and display the results.
It includes separate entry points for each function that it performs. On entry to the
utility, the tape drive to be tested must be the current device. Any status messages
displayed by the utility are directed to the principal device (device 0). The following
sections describe each entry point in detail.

^%MTCHK
Displays a list of messages showing the complete status (normal conditions and error
conditions) of the current tape drive.

%SET^%MTCHK
Creates a series of local variables that the programmer can use to test a tape device
for each status condition that can exist. When one of these local variables is
referenced through indirection (for example: IF @%MTEOT), the value returned is 1
if the condition is true and 0 if the condition is false. The following is a list of the
local variables and their meanings.

%MTBOT Beginning of tape


%MTEOT End of tape (physical)
%MTEOD End of recorded data
%MTPIP Tape positioning in progress
%MTONL Tape is online
%MTON Tape is ready
%MTMED Tape media has been changed
%MTTMK Tape mark detected
%MTLER Logical tape error
%MTBLK Block length error
%MTMER Tape media error
%MTWLK Tape is write-protected
%MTBUS Bus error
%MTDAT Data overrun
%MTHDW Hardware error
%MTRES Reserved for future use
%MTERR Any error condition

%KILL^%MTCHK
Kills the local variables that were created by the %SET entry point.

114 • Job Execution Utilities MSM Utility Manual


%ERRCHK^%MTCHK
Displays any error conditions that exist for the current tape drive and returns two
local variables that contain status information. The %MTERR local variable equals
1 if an error condition was found; otherwise, it equals 0. The %MTWLK local
variable equals 1 if the tape is write-protected; otherwise, it equals 0.

%ERR^%MTCHK
Performs the same function as the %ERRCHK entry point, except that no status
messages are displayed (only the local variables are returned).

Sample terminal session


>U 47 D ^%MTCHK

Tape is On-line
Tape is Ready
Tape is Write-Protected

>D %SET^%MTCHK

>W

%MTBOT="$ZB($ZA,1,1)"
%MTBLK="$ZB($ZA,512,1)"
%MTBUS="$ZB($ZA,4096,1)"
%MTDAT="$ZB($ZA,8192,1)"
%MTEOD="$ZB($ZA,4,1)"
%MTEOT="$ZB($ZA,2,1)"
%MTERR="($ZB($ZA,7+8+16+32+64+128+2048,2)'=0)!($ZB($ZA,16,1)=0)"
%MTHDW="$ZB($ZA,16384,1)"
%MTLER="$ZB($ZA,256,1)"
%MTMED="$ZB($ZA,64,1)"
%MTMER="$ZB($ZA,1024,1)"
%MTON="$ZB($ZA,32,1)"
%MTONL="$ZB($ZA,16,1)"
%MTPIP="$ZB($ZA,8,1)"
%MTRES="$ZB($ZA,32768,1)"
%MTTMK="$ZB($ZA,128,1)"
%MTWLK="$ZB($ZA,2048,1)"

>U 47 D %ERR^%MTCHK

>W

%MTERR=0
%MTWLK=1

>D %KILL^%MTCHK

>W

>

MSM Utility Manual Job Execution Utilities • 115


%PARTSIZ - Change Partition Size
Use this utility to modify the partition size (the maximum value of the $STORAGE
special variable) for the current job. The partition size for a job is the maximum
amount of storage that can be used for the local symbol table and routines. Within
MSM, partitions are dynamic; partition size can be adjusted up or down while the job
is executing. There is no penalty for specifying a large partition since only the actual
space being used by the job is reserved. For example, if a job has a 30-K partition
with only 10K actually being used, then MSM only reserves 10K of space.
When the utility is invoked, MSM displays the current partition size and prompts the
user for the new partition size in K-bytes (20 is 20K). To call the utility from a job,
pass the partition size in the local variable %K and invoke the routine at entry point
INT (INT^%PARTSIZ).

Sample terminal session


>D ^%PARTSIZ

MSM - Partition Size Utility


03-MAR-98 10:54 AM

Enter partition size <50> ?

Enter the new partition in 1-K increments.


The size can range from 12K to 16MB.
It can be entered in the following formats:
nnnk, nnnK, or nnn, sets the partition size to nnn*1024 bytes.
nnm or nnM sets the partition size to nn**1024*1024 bytes,
or nn megabytes.

Enter partition size <50> RETURN

Enter partition size <20> ?

Enter the new partition in 1-K blocks


The size can be from 12K to 256K

Enter partition size <20> 20

Partition size changed from 20K to 20K

>S %K=18 D INT^%PARTSIZ

>

116 • Job Execution Utilities MSM Utility Manual


%SDEV - Device Selector
Use this utility to select a device for input or output. The device may be a terminal, a
printer, the current device, a Host File Server (HFS) device, a Sequential Block
Processor (SBP) device, the host spooling device (HOSTSPOOL), or a magnetic tape
device (MTD). The utility opens the device and returns the selected device number
in the %DEV local variable. If an error prevents the requested device from being
opened or if you do not select a device, the QUIT local variable is defined and set to
null when the routine terminates. The calling routine should test for this condition
before trying to access the device.
If the device being opened is a Host File Server device, the utility also returns the
name of the host file in the %FN local variable and the value of the $ZA special
variable in the %ZA local variable. The routine supports the following internal entry
points:
^%SDEV Prompts for an output device with the Host File Server as the
default.
OUT^%SDEV Prompts for an output device with the Host File Server as the
default.
IN^%SDEV Prompts for an input device with the Host File Server as the
default.
PR^%SDEV Prompts for an output device with device 3 (the printer) as the
default.
CRT^%SDEV Prompts for an output device with the current device number
as the default.
P0^%SDEV Prompts for an output device with the device number 0 (zero)
as the default.
SBP^%SDEV Prompts for an output device with the Sequential Block
Processor as the default.
SBPIN^%SDEV Prompts for an input device with the Sequential Block
Processor as the default.
When you select an SBP device, enter the number of the volume group that contains
the SBP area, the offset into the disk block where processing is to begin, and the
starting block number to begin processing. If the specified block is not in the SBP
area, an error message is issued and MSM prompts you again to select the device.

Sample terminal session


>D ^%SDEV

Enter output device <HFS>: ?

Enter device number for output.


Valid device numbers are: 1,3-19,64-199,256 and up,47-50,51-54,59-62.
Enter 'HFS' to select the first available Host File Server Device
Enter 'HOSTSPOOL' to select the Host Spooling Device
Enter 'SBP' to select the first available Sequential Block Processor
Enter 'MTD' to select the first Magnetic Tape Device

Enter output device <HFS>:

MSM Utility Manual Job Execution Utilities • 117


File Name >: ?

Enter the name of the host operating system file to write to.
The file name should include the fully-qualified path name that
identifies the location of the file.

File Name >: TESTFILE


>W

%DEV=51
%DEVOARG
%DEVTYPE
%FN="TESTFILE"
%ZA=0

>D SBP^%SDEV
Enter output device <SBP>:
Enter Volume Group Number <0>: ?

Enter the name or number of volume group containing SBP area

Enter Volume Group Number <0>:


Starting block number >: ?

Enter relative starting block number to store output

Starting block number >: 1790


Enter Block Offset <0>: ?

Enter the relative offset in the block

Enter Block Offset <0>:

>

118 • Job Execution Utilities MSM Utility Manual


%VIDEO - Modify Video Buffer
Use this utility to modify the contents of the PC Console video buffer. It allows
programs to extract information from or insert information into the video buffer.
The routine can access the data and video attributes, just the video attributes, or just
the data for any rectangular area of the screen. The routine is called using parameter
passing with one of the following formats:
DO GET^%VIDEO(.Buffer,X,Y,NumCols,NumRows,Mode)
DO PUT^%VIDEO(Buffer,X,Y,NumCols,NumRows,Mode)
Buffer The local variable where the information will be stored for a GET
operation or where it is stored for a PUT operation.
X The location of the column of the upper left corner of the rectangle
that is to be accessed. The first column of the screen is 0, the
second column is 1, and so on
Y The location of the row of the upper left corner of the rectangle that
is to be accessed. The first row of the screen is 0, the second row is
1, and so on.
NumCols The number of columns in the rectangle that is being accessed.
NumRows The number of rows in the rectangle that is being accessed.
Mode A value that specifies the type of information to be extracted from
or inserted into the video buffer. The values are as follows:
0 = Text values only
1 = Video attributes only
2 = Text and video attributes
In the GET subroutine, you must specify the Buffer using call by reference (.Buffer
must be specified) in order for the function to work properly. The PUT subroutine
uses call-by-value parameter passing (no period (.) precedes the Buffer
specification).

Sample terminal session


The following example illustrates how the %VIDEO utility can be used:
TERM ;
D GET^%VIDEO(.SAVESCR,3,14,40,10,2) ; save portion of screen
;
; application code which updates the screen
;
D PUT^%VIDEO(SAVESCR,3,14,40,10,2) ; restore saved area of
screen

MSM Utility Manual Job Execution Utilities • 119


120 • Job Execution Utilities MSM Utility Manual
Arithmetic Utilities

Overview
This chapter describes the library utilities that can be called to perform decimal to
hexadecimal conversions, hexadecimal to decimal conversions, and square roots.

%DH - Decimal to Hexadecimal


Use this utility to convert numbers from decimal to hexadecimal format. After you
enter the decimal number to be converted, the utility displays the number in
hexadecimal and prompts for another value. If you enter a null response, the utility
terminates.

Sample terminal session


>D ^%DH

MSM - Decimal to Hex Conversion Utility

Enter Decimal Number > ?

Enter the Decimal number to be converted to Hex

Enter Decimal Number > 255 FF

Enter Decimal Number > 19365 4BA5

Enter Decimal Number > 47 2F

Enter Decimal Number > 1234 4D2

Enter Decimal Number > 1F3 ...Invalid Decimal number

Enter Decimal Number >

>

MSM Utility Manual Arithmetic Utilities • 121


%HD - Hexadecimal to Decimal
Use this utility to convert numbers from hexadecimal to decimal format. After you
enter the hexadecimal number to be converted, the utility displays the number in
decimal and prompts for another value. If you enter a null response, the utility
terminates.

Sample terminal session


>D ^%HD

MSM - Hex to Decimal Conversion Utility

Enter Hex number > ?

Enter the Hex number to be converted to Decimal

Enter Hex number > 10 16

Enter Hex number > 1FE8 8168

Enter Hex number > FF 255

Enter Hex number > 1B 27

Enter Hex number > 40 64

Enter Hex number > 1H7 ...Invalid Hex number

Enter Hex number >

>

122 • Arithmetic Utilities MSM Utility Manual


%MFUNC - Mathematical Functions
This utility contains a variety of entry points to perform common mathematical
functions. Each entry point is called as an extrinsic function. The functions are
passed none, one, or two parameters depending on the type. The following table lists
the defined entry points:

Function Description of Function


E() Value of e (2.712818284590452354)
PI() Value of (3.1415926535897932)
EXP(X) Value of e (2.71...) raised to the power of X
LOG(X) Logarithm (base 10) of X (LOG10 X)
LN(X) Natural logarithm (base e) of X
PWR(X,Y) Value of X raised to the power of Y (XY)
SQR(X) Square root of the argument X
SIN(X) Trignometric sine of X*
COS(X) Trignometric cosine of X*
TAN(X) Trignometric tangent of X*
COT(X) Trignometric cotangent of X*
SEC(X) Trignometric secant of X*
CSC(X) Trignometric cosecant of X*
ASIN(X) Trignometric inverse sine of X*
ACOS(X) Trignometric inverse cosine of X*
ATAN(X) Trignometric inverse tangent of X*

* Expressed in radians. To convert from radians to degrees:


deg=(radians*360)/2

Sample terminal session


>W $$PI^%MFUNC

3.1415926535897932

>W $$LN^%MFUNC(14)

2.639057329624927

>W $$COS^%MFUNC(4)

-.65364362086361236

MSM Utility Manual Arithmetic Utilities • 123


%SQRT - Square Root
This utility calculates the approximate square root of a number. The value of the
number for which the square root is to be calculated is passed to the routine in the
%X local variable. The square root is returned in the %RES local variable and the
value of %X is not altered. If the routine detects an error (for example: attempted
square root of a negative number), then the value of %RES is returned as a null.

Sample terminal session


>K

>S %X=88765

>D ^%SQRT

>W

%RES=297.93455657241239
%X=88765

>

124 • Arithmetic Utilities MSM Utility Manual


Database Utilities

Overview
This chapter describes the Manager utilities that are used to display, map, validate,
and repair volume groups, control global placement, and perform other functions.

BLKDMP - Block Dump


Use this utility to display the contents of disk blocks within an MSM volume group.
It can be used to display Global Directories, Global Pointer Blocks, Global Data
Blocks, Routine Directories, and Map blocks. It does not display Routine Header
blocks, Routine Data blocks, SBP blocks, or Journal blocks. The following fields are
displayed:
OFFSET The offset into the block of the next free location. This value
is used by the system to determine where it can add a new
entry to the block. Without this value, the system would have
to search the block.
OFST The offset of the pointer entry in the global directory, the
global pointer block, or the routine directory.
NAME The name of the global that is associated with the block. The
name may or may not include subscripts depending on the type
of block being displayed.
CS The collating sequence associated with the global. This field
is only displayed for the global directory blocks. Valid types
are String and Numeric.
JRNL This flag indicates whether or not the global is to be journaled.
This field is only displayed for the global directory blocks. If
the global is always to be journaled, the field will contain a J.
If it is never to be journaled, it will contain NJ. If the field is
blank, then the global will be journaled only if the entire UCI
is journaled.

MSM Utility Manual Database Utilities • 125


PROTC The protection attributes associated with the global. This field
(S,W,G,U) is only displayed for the global directory blocks. For each
class (S=System, W=World, G-Group, and U=User), the level
of protection allowed is displayed (R=Read, W=Write, and
D=Delete). If a type of protection is not allowed, then a period
is displayed in that position.
GROWTH The growth area associated with the global. The expansion
value can be set with the %GCH utility. Refer to that utility
for additional information.
PTR BLK The pointer block is associated with the next entry. This is the
block address expressed as the volume number:relative block
number (0:1234). The pointer may be to another pointer
block, a bottom level pointer block, or a data block.
KEY OFST The offset of the key value in the block. This is the absolute
location within the block of the first byte of the key associated
with a global entry. The offsets are relative zero (the first byte
of the block is 0, the second is 1, and so on).
DATA OFF The offset of the data value in the block. This value is useful
since MSM automatically compresses key information. This is
the absolute location within the block of the first byte of the
data associated with a global entry. The offsets are relative
zero (the first byte of the block is 0, the second is 1, and so
on).
GLOBAL The name of the global and its data value. This field only
NAME/VALUE exists within a global data block.
RANGE The range of blocks within a map described by this entry. This
field is only displayed for Map blocks. It shows the starting
and ending block numbers (inclusive) that are described by the
map.
LINK BLOCK The right link pointer to the next block on the same pointer
level.
CNT A count of the blocks within the range. This is only displayed
for Map blocks.
ALLOCATED TO Indicates who owns the range of blocks being displayed. This
field is only displayed for Map blocks. Blocks can be
allocated to the system (SYSTEM), a particular UCI (the
number of the UCI is displayed), free pool (Free), or may not
actually exist within the volume group (Non-Database).
When the utility is invoked, enter the block number of the disk block to be displayed.
After a block is selected, the %SDEV utility is called to select the output device. If
the output device is the current terminal, MSM prompts you to indicate whether or
not the screen is to be scrolled.

126 • Database Utilities MSM Utility Manual


Invoking the BLKDMP Utility
>D ^BLKDMP

MSM - Block Dump Utility

BLOCK: ?

Enter block number in one of the following forms:

bn
vg:bn
bn:vg
vn:bn:vg
exp
*

Where vn is the volume number (0 is the default),


bn is the relative block number,
vg is a 'G' followed by volume group index (Once a volume
group is specified, that will be the default until a
different one is specified),
exp is a MUMPS expression (X+3),
* means the block currently in the View buffer.

BLOCK:

Global Directory
BLOCK: 2

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 2 (0:2) Volume group 0

Global directory block Offset=341

OFST NAME CS JRN PROTC (S,W,G,U) GROWTH PTR BLK


---- -------- -- --- --------------- ------- -------
13 % N RWD,R..,R..,RWD 0 291
28 %HELP N RWD,R..,R..,RWD 0 933
46 %ZIS N RWD,R..,R..,RWD 0 4
63 %ZTSCH N RWD,R..,R..,RWD 0 7
81 CLJ N RWD,...,...,RWD 0 9
98 HELP N RWD,...,...,RWD 0 956
116 MDS N RWD,RWD,RWD,RWD 2000 8247
133 SCR N RWD,...,...,RWD 0 11
150 SCRDEF N RWD,...,...,RWD 0 1062
167 SCRNST N RWD,...,...,RWD 0 1144
184 SCRSYS N RWD,...,...,RWD 0 1146
201 SCRUTL N RWD,...,...,RWD 0 1148
218 SYS N RWD,...,...,RWD 0 967
234 SYSGEN N RWD,...,...,RWD 0 308
251 TEST N RWD,...,...,RWD 0 1248
269 UTILITY N RWD,...,...,RWD 0 7123
290 XCR N RWD,...,...,RWD 0 3330
307 XMIT N RWD,...,...,RWD 0 8168
324 ZUT N RWD,...,...,RWD 0 8119

Current block is 0:2

BLOCK:

>

MSM Utility Manual Database Utilities • 127


Global Pointer
BLOCK: 309

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 309 (0:309) Volume group 0

Bottom pointer block Offset=427

OFST PTR BLK NAME


---- ------- ----
0 310 SYSGEN
12 311 SYSGEN(JRNL,3,1)
29 312 SYSGEN(JRNLTYPE,2,2)
45 313 SYSGEN(MENU,4,1)
61 314 SYSGEN(MENU,10,11)
74 315 SYSGEN(SGCNFG,2,3)
92 316 SYSGEN(SGDDB,1,6)
107 317 SYSGEN(SGDDB,2,5)
117 318 SYSGEN(SGDDB.PADDR.PC,3)
135 319 SYSGEN(SGDDB.STATUS.CRT,2,1)
157 320 SYSGEN(SGDDB.STATUS.LFSUPP,1,1)
175 321 SYSGEN(SGDDB.STATUS.PASSALL,1,2)
194 322 SYSGEN(SGDDB.STATUS.UPCASE,2,2)
212 323 SYSGEN(SGDISK,0,12)
227 324 SYSGEN(SGJOB,2,6)
242 325 SYSGEN(SGMODBUF,0,5)
259 326 SYSGEN(SGPAC,0)
270 327 SYSGEN(SGTTT,0,2)
284 328 SYSGEN(SGTTT,0,19)
293 329 SYSGEN(SGTTT,3,2)
304 330 SYSGEN(SGUCI,0,8)
318 331 SYSGEN(SYSGEN,2)
332 332 SYSGEN(SYSGEN,2,18)
341 333 SYSGEN(SYSGEN,4)
348 334 SYSGEN(SYSGEN,6,1)
358 335 SYSGEN(SYSGEN,6,18)
367 336 SYSGEN(SYSGEN,11)
376 337 SYSGEN(SYSGEN.FULL,0,4)
392 338 SYSGEN(SYSGEN.FULL,0,23)
401 339 SYSGEN(SYSGEN.FULL,0,41)
409 340 SYSGEN(UCIADD,4,1)

Current block is 0:309

BLOCK:

>

128 • Database Utilities MSM Utility Manual


Global Data
BLOCK: 5

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 5 (0:5) Volume group 0

Data block Offset=397

KEY,DATA GLOBAL NAME/


OFST OFST VALUE
---- ---- -----
0,10 UTILITY=...<UNDEF>...
11,21 UTILITY(1,SYS)=""
23,29 UTILITY(1,SYSGEN)=""
31,47 UTILITY(%ER,53117,0)="1"
52,59 UTILITY(%ER,53117,1,0)="$ZE=<NOPGM>*XECUTE*:::4:3:"
87,92 UTILITY(%ER,53117,1,1)="$H=53117,35828"
108,112 UTILITY(%ER,53117,1,2)="$J=1"
118,122 UTILITY(%ER,53117,1,3)="$I=1"
128,132 UTILITY(%ER,53117,1,7)="NAKED REFERENCE="
150,157 UTILITY(%ER,53117,1,100)="2"
162,166 UTILITY(%ER,53117,1,101)="%DN=38866"
177,181 UTILITY(%ER,53117,1,102)="%DS=MAY 31 1947"
198,203 UTILITY(%GD)="53110,37937"
216,221 UTILITY(%GD,%)=""
223,230 UTILITY(%GD,%HELP)=""
232,239 UTILITY(%GD,HELP)=""
241,247 UTILITY(%GD,SYS)=""
249,255 UTILITY(%GD,SYSGEN)=""
257,267 UTILITY(%GD,UTILITY)=""
269,274 UTILITY(%RD)="53110,37955"
287,298 UTILITY(%RD,%ACTJOB)=""
300,309 UTILITY(%RD,%CHKSUM)=""
311,315 UTILITY(%RD,%D)=""
317,324 UTILITY(%RD,%DEBUG)=""
326,333 UTILITY(%RD,%DEVUSE)=""
335,339 UTILITY(%RD,%DH)=""
341,345 UTILITY(%RD,%DI)=""
347,351 UTILITY(%RD,%DO)=""
353,360 UTILITY(%RD,%ECHO)=""
362,366 UTILITY(%RD,%ER)=""
368,372 UTILITY(%RD,%ER1)=""
374,382 UTILITY(%RD,%ERRCODE)=""
384,388 UTILITY(%RD,%ET)=""
390,395 UTILITY(%RD,%FL)=""

Current block is 0:5

Link block is 0:1040

BLOCK:

MSM Utility Manual Database Utilities • 129


Routine Directory
BLOCK: 3

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 3 (0:3) Volume group 0

Routine directory block Offset=65

OFST PTR BLK NAME


---- ------- ----
0 579
5 1508 %FLIST
17 578 %ROU
26 2001 DBINIT
38 1754 MAPDDB3
51 885 VALIDATE

Current block is 0:3

BLOCK:

>

Routine Header
BLOCK: 23

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 23 (0:23) Volume group 0

Routine Header Block, Routine name= '%D'

Option not available

Current block is 0:23

Link block is 0:24

BLOCK:

>

Routine Data
BLOCK: 24

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 24 (0:24) Volume group 0

Routine block

Option not available

Current block is 0:24

BLOCK:

>

130 • Database Utilities MSM Utility Manual


Map Block
BLOCK: 1

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 1537 (0:1537) Volume group 0

Map block Free space=181

RANGE CNT ALLOCATED TO


---------- ----- --------- --
1536 1
1537 SYSTEM
1538 -1637 (100) 1
1638 SYSTEM
1639 -1763 (125) 1
1764 SYSTEM
1765 -1769 ( 5) 1
1770 -1794 (25) SBP
1795 -1796 ( 2) 3
1797 -1977 (181) FREE
1978 -2047 (70) 1

BLOCK:

>

Sequential Block Processor


BLOCK: 8197

Enter output device <1>: RETURN

Do you want to scroll? <N> RETURN


Block 8197 (0:8197) Volume group 0

Sequential block processor block

Option not available

Current block is 0:8197

Link block is 0:8198

BLOCK:

>

Journaling Block
BLOCK: 8251

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 8251 (0:8251) Volume group 0

Journaling block

Option not available

BLOCK:

>

MSM Utility Manual Database Utilities • 131


DBFIX - Database Block Fix
Use this utility to repair the most common errors in an MSM volume group.
Generally, the first step of volume group repair is to run the VALIDATE utility to
identify any existing errors. With the information supplied by VALIDATE (block
number, offset into the block, and error message) use the DBFIX utility to correct the
errors.
After invoking the utility, enter the block number, block type, and function to be
performed. In the following examples, each function is illustrated. If a function is
specific to a block type, the restrictions are noted.

Invoking the DBFIX Utility


>D ^DBFIX

MSM - Database Repair Utility

Block Number: ?

Enter block number in one of the following forms:

bn
vn:bn
bn:vg
vn:bn:vg

Where vn is the volume number (0 is the default),


bn is the relative block number,
vg is a 'G' followed by volume group index (Once a volume
group is specified, that will be the default until a
different one is specified),

If a complete global reference (with quotes around the string nodes) is


entered, the pointer block path to the block which contains the node
will be displayed.

Block Number: 2

Block Type <GLOBAL DIRECTORY(BOTTOM)> ?

Enter a valid block type. Valid types are: Global Directory, Pointer,
Global Data, Long Data, Routine Directory, Routine Header, Routine
Continuation, Map, Sequential processor, Spooling directory, Spooling
data, Volume label, UCI definition, BIJ status, OLB status,
Configuration, Volume Header Extension, XPointer and XGlobal Data.
Enter ^ to return to the previous question, or
^Q to exit the utility.

Block Type <GLOBAL DIRECTORY(BOTTOM)> RETURN

Bottom Level GLOBAL DIRECTORY <Y> ?

Enter YES if this is a bottom level block, otherwise enter NO.


Enter '^' to return to the previous question, or
'^Q' to exit the utility.

Bottom Level GLOBAL DIRECTORY <Y> RETURN

Enter Request: ?

132 • Database Utilities MSM Utility Manual


Enter one of the following options:
LIST - List a block
HEX - Hexadecimal listing of the block
CLEAR - Clear the block to zeros (leaves block type unchanged)
ADD - Add an entry to the block
DELETE - Delete an entry from the block
RIGHT - Right Link Pointer
OFFSET - Change the Offset value
ALLOCATE - Allocate this block in the corresponding map block
RELEASE - Deallocate this block from map block
WRITE - Write the block to disk
IGNORE - Ignore the current block and start over
PATCH - Patch a byte within the block
VALIDATE - Validate block and its descendants
^ - To backup to the last question
^Q - To exit this utility
? - For HELP in response to any question
Enter Request:

1RWH When a question mark (?) is entered in response to the Enter Request prompt,
only those options that are allowed for the current block type are displayed. In the
above example, all of the possible options are shown.

LIST - List the Contents of a Block


Use the LIST option to display the contents of a disk block in a formatted listing.
The BLKDMP utility is called to do the listing. The %SDEV utility prompts you to
enter an output device; if it is the current device, indicate whether or not the display
is to be scrolled. Refer to the BLKDMP utility for detailed information about the
displayed fields. This option is valid for Global Directories, Global Pointer Blocks,
Global Data Blocks, Routine Directories, and Map Blocks.
Block Number: 2
Block Type <GLOBAL DIRECTORY(BOTTOM)>
Bottom Level GLOBAL DIRECTORY <Y>
Enter Request: LIST

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN
Block 2 (0:2) Volume group 0
Global directory block Offset=341
OFST NAME CS JRN PROTC (S,W,G,U) GROWTH PTR BLK
---- -------- -- --- --------------- ------- -------
13 % N RWD,R..,R..,RWD 0 291
28 %HELP N RWD,R..,R..,RWD 0 933
46 %ZIS N RWD,R..,R..,RWD 0 4
63 %ZTSCH N RWD,R..,R..,RWD 0 7
81 CLJ N RWD,...,...,RWD 0 9
98 HELP N RWD,...,...,RWD 0 956
116 MDS N RWD,RWD,RWD,RWD 2000 8247
133 SCR N RWD,...,...,RWD 0 11
150 SCRDEF N RWD,...,...,RWD 0 1062
167 SCRNST N RWD,...,...,RWD 0 1144
184 SCRSYS N RWD,...,...,RWD 0 1146
201 SCRUTL N RWD,...,...,RWD 0 1148
218 SYS N RWD,...,...,RWD 0 967
234 SYSGEN N RWD,...,...,RWD 0 308
251 TEST N RWD,...,...,RWD 0 1248
269 UTILITY N RWD,...,...,RWD 0 7123
290 XCR N RWD,...,...,RWD 0 3330
307 XMIT N RWD,...,...,RWD 0 8168
324 ZUT N RWD,...,...,RWD 0 8119
Current block is 0:2
Enter Request:

MSM Utility Manual Database Utilities • 133


CLEAR - Clear a Block
Use the CLEAR option to reset a block to all zeros. After the block is cleared, the
system prompts for the block type so that the block can be properly initialized. After
a block is cleared, use other functions such as ADD and RIGHT to fully reconstruct
the block. The CLEAR option is valid for all block types.
Enter Request: CLEAR..........

Block Type <GLOBAL DIRECTORY(BOTTOM)>

Bottom Level GLOBAL DIRECTORY <Y>

Enter Request:

ADD - Add an Entry to the Block


Use the ADD option to insert a key into a pointer block, global directory block, or
routine directory block. This option is invalid for all other block types. Enter the
key that is to be inserted. The key may be a full global reference (CUST(1,"JOHN
SMITH",3,"INVOICE")) with or without the up-arrow, a global name without
subscripts, or a routine name. After the key is supplied, enter the block number to be
used for the pointer value of the key and specify whether the UCI owns the directory
if the block being modified is a global directory.
Enter Request: ADD ...one moment please.

Enter key of entry to insert: ?

Enter the full global reference (with quotes) for the entry
to be inserted.

Enter key of entry to insert: TEST

Enter block number for the new pointer entry: ?

Enter the block number at which the entry can be found.

Enter block number for the new pointer entry: 1248

Enter the UCI name for this directory: ?

Enter the three-letter UCI name which has this block as its global
directory.
Enter '^L' for a list of UCIs.

Enter the UCI name for this directory: MGR

Enter Request: LIST

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 2 (0:2) Volume group 0

Global directory block Offset=341

134 • Database Utilities MSM Utility Manual


OFST NAME CS JRN PROTC (S,W,G,U) GROWTH PTR BLK
---- -------- -- --- --------------- ------- -------
13 % N RWD,R..,R..,RWD 0 291
28 %HELP N RWD,R..,R..,RWD 0 933
46 %ZIS N RWD,R..,R..,RWD 0 4
63 %ZTSCH N RWD,R..,R..,RWD 0 7
81 CLJ N RWD,...,...,RWD 0 9
98 HELP N RWD,...,...,RWD 0 956
116 MDS N RWD,RWD,RWD,RWD 2000 8247
133 SCR N RWD,...,...,RWD 0 11
150 SCRDEF N RWD,...,...,RWD 0 1062
167 SCRNST N RWD,...,...,RWD 0 1144
184 SCRSYS N RWD,...,...,RWD 0 1146
201 SCRUTL N RWD,...,...,RWD 0 1148
218 SYS N RWD,...,...,RWD 0 967
234 SYSGEN N RWD,...,...,RWD 0 308
251 TEST N RWD,...,...,RWD 0 1248
269 UTILITY N RWD,...,...,RWD 0 7123
290 XCR N RWD,...,...,RWD 0 3330
307 XMIT N RWD,...,...,RWD 0 8168
324 ZUT N RWD,...,...,RWD 0 8119

Current block is 0:2

Enter Request:

DELETE - Delete an Entry From the Block


Use the DELETE option to remove a key from a routine directory, a global directory,
or a pointer block. This option is invalid for all other block types. Enter the key to
be removed; it can be a routine name, global name or full global reference with
subscripts, as appropriate. If the key does not exist, an error message is issued. The
DELETE option is valid only for global directory blocks, routine directory blocks,
and global pointer blocks.
Enter Request: DELETE ...one moment please.

Entry to delete: ?

Enter the full global reference (with quotes) for the entry to be
deleted.
Or, you can enter the offset of the entry to be deleted.

Entry to delete: TEST

Enter Request: LIST

Enter output device <1>: RETURN


Do you want to scroll? <N> RETURN

Block 2 (0:2) Volume group 0

Global directory block Offset=323

MSM Utility Manual Database Utilities • 135


OFST NAME CS JRN PROTC (S,W,G,U) GROWTH PTR BLK
---- -------- -- --- --------------- ------- -------
13 % N RWD,R..,R..,RWD 0 291
28 %HELP N RWD,R..,R..,RWD 0 933
46 %ZIS N RWD,R..,R..,RWD 0 4
63 %ZTSCH N RWD,R..,R..,RWD 0 7
81 CLJ N RWD,...,...,RWD 0 9
98 HELP N RWD,...,...,RWD 0 956
116 MDS N RWD,RWD,RWD,RWD 2000 8247
133 SCR N RWD,...,...,RWD 0 11
150 SCRDEF N RWD,...,...,RWD 0 1062
167 SCRNST N RWD,...,...,RWD 0 1144
184 SCRSYS N RWD,...,...,RWD 0 1146
201 SCRUTL N RWD,...,...,RWD 0 1148
218 SYS N RWD,...,...,RWD 0 967
234 SYSGEN N RWD,...,...,RWD 0 308
251 UTILITY N RWD,...,...,RWD 0 7123
272 XCR N RWD,...,...,RWD 0 3330
289 XMIT N RWD,...,...,RWD 0 8168
306 ZUT N RWD,...,...,RWD 0 8119

Current block is 0:2

Enter Request:

RIGHT - Change Right Link Pointer in Block


Use the RIGHT option to change the right-link pointer within a block. This option is
valid for all block types except Map blocks. The right-link value is the block number
of the next block on the same level of the global. For example, a pointer block
points to one or more data blocks. All data blocks pointed to by the pointer block are
on the same level. For two consecutive entries in the pointer block, the data blocks
would be joined by a right-link from the first to the second. The current right-link
value is displayed, and the system prompts you to enter the new right-link value.
Enter Request: RIGHT

RIGHT LINK <1718> ?

Enter the new right link value or return to leave the current value
unchanged.

RIGHT LINK <1718> 1719

Enter Request:

OFFSET - Change the Offset Pointer in a Block


Use the OFFSET option to change the high-water mark of space used within a block.
The Offset points to the next free byte within a block. This value is used when
entries are inserted into a block, for computations to determine if there is space
within a block for a new entry, and so on. This option is valid for all block types.
Enter Request: OFFSET
OFFSET <323> ?

Enter the new offset value or <RETURN> to leave the current value
unchanged.
OFFSET <323> 324

Enter Request:

136 • Database Utilities MSM Utility Manual


SPACE - Change the Free Space Count
Use this option to modify the free space count within a Map block. Within a Map
block, MSM maintains a count of the free blocks. Use the VERIFY option to verify
that the actual number of free blocks and the number indicated by the count field
agree. If they do not agree, use the SPACE option to reset the value. This option is
only valid for Map blocks.
Enter Request: SPACE

FREE SPACE <1> ?

Enter the new free space count or <RETURN> to leave the current
value unchanged.

FREE SPACE <1> 3

Enter Request:

ASSIGN - Allocate a Block to a UCI


Use the ASSIGN option to allocate a block within a Map block. Generally, this
option is used when the actual number of allocated blocks within a Map block does
not agree with the indicated number of free blocks (as shown by the SPACE option).
To correct the discrepancy, allocate a block rather than adjust the SPACE count.
Enter the block number to be allocated and the UCI that owns the block. The block
number specified must be within the Map and marked Free, or an error message will
be issued.
Block Number: 2

Block Type <Global Directory (BOTTOM)> RETURN


Bottom Level GLOBAL DIRECTORY <Y> RETURN

Enter Request: ALLOCATE


Corresponding map block number: 1
Enter UCI > ?

Enter the name or the number of the UCI that is to own the block.
Enter SYSTEM for system-owned blocks
NON-DATABASE for blocks which are outside of the database
SBP for Sequential Block Processor blocks
JOURNAL for JOURNAL blocks
SPOOL for Spool blocks
Enter UCI >

FREE - Deallocate an In-Use Block


Use this option to release a block within a Map block. Enter the number of the block
to free. The block number must be within the Map block and must be allocated, or an
error message will be generated. This option is only valid for Map blocks.
Block Number: 1
Block Type <MAPBLK>

Enter Request: FREE

Enter block number > ?

Enter the number of the block whose status is to be changed.


A range of blocks can be specified in the form block1-block2.

Enter block number > 88

Enter Request:

MSM Utility Manual Database Utilities • 137


VERIFY - Verify Free Space in Map Block
Use the VERIFY option to verify that the free space indicated by the SPACE count
in the Map block agrees with the actual number of free blocks described by the Map.
If they do not agree, an error message is displayed. The same function is performed
by the VERIFY utility for all Map blocks rather than just a single Map block. This
option is valid only for map blocks.
Enter Request: VERIFY

Free Space Counter= 0, Actual Free Space Count= 0

Enter Request:

ALLOCATE - Allocate a Block


Use the ALLOCATE option to allocate a disk block within its corresponding Map
block. For example, if a block is allocated to a routine, global, SBP area, or Journal
area but is not marked as allocated in the Map block, then this option would be used
to allocate the block. If a block is marked as allocated but does not belong to a
global, routine, SBP area, or Journal area, then space will be wasted in the volume
group. Other than the loss of space, no corruption of the volume group will result.
The ALLOCATE option is valid for all block types except Map blocks.
Enter Request: ALLOCATE

Corresponding map block number: 1

Enter UCI > MGR

Enter Request:

RELEASE - Deallocate a Block


Use this option to deallocate a disk block from its corresponding Map block. For
example, if a block is not allocated to a routine, global, SBP area, or Journal area but
is marked as allocated in the Map block, you would use this option to free the block.
Use care to ensure that allocated blocks are not freed. If they are, unpredictable
results may occur. This option is valid for all block types except Map blocks.
Enter Request: RELEASE

Corresponding map block number: 1

OK TO RELEASE THE BLOCK <N> Y

Enter Request:

WRITE - Write the Block Back to Disk


Use the WRITE option to rewrite a block to disk after it has been modified. MSM
prompts you to verify that the block should be rewritten. This option is valid for all
block types.
Enter Request: WRITE

OK TO WRITE THE BLOCK <N> Y ...block rewritten to disk.

Enter Request:

138 • Database Utilities MSM Utility Manual


IGNORE - Ignore Changes to the Block
Use the IGNORE option to discard any changes that were made to a block but have
not yet been written to disk. After the ignore option is invoked, the block in the
VIEW buffer is discarded and the utility prompts for a new block number.
Enter Request: IGNORE ...block has not been changed.

BLOCK NUMBER:

HEX - Hexadecimal Listing


Use the HEX option to display the contents of the disk block in Hexadecimal. The
%MDMP utility is invoked by DBFIX to display the contents of the VIEW buffer
(the disk block being repaired resides in the VIEW buffer). Enter the starting
location (FROM OFFSET), the ending location (TO OFFSET), and specify whether
a HEX listing, a Character listing, or both are desired. The starting and ending
locations can be specified in Hexadecimal or Decimal. Refer to the %MDMP utility
for additional information. The HEX option is valid for all block types.
Enter Request: HEX
FROM OFFSET...: 0
TO OFFSET.....: 20
HEX FORMAT....: YES
CHAR FORMAT...: YES

Enter output device <1>: RETURN


0: 00000000 00000000 00000000 00000225 00000123 00D70000 01000000
........ ........ ........ ...... % ...... # ...W.... ........
20: 4C500000 03A500D7 00000100 00000104 5A495300 00000400 D7000000
L P.... ...%...W ........ ........ Z I S.. ........ .W......
Enter Request:

PATCH - Patch the Block in Hexadecimal


Use the PATCH option to change the contents of a block at the byte level. It is used
in conjunction with the HEX listing option. This is necessary when errors exist
within a block that cannot be corrected with the functions built into DBFIX. The
actual patching is done by invoking the MPATCH utility. For additional information,
refer to the MPATCH utility. This option is valid for all block types.
Enter Request: PATCH
Address: ?
Enter the address, in hexadecimal, where patching is to begin, or
the address in decimal preceded by a '+', or
^ or ^Q to exit the utility.
Address: +200
C8 Verify : ?
Enter the contents, in hexadecimal, of the memory to be patched.
The contents must match exactly for the patch to proceed. The
length of the data to verify can be up to 3 bytes (6 hex digits).
Enter ^ to return to the previous question, or
^Q to exit the utility.
C8 Verify : 00 Replace: 01
C9 Verify :
Address:
Enter Request:

MSM Utility Manual Database Utilities • 139


VALIDATE - Validate Block Contents
The VALIDATE option performs an internal integrity check of the disk block and all
descendant disk blocks (if the block is a global directory block, all globals in the
directory will be checked). The same mechanism employed by the VALIDATE
utility is used in the DBFIX utility. Refer to the VALIDATE utility for more
information and a list of errors that the utility can find. This option is valid for all
block types.
Enter Request: VALIDATE ... block(s) validate properly

Enter Request:

DISKMAP - Map of Disk Blocks


Use this utility to display usage of disk blocks within an MSM volume group. Enter
the volume group to display, the range of map blocks to display, and whether to
produce a detailed list or a summary list. On a detailed listing, space is sorted by
map block and by who owns it. Possible owners include the MGR UCI, a user UCI
(for example: VAH), the System (Map blocks, Directory blocks, and so on, are
owned by the system), Free space (space not owned by anyone), and Non-Volume
space (space within a Map block that does not exist in the volume because the
volume is not a multiple of 512 blocks). In a summary listing, only the total for the
map block is displayed.

Sample terminal session


>D ^DISKMAP

MSM - Diskmap Utility

Enter volume(s) <ALL>:

Enter the index number of the volume to be displayed.


Enter 'ALL' to display the map blocks for all volumes in this
volume group.
Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.
Volumes 0 through 0 are currently mounted for this volume group.

Enter volume(s) <ALL>: RETURN


Summary or Detail Listing <D> ?

Enter 'S' for a summary of space use


Enter 'D' for a quantitative list of block usage by UCI
Enter ^ to back up one question
Enter ^Q to exit utility

Summary or Detail Listing <D> RETURN


Enter output device <1>: ?

Enter device number for output.


Valid device numbers are: 1,3-19,64-199,256 and up,47-50,51-54,59-62.
Enter 'HFS' to select the first available Host File Server device.
Enter 'HOSTSPOOL' to select the Host Spooling device.
Enter 'SBP' to select the first available Sequential Block
Processor device.
Enter 'MTD' to select the first Magnetic Tape Device.

Enter output device <1>: RETURN

140 • Database Utilities MSM Utility Manual


DISKMAP UTILITY

Detail for Volume Group index 0 Run on 02/05/98

Map block Block number Free In use Allocated by


1 (0:1) 27 484 FREE - 27
MGR - 480
SYSTEM - 5
2 (0:513) 0 511 MGR - 511
SYSTEM - 1

3 (0:1025) 0 511 MGR - 511


SYSTEM - 1
4 (0:1537) 0 511 MGR - 511
SYSTEM - 1
5 (0:2049) 0 511 MGR - 511

6 (0:2561) 0 511 MGR - 511


SYSTEM - 1

7 (0:3073) 0 511 MGR - 511


SYSTEM - 1
8 (0:3585) 0 511 MGR - 511
SYSTEM - 1
9 (0:4097) 265 246 FREE - 265
MGR - 246
SYSTEM - 1
10 (0:4609) 511 0 FREE - 511
TOTALS
------

FREE - 803
MGR - 4303
SYSTEM - 13

>D ^DISKMAP

MSM - DISKMAP UTILITY

Enter volumes: <ALL> RETURN

Summary or Detail Listing <D> S

Enter output device <1>: RETURN

MSM Utility Manual Database Utilities • 141


DISKMAP UTILITY

Summary of Volume Group index 0 Run on 02/05/98

Map block Block number Free In use Allocated for


1 (0:1) 27 484 DATABASE

2 (0:513) 0 511 DATABASE

3 (0:1025) 0 511 DATABASE

4 (0:1537) 0 511 DATABASE

5 (0:2049) 0 511 DATABASE

6 (0:2561) 0 511 DATABASE

7 (0:3073) 0 511 DATABASE

8 (0:3585) 0 511 DATABASE

9 (0:4097) 265 246 DATABASE

10 (0:4609) 511 0 FREE

TOTAL FREE SPACE - 803

142 • Database Utilities MSM Utility Manual


GBMAINT - Global Maintenance
Use the GBMAINT utility to perform maintenance on one or more globals within
one or more volume groups. It includes options for repairing and displaying globals.
While a global is being repaired, no access by other users is permitted. Internally,
the global is marked in such a manner that any attempted access by other users
results in a <PROT> error. If the system fails while a global is being repaired,
recovery can be made with no loss of data or corruption of the database.
When the system is restarted, invoke the GBMAINT utility and restart the operation.
Until the operation that was in progress is completed, the global will be unavailable
to other users. The following sections describe the functions performed by the utility.

Invoking the GBMAINT Utility


>D ^GBMAINT

MSM - Global Maintenance Utility

Available Options:

1 - Compress Globals
2 - Repair Globals
3 - Display Global Efficiency
4 - Map Block Repair

Select Option: ?

Select option by specifying the option number or supplying


enough characters to uniquely identify the option.
Enter <RETURN> or '^' to exit the utility.

Select Option:

1RWH Although Option 1, Compress Globals, still appears on the GBMAINT menu,
it has been superseded by the OLC (online compression) utility. Refer to "OLC -
Online Compression" in this manual for additional information.

Repair Globals
&DXWLRQ Before using this option, note the following:
• This option does not always work; it does not fix every error.
• The more errors that exist in a global, the greater the likelihood that use of this
option will result in an M error or looping condition.
• The larger the global, the longer this option requires to repair the global. A large
global may require many hours.
For these reasons, we recommend that you use the manual repair option provided by
the DBFIX utility. For additional information, refer to "DBFIX - Database Repair
Utility" in this manual.

Use this option to repair a single global that contains an error in its physical
structure. Enter the volume group name, UCI name, and the global to be repaired.
Errors in pointer blocks, right links, down pointers, and so on are automatically
corrected by the utility. All errors except those in the actual data portion of a global
data block can usually be repaired. If errors exist in the data blocks, they must be
repaired using the DBFIX utility before they can be automatically repaired.

MSM Utility Manual Database Utilities • 143


Select Option: 2 - Repair Globals

Enter Volume Group to Repair: ?

Enter the name or number of the Volume Group that contains the globals
that are to be repaired.
Enter '^L' for a list of all mounted Volume Groups.
Enter <RETURN> or '^' to return to the previous question, or
Enter '^Q' to exit the utility.
Enter Volume Group to Repair: 0
Enter UCI to Repair: ?

Enter the name of the UCI that contains the globals that are to be
repaired, or
Enter '^L' for a list of all of the available UCIs, or
Enter <RETURN> or '^' to return to the previous question, or
Enter '^Q' to exit the utility.

Enter UCI to Repair: TST

Global selector: ^INVOICE

Global selector: ^RETURN

Enter output device <104>: RETURN


INVOICE Validating... Repairing... Done.

Display Global Efficiency


This option invokes the %GE utility to display the efficiency of one or more globals.
To determine the increase in efficiency, select this option before and after
compressing globals. Refer to “Global Utilities” in this manual for information on
the %GE utility.

Map Block Repair


This option is used to repair a corrupted map blocks. Enter the name of the volume
group to be repaired. The utility then searches the entire volume group and repairs
any corrupted map blocks that are found.
This option corrects every possible type of corruption in a map block. However, if a
map block is corrupted beyond recognition, the utility rebuilds it, but is not able to
determine ownership of all blocks within the map. In order to ensure that blocks are
not left unallocated, it allocates all blocks in the map to UCI number 1.
Select Option: 4 - Map Block Repair

Enter Volume Group to Repair: ?

Enter the number of the Volume Group that contains the global that
is to be repaired.
Enter '^L' for a list of all mounted Volume Groups.
Enter <RETURN> or '^' to return to the previous question, or
Enter '^Q' to exit the utility.

Enter Volume Group to Repair: 0

Enter output device <104>: RETURN

Searching for bad map blocks.

Map block repair complete.


54 map blocks processed, no errors found.

144 • Database Utilities MSM Utility Manual


Programmer Entry Point
The GBMAINT utility contains an entry point by which an application program can
invoke GBMAINT silently, specifying which globals are to be compressed or
repaired. Use the following syntax for this entry point:
D INT^GBMAINT(glname,flag)
In this example glname is a global name including the extended UCI reference and
flag is 0 to compress or 1 to repair. The default value is 0. A code is returned by this
utility in the %RET variable which indicates success or failure of the operation.
5(7 5HWXUQ &RGHV
%RET Meaning of Return Code
0 Operation successful
1 View buffer busy
2 Error encountered, %RET="2,"_$ZERROR
3 GBMAINT interrupted
4 Invalid Volume Group
5 Invalid UCI
7 Invalid global notation
8 For compress, cannot continue due to global corruption
9 Invalid flag (parm 2)
10 For repair, global has no errors, no action taken

Examples
S GLOBAL="[VAH,FSA]XUTL" Compresses ^XUTL in UCI VAH,FSA
D INT^GBMAINT(GLOBAL) Invokes utility
D INT^GBMAINT("[ABC]X",1) Repairs ^X in UCI ABC of Volume Group 0

MSM Utility Manual Database Utilities • 145


GLBPLACE - Global Placement
This utility is used to create a global at a specified location within a volume group.
When used in conjunction with the UCI expansion limits (see UCIMGR utility), the
exact physical bounds of a global can be controlled. This is useful in order to keep a
global in a particular area of the disk. Enter the name of the UCI where the global is
to be created, the name of the global, the collating sequence, and the starting map
number for the global. Since the Global Growth Pointer will be set to the map
number that is entered (see %GCH utility), all blocks allocated for the global are
allocated within, or after, the selected map. If more than one volume group is
mounted, enter the name of each volume group. If the global does not exist, an error
message is generated.

Sample terminal session


>D ^GLBPLACE

MSM - Global Placement Utility

UCI for global placement: ?

Enter the name of the UCI where the new Global is to be created.
Enter <RETURN> or '^' to exit the utility.

UCI for global placement: ZWN

Name of new global: ^TEST2


Collating Sequence <Numeric> ?

Enter the collating sequence for the global.


Valid collating sequences are Numeric and String.
Enter '^' to return to the previous question, or
Enter '^Q' to exit the utility.

Collating Sequence <Numeric> STRING

Select starting location for data block.

Enter Block number for data block <NEXT> ?

Enter relative block number on Volume Group 0 or Vol#:Block# for


the Volume Group where the block is to be allocated.
Enter NEXT to use the next available block.

Enter Block number for data block <NEXT> NEXT AVAILABLE.


Next free block is 54

Select starting location for pointer block.

Enter Block number for pointer block <NEXT> 54


Next free block is 55

Type <RETURN> to create global, anything else to abort RETURN

...one moment please.

Global TEST2GLB has been created

>

146 • Database Utilities MSM Utility Manual


OLC - Online Compression
This utility allows compression of individual globals or all globals in the system.
You also can choose to compress continually; when the compression finishes the last
global, it restarts at the beginning.
OLC is completely different from the GBMAINT global compression. OLC runs as
a low-priority job that determines the amount of activity on the system. If the system
is relatively quiet, OLC compresses a subtree in the current global, then checks
system activity again. Although OLC accomplishes little during peak operating
hours, it is busy when system usage is low.

Invoking the OLC Utility


>D ^OLC

MSM - Online Global Compression Utility


01-MAR-98 1:49 PM

1. Activate (Start) compression


2. Deactivate (Stop) compression
3. Display (Show) compression status
4. Resume interrupted compression
5. Print history log
6. Reset history log

Enter Option:

Activate (Start) Compression


Use this option to define a set of compression options and start a compression.
Multiple compressions may be defined to run simultaneously. Each compression
uses one partition while it is running.
To define a compression, enter the following information:
Volume Group(s) Individual volume group or "ALL." MSM does not prompt you
for an entry if only one volume group is mounted.
UCI(s) One or more UCIs in the selected volume group. MSM does not
prompt you for an entry if theVolume Group selected is "ALL."
Global(s) One or more globals to compress. MSM does not prompt you for
an entry if the Volume Group or UCI selected is "ALL."
Compression Factor 50-100% The higher the percentage, the more tightly packed are
the resulting global blocks. For example, a global compressed to
100% leaves as little free space as possible in every pointer and
data block. Although 100% is adequate for a static global, it is
guaranteed to cause immediate block splits in any global that will
change.
Continuous Y/N. If you enter YES, OLC automatically starts over at the first
global after the last subtree of the last global is compressed.

Deactivate (Stop) Compression


Use this option to stop a currently running compression. To restart the compression,
use the Resume option described in this chapter.

MSM Utility Manual Database Utilities • 147


Display (Show) Compression Status
This option lists all defined compressions. For each compression, it displays
whether the compression is currently running, the global currently being compressed,
and the number of blocks recovered to this point by the compression.
Enter Option: 3

Job# Start Day/Date/Time Elapsed Time %Cmp Blks Freed Continuous?


---- --------------------- ------------ ---- ---------- -----------
8 Thu 1-MAR-98 1:54 PM 0:00:53 80 0 Y: 0 Pass

Last Global Ref: |"MGR,SYS"|SYSGEN Options: [SYS] All UCIs


Status: Operator Aborted

Press <Return> to continue

Resume Interrupted Compression


Use this option to restart any compression that was stopped either by the Deactivate
option or by a system shutdown.
Enter Option: 4

1. Job# 8* Cont?:N Options: [SYS] All UCIs

OK to restart compression? <N>

Print History Log


This option prints a listing of compressions performed using the OLC utility. For
each compression, the log lists the start date/time and completion date/time, each
global compressed, the time required to compress each global, and the number of
disk blocks recovered by the compression.
Enter Option: 5

Enter job number <ALL>: RETURN

Enter output device <1>: RETURN

Thu 1-MAR-98 2:04 PM MSM-PC/PLUS Online Global Compression


==================================================================
J#8 Compression started Wed 21-FEB-98 11:59 AM
J#8 Starting compression for [MGR,SYS]%
J#8 Finished compression for [MGR,SYS]% Time:00:00:00 Blks:0
J#8 Starting compression for [MGR,SYS]%BLDM
J#8 Finished compression for [MGR,SYS]%BLDM Time:00:00:00 Blks:6
J#8 Starting compression for [MGR,SYS]%BLDT
J#8 Finished compression for [MGR,SYS]%BLDT Time:00:00:01 Blks:0
J#8 Starting compression for [MGR,SYS]%BLDW
J#8 Finished compression for [MGR,SYS]%BLDW Time:00:00:01 Blks:0
J#8 Starting compression for [MGR,SYS]%E
J#8 Finished compression for [MGR,SYS]%E Time:00:00:00 Blks:0
J#8 Starting compression for [MGR,SYS]%EGG
J#8 Finished compression for [MGR,SYS]%EGG Time:00:00:00 Blks:0
J#8 Starting compression for [MGR,SYS]%G
J#8 Finished compression for [MGR,SYS]%G Time:00:00:01 Blks:0
J#8 Starting compression for [MGR,SYS]%HELP
J#8 Finished compression for [MGR,SYS]%HELP Time:00:00:00 Blks:0
J#8 Starting compression for [MGR,SYS]%ONL

Press <Return> to continue

148 • Database Utilities MSM Utility Manual


Reset History Log
This option clears individual job entries or all entries from the history log. A
compression job that is running when this option is used may not be reset until the
compression completes or is stopped. Use this option periodically to keep the log
from becoming so large as to become impractical to print or view.

Internal Entry Point


The entry point INT^OLC allows a compression to be started programatically. The
entry point is an extrinsic function that uses the following syntax:
$$INT^OLC(VGN,UCI,GLB,CPFP,CONT)
where:
VGN Volume group name. Use * (the default) for all volume groups.
UCI UCI name. Use * (the default) for all UCIs in a selected volume
group.
GLB Enter one of the following values:
• A single global name
• An indirect reference to an array of global names
• The literal "^UTILITY($J)" if the array is built there
• * (for all globals)
CPFP Compression factor, 50-100%. The default is 95%.
CONT Continuous compression, Y/N. The default is N.
The following are the return values from the function call:
0 Background job started. Complete result is '0,job#'
1 Invalid volume group specification
2 Invalid UCI specification for specified volume group
3 Global list does not exist
9 Background job not started, no partitions available

Autostart Entry Point


The entry point AUTO^OLC allows all defined continuous compressions to be
automatically restarted. An example of its usage is calling the entry point from the
STUSER routine at system startup. No arguments are passed to this entry point.

MSM Utility Manual Database Utilities • 149


RECOVER - Recover Lost Blocks
Use this utility to recover blocks that are allocated within a UCI but do not belong to
any globals or routines in the UCI. The utility first scans the UCI and makes a map
of all blocks that are in the routine directory tree and the global directory tree. It then
scans all of the map blocks for entries that belong to the UCI. Any blocks marked
Allocated that do not exist in the routine directory tree or the global directory tree are
freed.

Sample terminal session


>D ^RECOVER

MSM - Recover Lost Blocks Utility

Select UCI To Recover: ?

Enter the UCI name which will be searched for lost blocks. RECOVER
first creates a list in global ^zzzzzzzz of all blocks pointed to
by this UCI. It then searches through every map in the system for
those blocks which are allocated to the UCI, but not in the list.
Each one found is automatically freed.

Note that if any global in the UCI contains structural errors, this
utility is likely to make them worse. The VALIDATE utility should
be run and all errors corrected before running RECOVER.

If the UCI is in a different volume group, enter UCI,VGP.


Enter '^L' for a list of UCIs
Enter '^' or '^Q' or <RETURN> to exit.

Select UCI To Recover: ^L

Choose from:

Volume group MDC, index 0


MGR MDC

Volume group DMY, index 1


HHL SYS APL

Select UCI To Recover: SYS,DMY

Enter output device <1>: RETURN


Ready to recover lost blocks? <N> YES

Processing routines: 100% done

Processing globals: 27 of 27

Searching for unlinked blocks.

Map# 147 (2:9217)

Freeing block 75242, 75243, 75244, 75245, 75246, 75247, 75248,


75249, 75250, 75251, 75252, 75253, 75254, 75255,
75256, 75257, 75258, 75259, 75260, 75261, 75262,
75263
Map# 150 (2:10753)

Freeing block 76288, 76290

24 unlinked blocks freed.

Done.

>

150 • Database Utilities MSM Utility Manual


VALIDATE - Database Validate
Use this utility to validate the integrity of an MSM volume group (all volumes of the
volume group). Within a specified UCI, it validates all routines, one or more globals,
or both routines and globals. Enter the name of the volume group and the UCI to be
validated, and if globals are being validated, specify which globals. If an error is
encountered, the utility displays the block number in error, the offset within the
block where the error occurred, and a description of the error.
9$/,'$7( (UURUV
Error # Description of Error
1 Unknown block type.
2 Unknown data type in block.
3 Block type mismatch with descendant block.
4 Block not marked Allocated in Map block.
5 Right link does not match down-link of pointer key
6 Block number mismatch
10 Non-zero common count for leading key in block
11 Zero length unique count in key
12 Common count greater than total length of previous key
13 Null global name in block
14 Global name changed within a block
15 Global name longer than eight characters
16 Missing 0x00 at end of global name
17 Invalid character in global name
20 Length of key does not agree with expected value
21 Leading key does not match expected value
30 Keys are not in ascending order
31 Key value is not higher than key in sub-tree
32 Unique part of key is not unique relative to previous key
33 Numeric subscript contains a non-numeric byte
34 Negative subscript not immediately followed by 'FF 00'
35 Subscript of value 0 (0x7F) not immediately followed by 0x00
36 Numeric subscript contains a leading zero
40 Offset to next free byte inconsistent with actual end of data
50 Cyclic loop in pointer block
51 Zero pointer to lower level
52 Cyclic loop in right-hand link of routine blocks
60 Index to first free block in Map is wrong
61 Count of free block in Map is wrong
64 Map block not allocated to System

If all UCIs on a Volume Group are selected for validation, VALIDATE checks the
map blocks on that Volume Group. If all Volume Groups are selected, all system
map blocks are checked. A map block can be checked independently of this utility
using the VERIFY utility.

MSM Utility Manual Database Utilities • 151


Use the DBFIX utility to repair any errors found by the VALIDATE utility. Before
repairing any blocks, familiarize youself with the block and volume group structure
of MSM. Refer to the MSM User's Guide for additional information on the structure
of the various types of disk blocks and the general layout of volume groups.

Sample terminal session


>D ^VALIDATE

MSM - Database Integrity Utility

Enter volume group to validate: <ALL> ?

Enter the volume group (0, 1, and so on) that is to be validated.


Enter <RETURN> or 'ALL' to validate all volume groups.
Enter '^L' for a list of all mounted volume groups.
Enter '^' or '^Q' to exit the utility.

Enter volume group to validate: <ALL> ^L

Currently mounted volume groups:

(0) SYS (1) TST (2) FMR

Enter volume group to validate: <ALL> 0

Enter UCI to validate: <ALL> ?

Enter the UCI that contains the routines or globals to be


validated.
Enter 'ALL' to validate all UCIs in the volume group.
Enter '^L' for a list of available UCIs.
Enter '^' to quit.
Enter UCI to validate: <ALL> ^L

Choose from:

MGR VAH BFH CCC DDD EEE FFF GGG HHH

Enter UCI to validate: <ALL> MGR

Enable TRACE <N> ?

Enter:

'Y' to turn on TRACE


<RETURN> or 'N' to leave TRACE disabled
'^' to return to UCI question
'^Q' to exit

Enable TRACE <N> N

Validating ^UTILITY ... no errors.

Select data type:

1 - GLOBALS
2 - ROUTINES
3 - BOTH
Select option: ?

Enter one or more characters or option number to identify whether


Globals, Routines or Both are to be validated.
Enter '^' to return to TRACE question or,
Enter '^Q' to exit the utility.

152 • Database Utilities MSM Utility Manual


Select option: 2 - ROUTINES

Enter output device <3>: 0

Validating Routines from [MGR,BFH]

All Routines Processed, no errors found.

>D ^VALIDATE

MSM - Database Integrity Utility


Enter volume group to validate: <ALL> 0

Enter UCI to validate: <ALL> MGR


Enable TRACE <N> Y

Validating ^UTILITY ... no errors.

Select data type:

1 - GLOBALS
2 - ROUTINES
3 - BOTH

Select option: GLOBALS

Global selector: ^BH

Global selector: ^

Enter output device <3>: 0

Validating Globals

1 Global Processed, no errors found.

The VALIDATE utility includes the label AUTO which checks the integrity of all
mounted volume groups without user interaction. Invoking AUTO^VALIDATE
checks all map blocks as when the VERIFY utility is run. Errors are returned in the
%ERR variable, the format of which is described below.
(55 )RUPDW
%ERR Meaning
0 No errors found.
1 Errors found and returned in %ERR() array.
2 Abnormal termination. Value of %ERR is returned via S %ERR="@,"_$2E.
3 Device 63 is not available.

The %ERR array of errors has the following format:


%ERR(n)= M VGindex errcode Map block errors
R UCI,VGN errcode Routine errors
G UCI,VGN ^globalname errcode Global errors
n is an integer starting with 1; errcode is the error code returned by the $ZVERIFY
function.
Refer to the MSM Language Reference Manual for a complete list of $ZVERIFY
error codes. To print the errors, an output device must be OPENed before calling
AUTO^VALIDATE and the device name must be set into the %DEV variable.

MSM Utility Manual Database Utilities • 153


VERIFY - Map Block Verification
Use this utility to verify that the free space count in each map block agrees with the
individual entries in the map block that indicate whether the block is free or in use.
The utility reads in each map block in a volume group (all volumes of the volume
group) and counts the number of free blocks. If the derived count agrees with the
stored count, then the system displays a “check successful” message. If not, the
system displays the volume number and block number, the offset, and a message
indicating that the count of free blocks is incorrect. Use the DBFIX utility to correct
any errors. If errors are not corrected, the system will still operate properly, although
performance may degrade.

Sample Terminal Session


>D ^VERIFY

MSM - Map Block Verification Utility

Select volume group <ALL>: ?

Enter the name or index of the volume group to be verified.


Enter <RETURN> to verify all volume groups.
Enter '^' or '^Q' to exit.
Enter 'L' to list all mounted volume groups.

Select volume group <ALL>: RETURN

Enter output device <5>: RETURN

Volume Group: 1

Volume: 3
Map 200 (Block 101889)
Free Space Counter: 1
Block 101889, Offset 0: Count of Free Blocks in Map is Wrong

232 Map Blocks Processed, 1 error found.

>

154 • Database Utilities MSM Utility Manual


Configuration Utilities

Overview
This chapter describes the Manager utilities that are used to define or modify the
system configuration.

DBMAINT - Database Maintenance


MSM supports a database structure that can include from one to sixteen separate
volume groups, each containing from one to eight volumes. Each volume group is
defined with a three-character external name. When a volume group is mounted by
the system, it is assigned a unique internal index number (a value from 0 through
15). The first volume group mounted on the system is 0, the second is 1, and so on.
Each volume group and each volume within a group must be initialized with the
distribution system or with this utility before it can be used with MSM.
Use this utility to create, expand, or display volumes within a volume group. When
you create a new volume, enter the name of the volume group to which it will
belong. Either specify an existing volume group or create a new one. You must
enter the file name or device address where the volume is to be created, and the size
of the volume. When you expand a volume, specify the mounted volume group,
index number of the volume, and amount of space to be added. For additional
information about volume groups and their structure, refer to the MSM User's Guide.

MSM Utility Manual Configuration Utilities • 155


Invoking the DBMAINT Utility
Use the DBMAINT utility to maintain volume groups within the MSM system. To
use the DBMAINT utility, you must be logged on to the Manager’s UCI in
programmer mode. Other users may be logged on to the system while this utility is
in use. When the utility is invoked, the following menu is displayed:
>D ^DBMAINT

MSM - DATABASE MAINTENANCE UTILITY

Select Database Maintenance Option

1 - Create a Database Volume


2 - Reinitialize a Mounted Volume
3 - Display Mounted Volume Groups
4 - Mount a Volume Group
5 - Unmount a Volume Group
6 - Expand a Database Volume
7 - Rename a Volume Group
8 - Mount a Remote Volume Group
9 - Edit Volume Group Characteristics
10 - Before-Image Journal Functions
11 - Online Backup Functions

Select Option: ?

Select option by specifying the option number or supplying


enough characters to uniquely identify the option.
To get HELP information specific to an option, enter a '?'
followed by the option's number.

Enter <RETURN> or '^' or '^Q' to exit with no action.

Select Option:

Create a Volume Group


This option formats a host file or device as volume 0 (the first volume) of a new
volume group. Enter the size of the volume. If the volume group will be
bullet-proofed, you can allocate and format the before-image journal file at this time.
Select Option: 1 - Create a database volume

Enter volume group name: ?

Enter the name or number of a currently mounted volume group or


enter a new volume group name.

Enter '^L' for a list of the mounted volume groups.


Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

Enter volume group name: LIB

Creating new volume group 'LIB'.

Enter volume label: ?

Enter the 1 to 8 character name that will appear in the label of


the volume.

Enter '^' to return to the previous question.


Enter '^Q' to exit the utility.

156 • Configuration Utilities MSM Utility Manual


Enter volume label: LIBVOL0

Enter host file name for database volume: ?

Specify the host file name of the database volume to create.


For example, C:\MUMPS\DATABASE.MSM A:\DATABASE2.MSM

Enter host file name for database volume: C:\MUMPS\LIBVOL0.MSM

Volume size (1-K blocks): ?

Specify size as a number of 1-K blocks or in megabytes using 'M'


after the number. For example, 350K, 5.5M, etc. The minimum size is
10, maximum is 167777216.

Volume size (1-K blocks): 1024

Enter Before-Image Journal file name: ?

If the volume group is to be bulletproofed, it must have a


Before-Image journal. This file may be allocated and formatted
now, or it may be added later. To initialize the journal file now,
enter the host file name of the journal file.
Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.

Enter Before-Image Journal file name:


Volume group name..........: LIB
Volume label...............: LIBVOL0
Host file database name....: C:\MUMPS\LIBVOL0.MSM
Volume number..............: 0
Volume size (blocks).......: 1024
OK to proceed <N>: Y

Database initialization in progress


100% done
Volume Group 'LIB' has been created on C:\MUMPS\LIBVOL0.MSM. The new
volume group must be mounted before it can be used.

Add a Volume to a Volume Group


This option formats a host file or device as an additional volume of an existing
volume group. The volume group must be mounted before this option is invoked.
When the beginning logical block number (within the volume group) is assigned for
the new volume, a limit is imposed on the ability to expand the previous volume.
Specify the size of this limit. If you expect that the volume which is currently the last
volume of the volume group will be expanded in the future, then specify the limit for
that volume here. After the new volume is created, it is not possible to increase the
limit on the previous volume.
After the new volume is created, the volume group must be unmounted and then
mounted again so that MSM will recognize and use the new volume.
Select Option: 1 - Create a database volume

Enter volume group name: ?

Enter the name or number of a currently mounted volume group or


enter a new volume group name.

Enter '^L' for a list of the mounted volume groups.


Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

MSM Utility Manual Configuration Utilities • 157


Enter volume group name: ^L

Currently mounted volume groups:

(0) SYS (1) LIB

Enter volume group name: LIB

Enter volume label: ?

Enter the 1 to 8 character name that will appear in the label of


the volume.

Enter '^' to return to the previous question.


Enter '^Q' to exit the utility.

Enter volume label: LIBVOL1

Enter host file name for database volume: ?

Specify the file name of the database on which this volume will be
created. For example, C:\MUMPS\DATABASE.MSM

Enter host file name for database volume: C:\MUMPS\LIBVOL1.MSM

Enter maximum size (in megabytes) for volume 0 <120>: ?

The last volume in a volume group can be expanded up to the


maximum size of a volume group (16384 megabytes). When a new volume
is created, the maximum size of the previous volume is permanently
set. If you want to allow for future expansion of volume 0, you
must specify the maximum size of that expansion at this time.

Enter the maximum size, in megabytes, for volume 0. The maximum


size cannot be less than 4, nor greater than 16384, and must be a
multiple of 4 MB (e.g., 4,20, 64, etc.).

Enter '^' to return to the previous question.


Enter '^Q' to exit this utility.

Enter maximum size (in megabytes) for volume 0 <120>: ?

Volume size (1-K blocks): ?

Specify size as a number of 1-K blocks or in megabytes using 'M'


after the number. For example, 350K, 5.5M, etc. The minimum size is
10, maximum is 16773120.

Volume size (1-K blocks): 1024

Volume group name..........: LIB


Volume label...............: LIBVOL1
Host file database name....: C:\MUMPS\LIBVOL1.MSM
Volume number..............: 1
Volume size (blocks).......: 1024

OK to proceed <N>: Y

Database initialization in progress.

Volume index number 1, labeled 'LIBVOL1' has been created on


C:\MUMPS\LIBVOL1.MSM. The new volume will not be mounted for use until
the volume group is dismounted and remounted.

158 • Configuration Utilities MSM Utility Manual


Reinitialize a Mounted Volume
This option completely reinitializes one volume of a mounted volume group. When
the volume is reinitialized, all data on the volume will be lost, although the size of
the volume will not change. If other volumes in the volume group contain pointers
to data on this volume or if this volume contains pointers to data on other volumes,
the integrity of the entire volume group will be lost.
Select Option: 2 - Reinitialize a mounted volume

Select volume group: ?

Enter the name or number of the volume group which contains the
volume to be re-initialized.

Enter '^L' for list of mounted volume groups.


Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

Select volume group: 0

Select volume number to be re-initialized: ?

Enter the volume number within the group to reinitialize.


Volumes 0 and 1 are currently mounted.

Enter '^' to return to the previous question.


Enter '^Q' to exit the utility.

Select volume number to be re-initialized: 1

Volume group name..........: SYS


Volume label...............: SYSVOL1
Host file database name....: C:\MUMPS\SYSVOL1.MSM
Volume number..............: 1
Volume size (blocks).......: 1088

Ok to reinitialize this volume? <NO>: YES

Warning: All data on this volume will be lost. If data on other volumes
points to this volume, files will be corrupted!

Are you sure? <NO>: YES

Re-initializing...done.

Volume Group: SYS Index: 0

Vol Maps Tot Blks Free Spc %-Free Host File Name
--- ---- -------- -------- ------ ---------------------
0 3 1346 75 5.57 C:\MUMPS\DATABASE.MSM
1 2 1088 1086 99.81 C:\MUMPS\SYSVOL1.MSM
======== ======== ======
2434 1161 47.70

MSM Utility Manual Configuration Utilities • 159


Display Mounted Volume Groups
This option displays the characteristics of all mounted volume groups. For Remote
Volume Groups, the bullet-proof status is not reflected in the display.
Select Option: 3 - Display mounted volume groups

Enter output device <1>: RETURN

Volume Group: SYS VG Index: 0


VG Type= (Local) VG State=(Mounted)
VG Flags= (P-code.Little.Endian)
VG Export Flags= (DB.Read Db.Write BLK.Read BLK.Write)
Max Data Length=255 DKRES reserved blocks=0

Vol Maps Tot Blks Host File Name


--- ---- -------- ---------------------
0 2 1024 C:\MUMPS\DATABASE.MSM
1 8 4096 C:\MUMPS\SYSVOL1.MSM
==== ========
10 5120

Volume Group: SYS Index: 0

Vol Maps Tot Blks Free Spc %-Free Host File Name
--- ---- -------- -------- ------ ---------------------
0 3 1346 75 5.57 C:\MUMPS\DATABASE.MSM
1 2 1024 1022 99.80 C:\MUMPS\SYSVOL1.MSM
======== ======== ======
2370 1097 46.29

Mount a Volume Group


This option mounts a volume group to make it available for use by MSM. Enter the
name of the host file or device that contains the first volume of the volume group.
Using information from the label of the first volume, MSM locates any additional
volumes that comprise the volume group. The entire volume group is then mounted,
and the UCIs defined on the volume group are made available.
If the volume group is bullet-proofed, the before-image journal file is checked. If the
volume group was not clearly unmounted during its last use, recovery procedures are
applied to ensure database integrity.
Select Option: 4 - Mount a volume group

Enter host file name for volume group: ?

Enter the full name of the host operating system file which
contains the first volume of the volume group to mount.

Enter '^' to return to the previous question.


Enter '^Q' to exit the utility.

Enter host file name for volume group: D:\MUMPS\DATABASE.MSM

You have selected volume group 'SYS' which is already mounted

To continue mount, enter an alternate volume group name: ?

Each mounted volume group must have a unique three-letter name.


Since the volume group you want to mount has the same name as one
which is already mounted, you must give it a surrogate name which
will be valid as long as it is mounted.

Enter '^L' to see a list of mounted volume groups.


Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

160 • Configuration Utilities MSM Utility Manual


Please enter an alternate volume group name? SYB

Mounting.

Override default access <N>: ?

Enter YES to be prompted for mount characteristics to use instead


of the defaults.

Enter NO to use the default mount characteristics.

Override default access <N>: RETURN

Mount done.

The AUTO entry point in the MOUNT utility allows application routines to mount
volume groups without user interaction. This entry point is invoked using
call-by-reference parameter passing.
D AUTO^MOUNT(.Vglist)
Vglist is the name of a local array that has the following format:
Vglist(Hfname)=Vgin^Laccess^Raccess
For each volume group to be mounted, the host file name of the first volume in the
group (volume 0) must be passed as a subscript (Hfname) in the Vglist array. The
data portion of the array has three parts. Vgin is the Volume Group Index in which
the volume group is to be mounted. If Vgin is equal to zero, then the utility mounts
the group in the first available slot.
Laccess determines the Read/Write characteristics of the volume group when
accessed locally, and determines whether its LAT services are to be enabled.
Laccess can be set to R (Read), W (Write), or RW (Read/Write). If Laccess is set to
the null string, then no local access is allowed (the volume group can only be
accessed from another system as a Remote Volume Group). The letter L appended
to the access flags indicates that the LAT services on the volume group are to be
broadcast by the local system.
Raccess determines the Read/Write characteristics of the volume group when
accessed from another system as a Remote Volume Group. Raccess can be set to R
(Read), W (Write), or RW (Read/Write). If Raccess is set to the null string, then no
remote access is allowed (the volume group can only be accessed from the mounting
system).
If neither Laccess nor Raccess is specified (the data portion the array node contains
only Vgin and no caret delimiters), then the default access for the volume group will
be used. The following example illustrates the proper use of this entry point:
S VGMOUNT("/disk2/sql0.msm")="1^RWL^"
S VGMOUNT("/disk3/payroll0.msm")="0^R^"
D AUTO^MOUNT(.VGMOUNT)
I QF=0 W !,"Databases mounted successfully"

The above code mounts volume groups whose first volumes are contained in files
/disk2/sql0.msm and /disk3/payroll0.msm, respectively. The first one is mounted as
Volume Group 1, with Read/Write privileges and LAT services enabled. The second
is mounted as the first available volume group slot, with Read-only access and no
LAT services. Note that QF is returned with a non-zero if any of the volume groups
fail to mount.

MSM Utility Manual Configuration Utilities • 161


Unmount a Volume Group
This option removes any UCIs on the mounted volume group from the UCI table and
then logically disconnects all volumes of the volume group from further access by
the MSM system.
Select Option: 5 - Unmount a volume group
Select volume group: ?

Enter the name or number of the volume group to be unmounted.


Enter '^L' for a list of mounted volume groups.
Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.
Select volume group: SYB

Dismounting...done.

The AUTO entry point in the UMOUNT utility allows application routines to
unmount Volume Groups without user interaction. This entry point is invoked using
call-by-value parameter passing.
D AUTO^UMOUNT(Vglist)
Vglist is a list of volume group names or indexes (separated by commas) to be
unmounted. If any volume group failed to unmount, the utility returns a QF variable
that has a non-zero value.
When this application entry point is used, the utility terminates all jobs that are active
in each volume group before it is unmounted.

Expand a Database Volume


This option adds free space to the end of an existing volume. The host file system or
device must have available space that MSM can use. If the volume to be expanded is
the last (or only) volume of the volume group, it may be expanded up to the
maximum volume group size. If it is not the last volume, it may be expanded only up
to the limit established when the following volume was completed.
Select Option: 6 - Expand a mounted volume
Select volume group to be expanded: ?

Enter the name or number of the volume group to be expanded.

Enter '^L' for list of mounted volume groups.


Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.
Select volume group to be expanded: 0
Select volume number to be expanded: ?

Enter the number of the volume within the group to be expanded.


Volumes 0 and 1 are currently mounted.

Enter '^' to return to the previous question


Enter '^Q' to exit the utility.
Select volume number to be expanded: 1
How many 1-K blocks do you wish to expand by: ?

Please specify the number of blocks to be added to the volume as


1-K blocks or as megabytes using 'M' after the number.

162 • Configuration Utilities MSM Utility Manual


Enter <RETURN> or '^' to back up to the last question.
Enter '^Q' to exit utility.
How many 1-K blocks do you wish to expand by: 64
Database will be expanded by 64 1-K blocks

OK to proceed <N>? ?

Please respond 'YES' to proceed with expansion or 'NO' to abort

OK to proceed <N>? Y

Current space in volume group:

Volume Group: SYS Index: 0

Vol Maps Tot Blks Free Spc %-Free Host File Name
--- ---- -------- -------- ------ ---------------------
0 3 1346 75 5.57 C:\MUMPS\DATABASE.MSM
1 2 1024 22 2.14 C:\MUMPS\SYSVOL1.MSM
======== ======== ======
2370 97 4.09

Expanding Database:
100% done

Database expansion completed

Expanded space in volume group:

Volume Group: SYS Index: 0

Vol Maps Tot Blks Free Spc %-Free Host File Name
--- ---- -------- -------- ------ ---------------------
0 3 1346 75 5.57 C:\MUMPS\DATABASE.MSM
1 2 1088 86 7.90 C:\MUMPS\SYSVOL1.MSM
======== ======== ======
2434 161 6.61

Rename a Volume Group


This option changes the name of a mounted volume group. The labels of all volumes
of the volume group will be updated with the new name.
Select Option: 7 - Rename a Volume Group

Select volume group to be renamed: ?

Enter the three-letter name or the index number of the mounted


volume group to be renamed.

Enter '^L' for a list of mounted volume groups.


Enter '^Q' or '^' to exit.

Select volume group to be renamed: ^L

Currently mounted volume groups:

(0) VAH (1) TST (2) JRS (3) DMS

Select volume group to be renamed: JRS

Enter new name of volume group: FBI

Are you sure? <N> Y

Done.

MSM Utility Manual Configuration Utilities • 163


Mount a Remote Volume Group
Use this option to mount a remote volume group and make it available for use by the
MSM system. A remote volume group is one which is mounted on another MSM
system that is connected to the local system by MSM-NET.
Enter the name of the remote system and the volume group name. You optionally
can override the database's default characteristics. After the availability of the
volume group is verified by communicating with the remote system, the volume
group is logically connected to the local system and the UCIs defined on the volume
group are added to the UCI table to make them available to local users.
Select Option: 8 - Mount a Remote Volume Group

Enter Remote System Name: ?

Enter the name of the remote system which owns the volume group to
be mounted. There must be an active DDP circuit to this system.

Enter ^L to list all active circuits.


Enter ^ to cancel the mount request.
Enter Remote System Name: PSA
Enter Volume Group Name to be Mounted: ?

Enter the name of the remote volume group that is to be mounted on


this system.
Enter ^ to return to the previous question.
Enter ^Q to cancel the mount request.
Enter Volume Group Name to be Mounted: DMH
Override default access <N>: ?

Enter YES to be prompted for mount characteristics to use instead


of the defaults.
Enter NO to use the default mount characteristics.

Override default access <N>: Y

Access Requested:

1 - RO - Read Only
2 - WO - Write Only
3 - RW - Read and Write

Select Option <RW>: 1 - RO - Read Only

Advertise LAT services <Y>: ?

Enter YES if any LAT services defined on the mounted volume group
should be advertised on this system.

Enter NO if LAT services on the volume group should not be


advertised.

Advertise LAT services <Y>: RETURN

Mounting...
Requested LAT access not allowed

164 • Configuration Utilities MSM Utility Manual


Edit Volume Group Characteristics
For a selected volume group, use this option to specify a set of features for the
volume group. Before you can specify characteristics, a UCI must be defined on the
volume group. After mounting a volume group, use this option to temporarily
change its current characteristics by modifying memory without changing the
permanent values on the database.
Volume group characteristics are stored in the ^SYS global of UCI number 1 on the
volume group. If this global subsequently is killed, the defined characteristics are
lost.
The volume group characteristics specify how local and remote systems use the
database, control LAT availability, set maximum data length, and determine the type
of p-code generated by the MSM compiler when routines are saved. Normally, only
the native p-code type for the local system is necessary, but if a remote system will
also mount the volume group and execute routines from it, then the appropriate
p-code type for that system must be generated.
If no characteristics are defined for a volume group, the local system has Read and
Write access, access by remote systems is not allowed, only local system p-code can
be generated, and the maximum global data length is 255.
Select Option: 9 - Edit Volume Group Characteristics
Select volume group: ?

Enter the name or number of the volume group whose characteristics


are to be edited.

Enter '^L' for a list of the mounted volume groups.


Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

Select volume group: AVV

Location to edit:
1 - DISK
2 - MEMORY
Select Option <DISK>: ?1

The information will be changed on disk only. The changes will not
take effect until the next time the volume group is mounted.
Select Option <DISK>: ?2

The volume group table in memory will be updated. The default


values on the disk will not be changed.
Select Option <DISK>: 1 - DISK

Default Local Access Allowed:

1 - RO - Read Only
2 - WO - Write Only
3 - RW - Read and Write
4 - NONE - No Access
Select Option <RW>: RW - Read and Write

Maximum Remote Access Allowed:

1 - RO - Read Only
2 - WO - Write Only
3 - RW - Read and Write
4 - NONE - Not Exportable
Select Option <RW>: RW - Read and Write

MSM Utility Manual Configuration Utilities • 165


Default Remote Access:

1 - RO - Read Only
2 - WO - Write Only
3 - RW - Read and Write
4 - NONE - Not Exportable

Select Option <RW>: 1 - RO - Read Only

LAT Services Availability:

1 - Local system only


2 - Remote systems only
3 - Both local and remote systems
4 - No LAT advertising

Select Option <Both>: ?1

LAT services will be advertised on the local system, but not on


remote systems that mount this volume group.

Select Option <Both>: ?2

LAT services will be advertised on remote systems that mount this


volume group, but not on the local system.

Select Option <Both>: ?3

LAT services will be advertised on the local system and also on


remote systems that mount this volume group.

Select Option <Both>: ?4

LAT services for this volume group will not be advertised anywhere.

Select Option <Both>: Both local and remote systems

Type of p-code to generate:

1 - Big Endian (native p-code for this system)


2 - Little Endian
3 - Both

Select Option <Both>: ?1

This type of p-code is generated by IBM mainframes, 680x0


machines, and most RISC systems.

Select Option <Both>: ?2

This type of p-code is generated by 286, 386, and 486 PC systems,


and by VAX systems.

Select Option <Both>: ?3

Choose this option if the volume group will be exported to a system


using a different p-code type than this system.

Select Option <Both>: 1 - Big Endian (native p-code for system)

Maximum Global Data Length <511>: ?

Enter the maximum length that will be allowed for global data
values in this volume group. The length may not exceed 511.

Maximum Global Data Length <511>: RETURN

166 • Configuration Utilities MSM Utility Manual


DKRES Reserved Blocks <0>: ?

Enter the number of blocks to be reserved at the end of each UCI's


expansion area. If an attempt is made to allocate a block in this
area, a <DKRES> error will occur. This area protects the database
from corruption that can happen if a <DKFUL> error occurs.

DKRES Reserved Blocks <0>: 100

System UCI <APP>: ?

Enter the UCI name or number where the ^SYS global will be
maintained. This global contains the characteristics and LAT
service definitions for this volume group.

Enter '^L' to list all defined UCIs


Enter '^' to return to the previous question

System UCI <APP>: ^L

Defined UCIs:
APP TST MGR

System UCI <APP>: MGR

Edit Done.

The following terminal session illustrates how to edit the volume group
characteristics in memory.
Select Option: 9 - Edit Volume Group Characteristics

Select volume group: AVV

Location to edit:

1 - DISK
2 - MEMORY

Select Option <DISK>: 2 - MEMORY

Local Access Allowed:

1 - RO - Read Only
2 - WO - Write Only
3 - RW - Read and Write
4 - NONE - No Access

Select Option <RW>: RW - Read and Write

Remote Access Allowed:

1 - RO - Read Only
2 - WO - Write Only
3 - RW - Read and Write
4 - NONE - Not Exportable

Select Option <RW>: RW

LAT Services Availability:

1 - Local system only


2 - Remote systems only
3 - Both local and remote systems
4 - No LAT advertising

Select Option <Local>: RETURN

MSM Utility Manual Configuration Utilities • 167


Type of p-code to generate:
1 - Big Endian (native p-code for this system)
2 - Little Endian
3 - Both

Select Option <Both>: Both

Maximum Global Data Length <511>: RETURN

DKRES Reserved Blocks <0>: RETURN

System UCI <APP>: MGR

System UCI <MGR>: RETURN


Expansion Threshold <0>: ?

During startup, if this field is non-zero, MSM will check the total
number of free blocks in the volume group. If the free space is
less than the expansion threshold, MSM will automatically expand
the volume group by the number of blocks specified by the next
prompt.
Enter the amount of free space, in 1-K blocks, below which an
automatic expansion of the volume group will occur. The amount can
be specified in megabytes (i.e., 5M = 5120 blocks).
This feature only operates for volume groups that are auto-mounted.
Enter '^" to return to the previous prompt.

Suspend Database Reads <NO>: ?

Enter YES to suspend any job that attempts to read from this volume
group.

Enter NO to allow reads from this volume group and to release any
jobs waiting because of a previous suspension.

Suspend Database Reads <NO>: NO

Suspend Database Writes <NO>: ?

Enter YES to suspend any job that attempts to write to this volume
group.

Enter NO to allow writes to this volume group and to release any


jobs waiting because of a previous suspension.

Edit Done.

Before-Image Journal Functions


This option invokes the BIJ utility, which you can use to manage before-image
journaling (bullet-proofing). For additional information, refer to “Resilient Systems”
in the MSM System Manager's Guide.

Online Backup Functions


This option invokes the OLB utility, which you can use to manage online backups.
For additional information, refer to “Resilient Systems” in the MSM System
Manager’s Guide.

168 • Configuration Utilities MSM Utility Manual


AUTOBACK^OLB
The OLB utility includes the application entry point AUTOBACK^OLB, which
allows a backup to be performed silently. It must be invoked via the DO command,
and it requires at least two parameters.

Syntax
DO AUTOBACK^OLB(VGN,BACKTYPE,VERBOSE)

Parameter Description
VGN A volume group name, or a volume group index, or the name of a
volume group set (a super-grouping of volume groups).
BACKTYPE One of the following values:
F Full backup
S Sequential backup
C Cumulative (sequential backup)
VERBOSE If non-zero, then messages will be displayed. Otherwise, the utility
operates silently. If this parameter is omitted, VERBOSE defaults to
silent mode.

Description
The utility returns the status variable QF when done. If QF=0, then the backup was
successful. Otherwise, it is equal to an error code which is defined in the text at the
end of the OLB utility (see label ERRSUBR).

Full Backup of a Volume Group


Use this option to perform a full backup of a specified volume group. The volume
group must be mounted before it can be backed up.
Select Option: 1 - Full backup of a volume group

Enter volume group: ?

Enter the name of the volume group on which to perform the


function, or

Enter the number of a mounted volume group.


Enter ^L to list all defined and mounted volume groups.
Enter ^ to return to the previous question.

Enter volume group: CCC


Ready to backup CCC? <N> Y

Spill file opened


Issuing host command: copy c:\M\database.ccc
c:\backups\database.ccc

Database file(s) backup was successful


Closing spill file...
Spill file closed

Issuing host command: ntbackup backup c:\backups\database.ccc


c:\backups\SPIL000.ccc

Spill file backup successful


Volume group backup complete

MSM Utility Manual Configuration Utilities • 169


STUIRQ - LPT Interrupt Override
By default, MSM-PC/PLUS performs parallel port I/O using interrupts.
Interrupt-driven I/O allows MSM to perform other work while I/O is in progress to
the device. If there are interrupt conflicts (an LPT port is using the same interrupt as
some other device) or if there is a hardware failure on the parallel card that disables
interrupt handling, then output proceeds slowly to the port because MSM is waiting
for an interrupt from the device. The best solution is to correct the interrupt conflict
or replace the parallel card. If this solution is not practical, use the STUIRQ utility
to disable interrupt handling for the device. Be aware that running
non-interrupt-driven output to the parallel port has an adverse effect on the
performance of other users in a multi-user system.
>D ^STUIRQ

MSM - LPT Interrupt Override

Device Name: ?

Enter the name of a parallel device (LPT1, LPT2, or LPT3) for which
interrupt driven I/O will be disabled/enabled.
Precede the name with a '-' to delete it, and therefore run
interrupt-driven.
Enter '^L' to display list of devices in the table.
Enter <RETURN> or '^' or '^Q' to exit the utility.

Device Name: ^L

Device List for Interrupt Override

Device Interrupt Mode


-------- --------------
LPT1 No

Device Name: LPT1

Run in interrupt mode <N>: ?

Enter 'Y' to indicate the device uses interrupts.


Enter 'N' to indicate the device does not use interrupts.

Due to IRQ conflicts, or hardware failure, some parallel ports run


very slowly when interrupt-driven. Disabling interrupt-driven I/O
for these devices corrects this problem; however, when printing to
an LPT port without interrupt handling, performance of other MSM
users will be adversely affected. All parallel ports which are not
in this table are interrupt-driven.
Enter <RETURN> to indicate no change.

Run in interrupt mode <N>: Y

Device List for Interrupt Override

Device Interrupt Mode


-------- --------------
LPT1 Yes

Device Name:

>

170 • Configuration Utilities MSM Utility Manual


SYSGEN - System Generation
Use the System Generation (SYSGEN) utility to define one or more configurations
to be used by MSM. A configuration is a collection of attributes (device types,
terminal port definitions, tied terminal indexes, and so on) that describes the
operating environment to MSM. Refer to the MSM User's Guide for a description of
the SYSGEN process.
>D ^SYSGEN

Select SYSGEN Option:

1 - Display Configuration Parameters


2 - Create New Configuration
3 - Edit Configuration Parameters
4 - Edit Configuration Name/Comment
5 - Delete Configuration
6 - Set Default Startup Configuration
7 - UCI Management
8 - PC Environment Configuration
9 - System Configuration Parameters
10 - Database Definition
12 - Device Translation Tables
13 - Device Handling
14 - Journaling Management

Select Option: ?

Select option by specifying the option number or supplying enough


characters to uniquely identify the option.
To get HELP information specific to an option, enter a '?' followed
by the option's number.
Enter '^L' to get a list of options.
Enter <RETURN> or '^' or '^Q' to exit with no action.

Select Option: 3 - Edit Configuration Parameters

Select Configuration <DFLT>: ?

Select a configuration to be edited (or created) by specifying its


full name. A configuration name may be any combination of letters
and/or numbers with a maximum length of 14 characters.
Enter '^L' to list the names of current configurations.

Select Configuration <DFLT>: ^L

Current Configuration: DFLT


Available Configurations:
ID: DFLT.............08/09/97: DEFAULT CONFIGURATION

Select Configuration <DFLT>: RETURN

MSM Utility Manual Configuration Utilities • 171


Select SYSGEN Option:

1 - SYSGEN (step through full SYSGEN)


2 - Backspace, Line Delete Character
3 - Autostarts and Automounts
4 - Maximum Partitions
5 - Programmer Access Code
6 - Modified Buffers Threshold
7 - VIEW Command Restriction
8 - Tied Terminal Table
9 - Port (Terminal) Definition
10 - Multi-serial I/O Card Definition
11 - External Calls
12 - Default Partition Size
13 - Translation/Replication Table Maintenance
15 - DDP and LAT Configuration
16 - Tape Device Definition
17 - Global Defaults
18 - LOCK Table Size
19 - Display Configuration Parameters
20 - Mode Flags

Select Option:

172 • Configuration Utilities MSM Utility Manual


TRANSLAT - Translate/Replicate
The Translation/Replication facility of MSM allows a fully expanded global name (a
name that contains the UCI and volume group prefix) to be translated into another
fully expanded global name. It also allows the actual global updates (SETs and
KILLs) to be duplicated in one or more UCIs on any volume group.
Use this utility to edit, display, and manage the Translation/Replication tables and to
enable/disable translation. For more information on the Translation/Replication
facility, refer to the MSM User's Guide.
When using wildcards to translate all globals with the same prefix, you can exclude
one or more globals from the wildcard selection. To do so, add a translation index
that translates the specific global to itself, and then add the entry that translates the
wildcard. As long as the single global appears first in the table, it is not affected by
the wildcard entry.

Invoking the TRANSLAT Utility


>D ^TRANSLAT

MSM - Translation Management Utility

Available Functions:

1 - Edit Translation Table


2 - Enable Translation
3 - Disable Translation
4 - Edit Replication Table
5 - Translation Table List
6 - Replication Table List

Select Option: ?

Select option by specifying the option number or supplying enough


characters to uniquely identify the option.
To get help information specific to an option, enter a '?'
followed by the option number.
Enter <RETURN> or '^' to exit with no action.
Enter '^L' to get a list of options.

Select Option:

Translation Table List


Use this option to display the current contents of the Translation table. Each entry in
the display describes the global or globals to be translated, the UCI and volume
group from which the global is to be translated, the UCI and volume group to which
the global is to be translated, the UCI and volume group that own the global for
purposes of the LOCK command, an index into the Replication table if replication is
to take place, the functions to be performed for the global (Translation, Replication,
or LOCK), and the collating sequence for the global (numeric or string).

MSM Utility Manual Configuration Utilities • 173


Select Option: 5 - Translation Table List

Enter output device <1>: RETURN

Current Translation Table:

Global Translate Lock Repl Functions Col


# Name(s) From UCI To UCI Master Ind Enabled Seq
- --------- ---------------- ------ ---- ----------- ---
1 MED* MGR,GRP TST,GRP TST,GRP 1 TRANSLATION NUM
REPLICATION
LOCK MASTER
2 PATIENT AAA,GRP BBB,GRP STR

Replication Table List


Use this option to list the current contents of the Replication table. Each entry in the
table is assigned a unique number (replication index), and specifies from one to
seven UCI and volume group pairs where replication is to take place. In order for
replication to occur, an entry in the Translation table must be created that specifies
the globals to be replicated, and an index in the Replication table must be created
that indicates where replication is to occur. When a SET or KILL operation occurs
for the specified global, the SET or KILL operation will be repeated in each
UCI/volume group pair specified by the replication index. If the specified volume
group is not mounted on the system, then it must be accessible through the DDP
network, or an error will occur.
Select Option: Replication Table List

Enter output device <1>: RETURN

Current Replication Table:

Ind UCIs to replicate global KILLs and SETs in


--- ------------------------------------------
1 AAA,GRP BBB,GRP DDD,GRP
3 AAA,ZZZ CCC,ZZZ

Edit Replication Table


Use this option to add, edit, and delete entries within the Replication table. When the
system displays the current replication table, enter the index to be edited. You can
edit or delete each UCI/volume group pair specified by the entry. After reviewing all
of the pairs, enter any new pairs. Use the SYSGEN utility to configure the size of the
Translation table (the maximum number of entries allowed).
Select Option: 4 - Edit Replication Table

Current Replication Table:

Ind UCIs to replicate global KILLs and SETs in


--- ------------------------------------------
1 AAA,GRP BBB,GRP DDD,GRP
3 AAA,ZZZ CCC,ZZZ

Enter replication table index: ?

Enter the index of the entry that you wish to edit


Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.
Enter '^L' for available list.
Enter '-' followed by the index to delete an entry.

Enter replication table index: -3 deleted...

174 • Configuration Utilities MSM Utility Manual


Enter replication table index: 1

Replication UCI #1 <AAA,GRP>: ?

Enter the UCI that you wish to replicate to. This UCI may be
specified by the UCI name or by the UCI and volume group name.
If no volume group name is specified, the current volume group is
assumed.
Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.
Enter '-' to delete this UCI.

Replication UCI #1 <AAA,GRP>: AAA,GRP

Replication UCI #2 <BBB,GRP>: BBB,GRP

Replication UCI #3 <DDD,GRP>: - deleted...

Replication UCI #3: CCC,GRP

Replication UCI #4:

Enter replication table index:

Edit Translation Table


Use this option to add, edit, and delete entries within the translation table. When the
system displays the current translation table, enter the index to edit or a new index to
add. For each index, MSM prompts for the name of the global or globals to
translate, the UCI and volume group from which to translate, the UCI and volume
group to translate to, the UCI and volume group that own the global for the LOCK
command, an index into the replication table if replication is to occur, the functions
that are to be performed on the global, and the collating sequence for the global
(numeric or string). The From UCI field represents the UCI in which the specified
global is referenced, and the To UCI field represents the UCI where the global
physically exists.
Select Option: 1 - Edit Translation Table

Current Translation Table:

Global Translate Lock Repl Functions Coll


# Name(s) From UCI To UCI Master Ind Enabled Seq
- --------- ---------------- ------ ---- ----------- ----
1 MED* MGR,GRP TST,GRP TST,GRP 1 TRANSLATION NUM
REPLICATION
LOCK MASTER
2 PATIENT AAA,GRP BBB,GRP STR

Translation is not enabled

Enter Translation Table Index: ?

Enter the index of the table entry that you wish to edit
Enter n.5 to insert an index between index n and n+1.
Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.
Enter '^L' for available list.
Enter '-' followed by the index to delete a table entry.

Enter Translation Table Index: -2 ...deleted

Enter Translation Table Index: 3

MSM Utility Manual Configuration Utilities • 175


Global name: ?

Enter name of the global to translate/replicate.


Follow this by a '*' to translate all globals which begin with the
specified string.

This utility supports translation of subscripts, and subscript


ranges.
For example, one can translate ^GL(1) to one UCI, and ^GL(2) to
another, while leaving all other ^GL(n) untranslated.
For ranges, enter two global references, separated by a hyphen.
For example: ^X(1)-^X(7) or ^XYZ(11)-^XYZ(1014) or ^X("A")-
^X("F~")
Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.

Global name: XYZ*

Collating sequence <NUMERIC>: ?

Enter 'N' to force numeric collating sequence for


translated/replicated UCI
Enter 'S" to force string collating sequence.
Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.

Collating sequence <NUMERIC>: NUMERIC

Global including [7=7-bit/8=8-bit] <8>:


UCI to translate from: MGR,GRP

UCI to translate to: ?

Enter the UCI to translate to.


UCI may be specified by the UCI name or by the UCI name and the
volume group name separated by a comma.
Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.

UCI to translate to: TST,GRP

UCI for maintenance of locks [TST,GRP]: TST,GRP

Replication table index: ?

Enter the index of the replication table item to be used to


replicate Globals.
Enter '^' to return to previous question.
Enter '^Q' to exit this utility.
Enter '^L' for available list.
Enter '-' followed by the index to delete a table entry.

Replication table index: 1

Enable translation <YES>: ?

Enter 'YES' if you wish for translation to occur.


Enter 'NO' otherwise.
Enter '^' to return to the previous question.
Enter '^Q' to exit this utility.

Enable translation <YES>: YES

Enable lock table translation <NO>: NO

Enable Replication <YES>: YES

Enter Translation Table Index: ^L

176 • Configuration Utilities MSM Utility Manual


Current Translation Table:

Global Translate Lock Repl Functions Coll


# Name(s) From UCI To UCI Master Ind Enabled Seq
- --------- ---------------- ------ ---- ----------- ----
1 MED* MGR,GRP TST,GRP TST,GRP 1 TRANSLATION NUM
REPLICATION
LOCK MASTER
3 XYZ* MGR,GRP TST,GRP 1 TRANSLATION NUM
REPLICATION

Translation is not enabled

Enter Translation Table Index:

Enable Translation
Translation is automatically enabled during system startup. If disabled, it can be
manually re-enabled using this option.
Select Option: 2 - Enable Translation

Enabling translation ...

Translation Enabled...

Disable Translation
Translation is automatically enabled during system startup. It can be disabled again
using this option.
Select Option: 3 - Disable Translation

Are you sure? <NO>: YES done

MSM Utility Manual Configuration Utilities • 177


UCIMGR - UCI Management
Use this utility to create, rename, edit, delete, and list the User Class Identifiers
(UCIs) and individual user logon identifiers. Each UCI has its own Global directory
and Routine Directory to allow data and routines to be segregated by user or user
groups. The following information is maintained for each UCI in the system:
UCI Index An internal number associated with the UCI. These
numbers are assigned sequentially as UCIs are created.
UCI Name The three-character name of the UCI. This is used when
logging on to the system, accessing Globals across UCIs,
and so on.
Global Directory The block number of the Global Directory. The block
number is of the form volume index:relative block.
Routine Directory The block number of the Routine Directory. The block
number is of the form volume index:relative block.
Routine Exp/Lim The expansion start and limit for Routine blocks.
Whenever a new routine block is needed, MSM begins
searching at the map number specified for expansion and
does not search beyond the map number specified for the
expansion limit. If no free blocks exist within the range, a
<DKFUL> error occurs. Each map covers a range of 512
blocks. Blocks 0-511 are in map #1, 512-1023 are in
map#2, and so on.
Data Exp/Lim The expansion start and limit for Global data blocks.
Whenever a new Global data block is needed, MSM
begins searching at the map number specified for
expansion and does not search beyond the map number
specified for the expansion limit. If no free blocks exist
within the range, a <DKFUL> error occurs.
Ptr Exp/Lim The expansion start and limit for Global pointer blocks.
Whenever a new Global pointer map is needed, MSM
begins searching at the map number specified for
expansion and does not search beyond the map number
specified for the expansion limit. If no free blocks exist
within the range, a <DKFUL> error occurs.
Jrnl Stat This flag indicates whether or not all Globals within the
UCI are to be Journaled by MSM.
Password This field is the defined password for the UCI. It is used
in place of the system-wide default Programmer Access
Code (PAC) defined by SYSGEN.
Library UCI This field indicates which UCI is to be searched for %
routines and % globals referenced by this UCI.
When renaming a UCI, only the three-character name can be changed. The list
option displays information about each UCI defined to MSM. When a UCI is
renamed, tied terminal entries and entries in the Auto Partition Startup table must be
re-entered if they refer to the renamed UCI.

178 • Configuration Utilities MSM Utility Manual


Invoking the UCIMGR Utility
>D ^UCIMGR

MSM - UCI Management Utility

Available Functions:

1 - Create New UCI


2 - Rename Existing UCI
3 - List UCI Status
4 - Edit UCI Parameters
5 - Delete Existing UCI
6 - User Logon Identifier Edit
7 - Edit UCI Routine Search Paths

Select Option: ?

Select option by specifying the option number or supplying enough


characters to uniquely identify the option.

To get HELP information specific to an option, enter a '?' followed


by the option's number,

Enter <RETURN> or '^' or '^Q' to exit with no action.


Enter '^L' to get a list of options.

Create New UCI


Available Functions

1 - Create New UCI


2 - Rename Existing UCI
3 - List UCI Status
4 - Edit UCI Parameters
5 - Delete Existing UCI
6 - User Logon Identifier Edit
7 - Edit UCI Routine Search Paths

Select Option: 1 - Create New UCI

Select volume group <0>: ?

Enter the name or number of the volume group where the UCI is to be
created.
Enter '^L' for a list of the mounted volume groups.
Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

Select volume group <0>: ^L

Currently mounted volume groups:

(0) SYS (1) LIB (2) SYB

Select volume group <0>: 0

Enter name of new UCI: ?

Enter the name of the new UCI to be created. The UCI must not
already be defined. The UCI name is composed of three uppercase
letters (e.g., USR).
Enter '^L' for status display of existing UCIs
Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

Enter name of new UCI: TST

MSM Utility Manual Configuration Utilities • 179


GLOBAL Directory Allocation

Enter map number for directory <1>: ?

Enter the map number in which the directory block is to be


allocated. The utility will use the first free block found in the
map. If the entire map is full, the utility will find the first
free block found after the specified map. A value of 1 will start
from the beginning of the volume group.
The map number may optionally be specified as 'vol:rmap,' where
'vol' is the volume index number and 'rmap' is the relative map
number on that volume.
You will have a chance to accept/reject the selected value prior to
actually creating the UCI.
Enter map number for directory <1>: 2:1
..Actual block selected: 65538
Enter map number for global data expansion area <2:1>: ?

The system allocates global data blocks as needed. You have the
option of specifying the starting point for searching for a free
block to allocate to this UCI. By manipulating the expansion area
and limits, you can restrict global data in this UCI to a specific
area within the volume group.
Enter the starting map number for searching for a free block.
The map number may optionally be specified as 'vol:rmap', where
'vol' is the volume index number and 'rmap' is the relative map
number on that volume. The default value is the map number which
contains the directory block, with a minimum default value of 11
for UCIs on the first volume group.

Enter map number for global data expansion area <2:1>: RETURN

Global Data Expansion Limit <NONE>: ?

You have the option of specifying a limit beyond which global data
expansion will not be allowed. If an attempt is made to expand
global data from this UCI beyond the map number specified, a
<DKFUL> error will occur. Enter the map number beyond which no
data from this UCI will be allowed.
The map number may optionally be specified as 'vol:rmap', where
'vol' is the volume index number and 'rmap' is the relative map
number on that volume.

Global Data Expansion Limit <NONE>: NONE

Enter map number for global pointer expansion area <2:1>: ?

Enter map number for global pointer expansion area <2:1>: RETURN

Global pointer expansion limit <NONE>: ?

Optionally, you can specify a limit beyond which global pointer


expansion will not be allowed. If an attempt is made to expand
global pointers from this UCI beyond the map number specified, a
<DKFUL> error will occur. Enter the map number beyond which no
global pointers from this UCI will be allowed.

The map number may optionally be specified as 'vol:rmap', where


'vol' is the volume index number and 'rmap' is the relative map
number on that volume.

Global pointer expansion limit <NONE>: RETURN

180 • Configuration Utilities MSM Utility Manual


ROUTINE Directory Allocation

Enter map number for directory <1>: ?

Enter the map number in which the directory block is to be


allocated. The utility will use the first free block found in the
map. If the entire map is full, the utility will find the first
free block found after the specified map. A value of 1 will start
from the beginning of the volume group.
The map number may optionally be specified as 'vol:rmap', where
'vol' is the volume index number and 'rmap' is the relative map
number on that volume.
Enter map number for directory <1>: 1:1
..Actual block selected: 32770
Enter map number for routine expansion area <1:1>:

Routine expansion limit <NONE>: 1:64

Journal entire UCI <NO>: ?

Enter 'YES' to indicate all globals in UCI will be journaled.


Enter 'NO' to allow only specific globals to be journaled.

Journal entire UCI <NO>: NO

Password <>: ?

If a password is entered, it will supersede the Configuration's


Programmer access code during login. In other words, if the PAC is
'XXX' and the password for UCI 'TST' is ZZZ, then ZZZ will be the
PAC for UCI 'TST'.
The password may be 1-3 characters in length and may contain any
character. To delete the password, enter a dash (-).

Password <>: RETURN

Library UCI <0>: ?

Enter 0 if the library UCI is the Manager's UCI on volume group 0,


or enter the index number of the UCI on this volume group which
will be the library for this UCI.
A library UCI is the UCI which contains % routines and globals.
Enter '^L' to get a list of the UCIs on this volume group.

Library UCI <0>: 0

Please Verify:

Volume Group...........................: SYS


UCI Name...............................: TST
Global Directory Block.................: 2:2
Global Data Expansion Area..........: 2:1
Global Data Expansion Limit.........: NONE
Global Pointer Expansion Area.......: 2:1
Global Pointer Expansion Limit......: NONE
Routine Directory Block................: 1:2
Routine Expansion Area..............: 1:1
Routine Expansion Limit.............: NONE
Journal entire UCI.....................: NO
Password...............................:
Library UCI............................: 0

OK to proceed with allocation <Y>: YES

Global directory created.


Routine directory created.
UCI TST created.

MSM Utility Manual Configuration Utilities • 181


Rename Existing UCI
Available Functions:

1 - Create New UCI


2 - Rename Existing UCI
3 - List UCI Status
4 - Edit UCI Parameters
5 - Delete Existing UCI
6 - User Logon Identifier Edit
7 - Edit UCI Routine Search Paths

Select Option: 2 - Rename Existing UCI

Select Volume Group <0>: RETURN

Enter old UCI name: TST

Enter new UCI name: RTM

Are you sure? <N> Y

Done.

List UCI Status


Available Functions:

1 - Create New UCI


2 - Rename Existing UCI
3 - List UCI Status
4 - Edit UCI Parameters
5 - Delete Existing UCI
6 - User Logon Identifier Edit
7 - Edit UCI Routine Search Paths

Select Option: 3 - List UCI Status

MSM - UCI Status 10/25/97 11:17 AM

Volume group index: 0


Volume group name: SYS

UCI UCI Global Routine Rtn Exp/ Data Exp/ Ptr exp/ Jrnl Stat
Ind Name Directory Directory Exp Lim Exp Lim Exp Lim Pword/Lib
--- ---- --------- --------- -------- --------- -------- ---------
1 MGR 0:2 0:3 1/512 1/512 1/512 YES//0

2 FMR 0:264 0:265 1/NONE 1/NONE 1/NONE NO/ZZZ/0

3 TST 2:2 1:2 65/128 129/NONE 129/NONE NO//0

Legend:
Directory Block 'v:b' means: Volume number 'v', Relative Block 'b'
Expansion pointers are expressed as map numbers.

Edit UCI Parameters


Available Functions:

1 - Create New UCI


2 - Rename Existing UCI
3 - List UCI Status
4 - Edit UCI Parameters
5 - Delete Existing UCI
6 - User Logon Identifier Edit
7 - Edit UCI Routine Search Paths

182 • Configuration Utilities MSM Utility Manual


Select Option: 4 - Edit UCI Parameters

Select volume group <0>: ^L

Currently mounted volume groups:

(0) SYS (1) LIB (2) SYB

Select volume group <0>: 0

Enter name of UCI: FMR

Enter map number for global data expansion area <3>: ?

The system allocates global data blocks as needed. You have the
option of specifying the starting point for searching for a free
block to allocate to this UCI. By manipulating the expansion area
and limits, you can restrict global data in this UCI to a specific
area within the volume group.
Enter the starting map number for searching for a free block.

The map number may optionally be specified as 'vol:rmap', where


'vol' is the volume index number and 'rmap' is the relative map
number on that volume.

The default value is the map number which contains the directory
block, with a minimum default value of 11 for UCIs on the first
volume group.

Enter map number for global pointer expansion area <0:3>: 513

Global data expansion limit <NONE>: ?

You have the option of specifying a limit beyond which global data
expansion will not be allowed. If an attempt is made to expand
global data from this UCI beyond the map number specified, a
<DKFUL> error will occur. Enter the map number beyond which no
data from this UCI will be allowed.
The map number may optionally be specified as 'vol:rmap', where
'vol' is the volume index number and 'rmap' is the relative map
number on that volume.

Enter map number for global data expansion area <3>: 513

Global pointer expansion limit <NONE>: ?

Optionally, you can specify a limit beyond which global pointer


expansion will not be allowed. If an attempt is made to expand
global pointers from this UCI beyond the map number specified, a
<DKFUL> error will occur. Enter the map number beyond which no
pointers from this UCI will be allowed.
The map number may optionally be specified as 'vol:rmap', where
'vol' is the volume index number and 'rmap' is the relative map
number on that volume.

Global pointer expansion limit <NONE>: 1024

Enter map number for routine expansion area <3>: ?

The system allocates routine data blocks as needed. You have the
option of specifying the starting point for searching for a free
block to allocate to this UCI. By manipulating the expansion area
and limits, you can restrict routine data in this UCI to a specific
area within the volume group.
Enter the starting map number for searching for a free block.

MSM Utility Manual Configuration Utilities • 183


The map number may optionally be specified as 'vol:rmap', where
'vol' is the volume index number and 'rmap' is the relative map
number on that volume.
The default value is the map number which contains the directory
block, with a minimum default value of 11 for UCIs on the first
volume group.

Enter map number for routine expansion area <3>: 513

Routine expansion limit <NONE>: ?


You have the option of specifying a limit beyond which routine
expansion will not be allowed. If an attempt is made to expand
routines from this UCI beyond the map number specified, a <DKFUL>
error will occur. Enter the map number beyond which no routines
from this UCI will be allowed.

The map number may optionally be specified as 'vol:rmap', where


'vol' is the volume index number and 'rmap' is the relative map
number on that volume.

Routine expansion limit <NONE>: 1024

Journal entire UCI <NO>: ?

Enter 'YES' to indicate all globals in UCI will be journaled.


Enter 'NO' to allow only specific globals to be journaled.

Journal entire UCI <NO>: NO

Password <>: ?

If a password is entered, it will supersede the Configuration's


Programmer access code during login. In other words, if the PAC is
'XXX' and the password for UCI 'TST' is ZZZ, then ZZZ will be the
PAC for UCI 'TST'.
The password may be 1-3 characters in length and may contain any
character. To delete the password, enter a dash (-).

Password <>: RETURN

Library UCI <0>: ?

Enter 0 if the library UCI is the Manager's UCI on volume group 0,


or enter the index number of the UCI on this volume group which
will be the library for this UCI. A library UCI is the UCI which
contains the percent (%) routines.
Enter '^L' to get a list of the UCIs on this volume group.

Library UCI <0>: 0

Delete Existing UCI


Available Functions:

1 - Create New UCI


2 - Rename Existing UCI
3 - List UCI Status
4 - Edit UCI Parameters
5 - Delete Existing UCI
6 - User Logon Identifier Edit
7 - Edit UCI Routine Search Paths

Select Option: 5 - Delete Existing UCI

184 • Configuration Utilities MSM Utility Manual


Enter Name of UCI: ?

Enter the three-character name of the UCI to be deleted.


Enter '^L' for a list of the UCIs on this volume group.
Enter '^Q' or '^' to exit the utility.

Enter Name of UCI: ^L

Volume group index: 0


Volume group name: SYS

UCI UCI Global Routine Rtn Exp/ Data Exp/ Ptr exp/ Jrnl Stat
# Nam Directory Directory Exp Lim Exp Lim Exp Lim Pword/Lib
--- --- --------- --------- -------- --------- -------- ---------
1 MGR 0:2 0:3 1/512 1/512 1/512 YES//0

2 FMR 0:264 0:265 1/NONE 1/NONE 1/NONE NO/ZZZ/0

3 TST 2:2 1:2 65/128 129/NONE 129/NONE NO//0

Enter Name of UCI: TST


OK to Delete UCI TST <N>: YES
UCI TST Deleted

User Logon Identifier Edit


Available Functions:

1 - Create New UCI


2 - Rename Existing UCI
3 - List UCI Status
4 - Edit UCI Parameters
5 - Delete Existing UCI
6 - User Logon Identifier Edit
7 - Edit UCI Routine Search Paths

Select Option: 6 - User Logon Identifier Edit

Current Logon Identifiers:

Identifier Routine UCI Partition Size Password


---------- ------- --- -------------- --------
FMR DI VAH 18K
COSTAR ID COS 14K DOCTOR

Enter Logon Identifier: ?

Enter a 1-12 character string which is to be used as the logon


identifier. This string can be entered in response to the UCI
prompt when logging on to MSM. For example, if the logon is 'FMR'
and no password has been defined, then the logon would be:

MSM-UNIX, Version 4.4 line #1 UCI: FMR

The system would automatically invoke the routine specified by


the FMR logon identifier.

To delete an existing logon identifier, enter the name of the


logon identifier preceded by a '-'.

Enter Logon Identifier: WP

MSM Utility Manual Configuration Utilities • 185


Enter Routine Name: ?

Enter the name of a routine and optional line label to be


automatically invoked when a user attempts to logon using the
logon identifier. This must be a valid routine/line reference.

The routine name must be 1 to 8 characters in length, the first


character must be a '%' or alpha character. Remaining characters,
if any, can be any alpha-numeric characters. It may be prefixed
with a caret (^) character.
The line must be 1 to 8 characters in length, the first character
must be alphabetic or the entire label must be numeric. The line
label must be separated from the routine name with a caret (^)
character.

Enter Routine Name: WORDP

Select UCI: ?

Enter the name and volume group of the UCI that contains the
routine to be invoked at logon. If the volume group is omitted,
volume group 0 will be used. The UCI name and volume group must be
three uppercase letters, and are separated by a comma.
Enter '^L' for a list of currently defined UCIs.

Select UCI: WPS

Enter Partition Size for DI <19>: ?

Enter the size of the partition that is required for the routine.
The size is specified in 1-K blocks. The minimum partition size
is 12K and the maximum is 256K.

Enter Partition Size for DI <19>: 16

Enter Password: ?

Enter the password that is to be associated with this identifier.


The password may be from 1 to 12 alphanumeric, punctuation, or
control characters. The password is optional when defining a logon
identifier. To delete an existing password, enter '-' as the
password.

Enter Password: WRITE

Current Logon Identifiers:

Identifier Routine UCI Partition Size Password


---------- -------- --- -------------- --------
FMR DI VAH 18K
COSTAR ID COS 14K DOCTOR
WP WORDP WPS 16K WRITE

Enter Logon Identifier:

>

186 • Configuration Utilities MSM Utility Manual


Edit UCI Routine Search Paths
Use this option to specify a search order for routines, analogous to the PATH usage
in DOS, Windows, or UNIX. This simplifies the task of routine maintenance and
management. For example, multiple application-specific library UCIs can all refer to
a common UCI for shared routines, rather than having those routines stored in each
of the individual libraries.
Paths are defined for each UCI in a volume group. Optionally, a UCI entry of * for a
volume group acts as a default path set for any UCI that is not defined explicitly.
The search paths become active when a user logs into the UCI via the %LOGON
utility.
At any prompt, enter either a UCI name or a UCI name and volume group. If the
entry is only a UCI name, MSM assumes that the UCI is in volume group 0.
Available Functions:

1 - Create New UCI


2 - Rename Existing UCI
3 - List UCI Status
4 - Edit UCI Parameters
5 - Delete Existing UCI
6 - User Logon Identifier Edit
7 - Edit UCI Routine Search Paths

Select Option: 7 - Edit UCI Routine Search Paths

Set path for which UCI,VOL: ?

Enter a UCI or UCI,VGN to set up paths for a specific UCI.


Enter * or *,VGN to specify default paths for all UCIs in a volume
group.
Enter - before an entry name to delete the entry.
Enter ^L to list defined entries.
Enter ^D to list all mounted UCIs.

Set path for which UCI,VOL: ^D

Volume Group: ZIP


MGR ABC

Volume Group: ASQ


MGR SQL

Set path for which UCI,VOL: ^L

Volume Group: ZIP

UCI Primary Alternate Primary Alternate


Name Percent Percent Non-percent Non-percent
---- ------- --------- ----------- -----------
ABC MGR,ZIP MGR,ASQ ABC,ZIP SQL,ASQ

Volume Group: ASQ

UCI Primary Alternate Primary Alternate


Name Percent Percent Non-percent Non-percent
---- ------- --------- ----------- -----------
MGR MGR,ASQ MGR,ZIP
SQL MGR,ZIP SQL,ASQ

Set path for which UCI,VOL: ABC,ZIP

MSM Utility Manual Configuration Utilities • 187


Enter primary UCI for % routines <MGR,ZIP>: ?

Enter the primary UCI,VGN to look in for a % routine.

Enter ^L for a list of available UCI/VGN pairs.


Enter - to clear the primary and alternate entries for % routines.

Enter primary UCI for % routines <MGR,ZIP>: ^L

Volume Group: ZIP


MGR ABC

Volume Group: ASQ


MGR SQL

Enter primary UCI for % routines <MGR,ZIP>: RETURN

Enter alternate UCI for % routines <MGR,ASQ>: ?

Enter a second UCI,VGN to look in for a % routine if a routine is


not found in the primary UCI,VGN.

Enter ^L for a list of available UCI/VGN pairs.


Enter - to clear this entry.

Enter alternate UCI for % routines <MGR,ASQ>: RETURN

Enter primary UCI for non-% routines <ABC,ZIP>: ?

Enter the primary UCI,VGN to look in for a non-% routine.

Enter ^L for a list of available UCI/VGN pairs.


Enter - to clear the primary and alternate entries for non-%
routines.

Enter primary UCI for non-% routines <ABC,ZIP>: RETURN

Enter alternate UCI for non-% routines <SQL,ASQ>: ?

Enter a second UCI,VGN to look in for a non-% routine if a routine


is not found in the primary UCI,VGN.

Enter ^L for a list of available UCI/VGN pairs.


Enter - to clear this entry.

Enter alternate UCI for non-% routines <SQL,ASQ>: RETURN

Set path for which UCI,VOL: -ABC,ZIP Okay to delete? N

Set path for which UCI,VOL: -ABC,ZIP Okay to delete? Y ...deleted

Set path for which UCI,VOL: ^L

Volume Group: ASQ

UCI Primary Alternate Primary Alternate


Name Percent Percent Non-percent Non-percent
---- ------- --------- ----------- -----------
MGR MGR,ASQ MGR,ZIP
SQL MGR,ZIP SQL,ASQ

Set path for which UCI,VOL:

188 • Configuration Utilities MSM Utility Manual


System Operation Utilities

Overview
This chapter describes the Manager’s utilities that are used to perform system
operations, including killing jobs, displaying system tables, mapping control blocks,
and so on.

BCS - Broadcast a Message


Use this utility to send a message to a single terminal, a group of terminals, or all
active terminals on the system. The system manager can use this utility to
communicate with users, to indicate the system is being shut down, and so on. Enter
the message to be sent and specify which terminals are to receive the message.

Sample terminal session


>D ^BCS

MSM - Terminal Broadcaster Utility


Broadcast Message: ?

Enter the text of the message that you wish to broadcast. It may be
up to 255 characters and must not include control characters.
Enter <RETURN> or '^' or '^Q' to exit this utility.
Broadcast Message: SYSTEM SHUTDOWN IN 5 MINUTES. PLEASE LOG OFF.
Broadcast to terminal(s)?: ?

Enter 'ALL' to broadcast the message to all active terminals. The


number of a single terminal device. The number must be in one of
the following ranges: 1, 3-19, 64-199, and 256 and up. You may
enter a list of terminal devices separated by commas, or a range of
terminal devices with the starting and ending devices separated by
a hyphen.
You may enter any combination of lists and ranges separated by
commas, or '^D' to get a list of all active jobs and their
principal devices.

Enter <RETURN> or '^' to return to the previous question, or '^Q'


to exit this utility.
Broadcast to terminal(s)?: ALL

Message was broadcast to terminals 1,7.


>

MSM Utility Manual System Operation Utilities • 189


Two program entry points, SEND and SENDVG,allow application routines to
broadcast messages without user interaction. Their use is illustrated below.
D SEND^BCS(Message,Ports) Send the text in Message to all active terminal
devices passed to the utility in the Ports
parameter. Ports can be a list of port numbers
separated by commas, or it can be the word
ALL, indicating all active terminals.
D SENDVG^BCS(Message,Vglist) Send the text in Message to all users who are
currently logged into a Volume Group
specified in Vglist. Vglist is a list of Volume
Group names or indexes separated by
commas.

190 • System Operation Utilities MSM Utility Manual


JOBEXAM - Job Examine
Use this utility to examine the status of a job that is currently executing. After you
select a job, MSM displays the current execution stack and prompts you to confirm
whether or not the contents of the job’s local symbol table are to be displayed. The
contents of the job’s local symbol table can be copied into your partition.

Sample terminal session


>D ^JOBEXAM

MSM - Job Display Utility


6-AUG-97 3:23 PM
Select Job #: ?

Select a job to be displayed by entering its Job number ($JOB)


To get a list of active jobs enter:
^L (the 'L' may also be specified as 'l')
To get a copy of the locals of a job into your locals, enter
jobnumber,V (the 'V' may also be specified as 'v')
To exit the utility, press 'RETURN' (or enter '^')

Select Job #: ^L

MSM - System Job Status


6-AUG-97 3:24 PM

Max Partitions: 9 Current in Use: 3

JOB UCI/VOL ROUTINE P-SIZE STATUS #-COMMANDS DEVICES


NUM NAME NAME CURR/MAX TOTAL/INCR OWNED
--- ------- -------- -------- ------- ------------ -------
1 * * * M S M * * *
3 MGR,ABC %SS 2.8/20.0 Running 5664/0 1pc
4 MGR,ABC SGMENU 1.0/20.0 TermI-3 485/3 3pc

p - Principal Device
c - Current Device

Total Buffers In System: 91, Modified#=0


Disk Cache Efficiency: 97.7%

Select Job #: 4

JOB UCI/VOL ROUTINE P-SIZE STATUS #-COMMANDS DEVICES


NUM NAME NAME CURR/MAX TOTAL/INCR OWNED
--- ------- -------- -------- ------- ------------ -------
4 MGR,ABC SGMENU 1.0/20.0 TermI-3 485/3 3pc

Execution Traceback Stack

0) *XECUTE* : D ^SYSGEN
1) PROMPT+1^SYSGEN : S SGID="MENU",SGHDR="Select SYSGEN Option:"
D ^SGMENU G:$D(QUIT) EXIT G:SGOPT="" EXIT
2) SELECT+1^SGMENU : W !!,"Select Option" W:$D(SGDEFLT) " <",SGDE
FLT,">" W ": " R SGOPT I SGOPT="",$D(SGDEFLT) S SGOPT=SGDEFLT W
SGOPT

Last global reference: ^SYSGEN("MENU",12)

MSM Utility Manual System Operation Utilities • 191


Display locals for job <N>: ?

Enter Y if you wish to see the locals for the selected job
Enter N if you do not wish to see the locals
Display locals for job <N>: Y

Enter output device <0>: RETURN

SG=-1
SGHDR="Select SYSGEN Option:"
SGID="MENU"
SGSKIP=",UNIX,"
SGSYSID="UNIX"
X=""
Select Job #:

>

192 • System Operation Utilities MSM Utility Manual


KILLJOB - Terminate a Job
Use this utility to terminate a job that is executing and free all of the devices owned
by the job. The result is the same as if the job had issued a HALT command. Enter
the job number of the job to terminate. When the job terminates, MSM displays a
message indicating that the job has terminated.

Sample terminal session


>D ^KILLJOB

MSM - Job Termination/Device Release


24-FEB-98 9:33 AM

Select termination mode:

1 - Send a <KLJOB> error to the job


2 - Terminate the job, log error
3 - Terminate the job, do not log error

Enter termination mode <2>: ?

Enter 1 to cause the job to encounter a <KLJOB> error. The job is


allowed to process the error according to its own error trap.
Enter 2 to cause the job to encounter a <KLJOB> error, and proceed
as if the $ZTRAP for the job at its curent execution level is set
to "INT^%ET". In this case the stack is preserved, and the local
variables are logged and can be examined via the %ER Utility. The
job will terminate after the error is logged.
Enter 3 to terminate the job immediately without logging any error.

Select termination mode:

1 - Send a <KLJOB> error to the job


2 - Terminate the job, log error
3 - Terminate the job, do not log error

Enter termination mode <2>: RETURN

Job number to be HALTed?

The program entry points KILL, KILLALL, and KILLBUT0 allow application
routines to terminate jobs without user interaction. They are described below.
D KILL^KILLJOB(Job,Nowait) Terminates job number Job. If the Nowait
parameter is non-zero, then KILLJOB does not
wait for the job to terminate, but simply issues
the terminate message and quits. The Nowait
defaults to 0 if not passed.
D KILLALL^KILLJOB(Vglist,Nowait) Terminates all active jobs in all Volume
Groups indicated by Vglist (a list of VG names
or indexes separated by commas). If Vglist is
an asterisk (*), then all users are terminated
except the user that is calling KILLJOB. The
Nowait parameter is handled the same as for
the KILL entry point.
D KILLBUT0^KILLJOB(Nowait) Terminates all active jobs in all Volume
Groups except VG0. The Nowait parameter is
handled the same as for the KILL entry point.

MSM Utility Manual System Operation Utilities • 193


LOCKTAB - Display Lock Table
Use this utility to display the contents of the system Lock table. The Lock table
contains the current LOCK and ZALLOCATE commands that are active in the
system. The utility displays the job number and system name of the job that owns
the lock, the mode of the lock (LOCK or ZALLOCATE), and the variable reference.
If the variable name is a global, then the lock only affects jobs within the same UCI.
If the lock is a local reference or begins with a percent sign (%) then the lock is
system-wide and affects all jobs.

Sample terminal session


>L (A,B,^CUS(1013,0))

>D ^LOCKTAB

MSM - Lock Table Display

Jobid Sys Mode Variable


----- --- ---- --------

5 SYS LOCK ^[MGR,SYS]CUS(1013,0)


5 SYS LOCK B
5 SYS LOCK A

Current Lock Table Size: 21


Maximum Lock Table Size: 512

>ZA %LOCK,%SYS

>D ^LOCKTAB

MSM - Lock Table Display

Jobid Sys Mode Variable


----- --- ---- --------

5 SYS ZA %SYS
5 SYS ZA %LOCK
5 SYS LOCK ^[MGR,SYS]CUS(1013,0)
5 SYS LOCK B
5 SYS LOCK A

Current Lock Table Size: 32


Maximum Lock Table Size: 512

>ZD %LOCK

>D ^LOCKTAB

MSM - Lock Table Display

Jobid Sys Mode Variable


----- --- ---- --------

5 SYS ZA %SYS
5 SYS LOCK ^[MGR,SYS]CUS(1013,0)
5 SYS LOCK B
5 SYS LOCK A

Current Lock Table Size: 26


Maximum Lock Table Size: 512

>

194 • System Operation Utilities MSM Utility Manual


MAPBP - Map Buffer Pool Pointers
Use this to show the status of all buffers in the buffer cache. It is primarily intended
as a diagnostic tool to be used under the direction of Micronetics Technical Support.
For each buffer in the cache, the following information is displayed.

ADDR The address of the buffer control block associated with the
buffer. The control block is displayed by this utility.
IOWAIT The queue of jobs waiting for disk I/O to complete for this
buffer.
BUSYWAIT The queue of jobs waiting for this buffer to become free.
BUFFADDR The address of the buffer associated with this control block.
BLOCK# The block number of the disk block currently contained in the
buffer.
STAT The status of the buffer associated with this control block. The
following hexadecimal status codes are valid:
0001 The I/O operation in progress is a write.
0002 The I/O completed without error.
0004 The I/O completed with an error.
0008 Buffer is being used for update.
0010 Buffer is being used in shared mode.
0040 Other job(s) are waiting for buffer.
0080 Re-queue buffer to top of queue.
0100 Perform asynchronous write.
0200 Buffer is modified.
0400 Buffer is on data queue.
0800 Buffer is on free queue.
1000 Buffer is on I/O queue.
USE# The number of users that are currently using the buffer in
shared mode.
BTYP The type of block that is currently in the buffer. The following
block types are defined:
1 - Global Directory
2 - Global Pointer
3 - Global Data
5 - Routine Directory
6 - Routine Header
7 - Routine Data
8 - Map block
9 - Journal
10 - Sequential Block Processor
11 - Spool Directory
12 - Spool Data
When this utility is invoked, a header line is displayed and then the %SDEV routine
is called to select the output device. The default output device is the current device.

MSM Utility Manual System Operation Utilities • 195


Sample terminal session
>D ^MAPBP

MSM - Display Buffer Pointer Entries

Enter output device <5>: RETURN

MSM - Disk Buffer Display Utility


11:42 AM 16-JUL-97

ADDR IOWAIT BUSYWAIT BUFFADDR BLOCK# STAT USE# BTYP


-------- --------- --------- -------- -------- ---- ---- --
304608 0:0 0:0 305382 46A C02 0 07
304636 0:0 0:0 305782 45B C02 0 07
304664 0:0 0:0 305B82 52A C02 0 07
304692 0:0 0:0 305F82 22 C02 0 06
3046C0 0:0 0:0 306382 463 C02 0 06
3046EE 0:0 0:0 306782 469 C02 0 07
.
.
.
30526E 0:0 0:0 316782 1043 C02 0 01
30529C 0:0 0:0 316B82 26 412 1 06
3052CA 0:0 0:0 316F82 45D C02 0 07
3052F8 0:0 0:0 317382 527 C02 0 06
305326 0:0 0:0 317782 7C C02 0 07
305354 0:0 0:0 317B82 7B C02 0 07

Number Of Buffers = 75

>

196 • System Operation Utilities MSM Utility Manual


MAPDDB - Map Device Descriptor
Use this utility to show the status of one or more Device Descriptor Blocks (DDBs).
It is primarily intended as a diagnostic tool to be used under the direction of
Micronetics Technical Support. You can select all DDBs, Routine Interlock DDBs,
Host File Server DDBs, Terminal DDBs, Sequential Block Processor DDBs, Interjob
Communication DDBs, or the VIEW device DDB. For the various types of DDBs,
the following fields are displayed.
ADDR The address of the DDB itself.
$I The device number for the DDB.
$J The job number of the job that owns the device.
$X The value of the $X special variable for the device.
$Y The value of the $Y special variable for the device.
BUFR The address of the buffer associated with the DDB.
WID For terminal devices, this is the right margin.
S1 Status byte 1 for the device. The meaning is device-specific.
S2 Status byte 2 for the device. The meaning is device-specific.
$ZA The value of the $ZA special variable for the device.
$ZC The value of the $ZC special variable for the device.
TYPE Indicates whether the block is an SBP or JOURNAL block.
VOL# Indicates the volume group that contains the block.
BLOCK# The block number of the disk block currently in the buffer.
OFFSET The current offset into the SBP block.
OFF/BLOCK The current byte offset or block number into the HFS.
SIZE The size of the VIEW buffer.
DELIMS The current read delimiters.
After you select the type of DDB, specify the level of detail to be displayed. A
summary report displays selected fields, and a full report displays every field in the
DDB. Enter the output device. The %SDEV utility is called to perform the device
selection. The default device is the current device.

Invoking the MAPDDB Utility


>D ^MAPDDB

MSM - Display Device Descriptor Blocks

DDB Type for Display

1 - ALL
2 - BASIC
3 - HFS
4 - TIO
5 - SBP
6 - IJC
7 - VIO
8 - TCPIO
9 - TAPE
10 - NULL
11 - HSPL

MSM Utility Manual System Operation Utilities • 197


Select Option <ALL>: ?

Select option by specifying the option number or supplying enough


characters to uniquely identify the option.
For HELP about an option, enter '?' followed by option number,
Enter <RETURN> or '^' or '^Q' to exit with no action.
Enter '^L' to get a list of options.

Select Option <ALL>: ALL

Display Modes

1 - SUMMARY
2 - FULL

Select Option <1>: ?1

Select Option <1>: ?

Select option by specifying the option number or supplying enough


characters to uniquely identify the option,
To get help information specific to an option, enter a '?' followed
by the option's number,
Enter <RETURN> or '^' to exit with no action,
Enter '^L' to get a list of options

Display Modes

1 - SUMMARY
2 - FULL

Select Option <1>: ?2

Detail format of every field in DDB

Display Modes

1 - SUMMARY
2 - FULL

Select Option <1>: 1 - SUMMARY

Ports to display <ALL>: ?

Specify a specific port number ($I) to display, or ALL ports with a


matching DDB type.
You may select a range of ports by using a hyphen (e.g., 4-16).
You may select a list of ports by using a comma (e.g., 4, 6, 9).
You may select a combination of lists and ranges (e.g., 3, 12-16, 64).

Ports to display <ALL>: ALL

Enter output device <5>:

198 • System Operation Utilities MSM Utility Manual


Terminal DDBs
Terminal I/O Control Block

ADDR $I $J BUFR WID $X $Y S1 S2 OJ IJ


----- -- --- ------ --- --- --- -------- -------- -- --
101A58 1 Sys 101D28 80 0 145 00080004 00000000 0 0
101AB2 3 0 101F28 132 0 0 00000000 0000209D 0 0
101B0C 4 Sys 102128 0 0 224 00000004 00000040 0 0
101B66 5 4 102328 0 27 24 00000000 00000000 0 0
101BC0 6 Sys 102528 0 0 0 00000000 00000000 0 0
101C1A 7 Sys 102728 0 0 0 00000000 00000000 0 0
101C74 8 Sys 102928 0 0 0 00000000 00000000 0 0
101CCE 9 Sys 102B28 0 0 0 00000000 00000000 0 0

Host File Server DDBs


Host File Server Control Block

ADDR $I $J $X $Y S1 S2 $ZA $ZC OFF/BLK DELIMS


----- -- --- --- --- ---- ---- ------ ------ ------- ------
67B6A 51 0 0 80 0 200 0 0 10250A
67B90 52 0 0 0 0 0 0 0 0
67BB6 53 0 0 0 0 0 0 0 0
67BDC 54 0 0 5 0 4200 1 0 00A

Sequential Block Processor DDBs


Sequential Block Processor Control Block

ADDR $I $J $X $Y $ZC TYPE VOL# BLOCK# OFFSET DELIMS


----- -- --- --- --- ------ ---- ---- ------ ------ ------
67C52 59 0 0 0 0 0 0 0
67C02 60 0 0 0 0 0 0 0
67C2A 61 0 0 0 0 0 0 0
67C7A 62 0 0 0 0 0 0 0

VIEW DDB
View Buffer Descriptor

ADDR $I $J BUFR BLOCK# SIZE


----- -- --- -------- ------ ----
67CA2 63 0 0006F0AA 1025 1

>

Magnetic Tape DDBs


Magnetic Tape I/O Control Block

ADDR $I $J BUFR OFFSET $ZA $ZB DELIMS


-------- -- --- -------- ------ -------- --- ------
46C143F2 47 0 00000000 0 00000000 0
46C1444C 48 0 00000000 0 00000000 0
46C144A6 49 0 00000000 0 00000000 0
46C14500 50 0 00000000 0 00000000 0

>

MSM Utility Manual System Operation Utilities • 199


MPATCH - Memory Patch
This utility allows the system manager to patch memory within the MSM system.
An internal entry point (INT^MPATCH) can be used to patch memory within the
VIEW buffer. Upon entry, device 63 must be owned.
1RWH Use this utility to make temporary patches to the MSM load module only if
Micronetics sends a change notice asking you to do so.

Sample terminal session


>D ^MPATCH

MSM - Memory Patch Utility

Address: ?

Enter the address in hexadecimal where patching is to begin, or the


address in decimal preceded by a '+', or
'^' or '^Q' to exit the utility.

Address: 30000C

30000C Verify : ?

Enter the contents, in hexadecimal, of the memory to be patched.


The contents must match exactly for the patch to proceed. The
length of the data can be up to 3 bytes (6 hex digits).
Enter ^ to return to the previous question, or ^Q to exit the
utility.

30000C Verify : 11 ..verify failed.


Actual value is 0014003000000000

30000C Verify : 0014 Replace: ?

Enter the data, in hexadecimal, to be stored in the location, or


\&'^' or '^Q' to exit the utility.

Replace: 213B

30000E Verify :

>

200 • System Operation Utilities MSM Utility Manual


PEEK - Monitor Terminal Session
Use this utility to display the terminal session of another active terminal device as it
takes place. Enter the number of the device to be monitored. Do not use this utility
to monitor a device that is running at a baud rate greater than the baud rate of the
current device. If you do, not all data from the device being monitored will be
displayed.

Sample terminal session


>D ^PEEK

MSM - Terminal Monitor Utility

Device Number: ?

Enter the device number of the device to be monitored. The device


number must be a terminal type device (1, 3-19, 64-199), or
Enter <RETURN>, '^', or '^Q' to exit the utility.

Device Number: 4

Ready to start monitoring device 4? <Y>: ?

Enter <RETURN> or 'Y' to begin monitoring the device, or


'N' to select a different device, or
Enter '^' to return to the previous question, or
Enter '^Q' if you wish to exit this routine.

Ready to start monitoring device 4? <Y>: Y

Monitoring begun for device 4.

Enter CTRL/C to terminate monitoring.

Note: All information sent to or received from device 4 would be


displayed at this point.

CTRL/C

Monitoring Terminated

Device Number:

>

MSM Utility Manual System Operation Utilities • 201


RECOVLCK - Recover Locks
Use this utility to remove active LOCK entries for a specified job from the system
Lock table. Select the job whose LOCKs are to be removed from the system Lock
table. Because of the potential database synchronization problems that may occur if
the specified job is active, be careful when using this utility.

Sample terminal session


>D ^RECOVLCK

MSM - Lock Recover Utility

Job number to recover: ?

Enter the job number of the job whose locks should be recovered. If
the lock was issued by a remote system, enter the job number,
followed by a comma, followed by the remote system name (e.g.,
4,SYS).
Enter '^L' to display the contents of the LOCK Table.

Job number to recover: ^L

MSM - Lock Table Display

Jobid Sys Mode Count Variable


----- --- ---- ----- --------

3 ABC LOCK 1 Z
4 ABC ZA SYSTEM
4 ABC LOCK 1 ^[MGR,ABC]ABC(1,B)

Current Lock Table Size: 21


Maximum Lock Table Size: 2048

Job number to recover: 4

2 locks released for job 4

>D ^LOCKTAB

MSM - Lock Table Display

Current Lock Table Size: 21

Jobid Sys Mode Count Variable


----- --- ---- ----- --------
3 ABC LOCK 1 Z

Current Lock Table Size: 2


Maximum Lock Table Size: 2048

>

202 • System Operation Utilities MSM Utility Manual


SETBAUD - Terminal Baud Rate
Use this utility to modify terminal characteristics such as number of data bits,
number of stop bits, parity, and baud rate of a terminal while the system is running.
This utility does not alter the permanent description specified through SYSGEN for
the device; it patches memory for the specified device. Enter the device number and
the device’s new characteristics.

Sample terminal session


>D ^SETBAUD

MSM - Port Baud Rate Change Utility


24-FEB-98 12:49 PM
Select port number: ?
Enter the MSM port number you wish to modify. The port must have a baud
rate defined for it in SYSGEN to be changeable.
Enter '^L' for a list of defined ports
Enter '^Q' to Quit
Select port number: ^L
Terminal Configuration:

Port Port Port Tied Line Initial Initial


Number Type Addr Index Width Parms Status
------ ---- ----- ----- ----- --------- ---------
1 PC/DOS CON 80 Console /Echo/CRT
3 PC/DOS LPT1 80 Parallel /OutDev
4 PC/DOS COM1 80 9600,8B+1S /Echo/CRT
5 PC/DOS QUAD12 80 9600,8B+1S /Echo
Select port number: 9
Select Initialization Option:
1 - 7 Data Bits, No Parity, and 1 Stop Bit
2 - 7 Data Bits, Even Parity, and 1 Stop Bit
3 - 7 Data Bits, Odd Parity, and 1 Stop Bit
4 - 7 Data Bits, No Parity, 2 Stop Bits
5 - 7 Data Bits, Even Parity, and 2 Stop Bits
6 - 7 Data Bits, Odd Parity, 2 Stop Bits
7 - 8 Data Bits, No Parity, and 1 Stop Bit
8 - 8 Data Bits, Even Parity, and 1 Stop Bit
9 - 8 Data Bits, Odd Parity, and 1 Stop Bit
10 - 8 Data Bits, No Parity, 2 Stop Bits
11 - 8 Data Bits, Even Parity, and 2 Stop Bits
12 - 8 Data Bits, Odd Parity, 2 Stop Bits
Select Option <7>: 7 - 8 Data Bits, No Parity, and 1 Stop Bit

Select Baud Rate:


1 - 50
2 - 75
3 - 110
4 - 134.5
5 - 150
6 - 200
7 - 300
8 - 600
9 - 1200
10 - 1800
11 - 2400
12 - 4800
13 - 9600
14 - 19200
Select Option <13>: 9 - 1200
Port 9 re-initialized

MSM Utility Manual System Operation Utilities • 203


SSD - System Shutdown
Use this utility to shut down MSM in an orderly fashion. When shutdown is
invoked, user logons are immediately disabled, and MSM sets a status flag that
indicates a system shutdown is in progress. Application programs can test this flag
and log off if desired. The following code sets $TEST to 1 if this flag is on:
I $ZB($V(4,-4,2),#8000,1)
The SSD utility determines whether any jobs other than itself are running. DDP
servers and some MSM processes are ignored when the utility checks for active jobs.
If other jobs are detected, you can choose to wait a specified amount of time for the
other jobs to halt. If there are active jobs after this wait time, you can force a
shutdown.
After you confirm that the system is to be shut down, SSD terminates all network
operations, turns off Spooling and Journaling, and flushes the buffer pool before the
system is returned to the host operating system or is halted in a standalone
environment. The internal entry point AUTO performs an orderly shutdown without
prompting for user responses.

Sample terminal session


>D ^SSD

MSM - System Shutdown

Other users are on the system.

MSM - System Job Status


7-AUG-97 4:25 PM

Max Partitions: 9 Current in Use: 4

JOB UCI/VOL ROUTINE P-SIZE STATUS #-COMMANDS DEVICES


NUM NAME NAME CURR/MAX TOTAL/INCR OWNED
--- ------- -------- -------- ------- ------------ -------
1 * * * M S M * * *
2 MGR,ABC DDPSRV 1.1/20.0 DDP 1922/182
4 MGR,ABC %SS 4.8/20.0 Running 2784/0 1pc
5 MGR,ABC X 0.1/20.0 Hang 214/14

p - Principal Device

c - Current Device
Total Buffers In System: 91, Modified#=0
Disk Cache Efficiency: 98.7%

How long (in seconds) to wait for users to logoff <60>? ?

Enter the maximum amount of time in seconds to wait for all other
users to log off. Shutdown can be forced if users fail to log off
during this time.
Enter ^ to abort the shutdown.

204 • System Operation Utilities MSM Utility Manual


How long (in seconds) to wait for users to log off <60>? 5

Waiting 5 seconds for users to log off

1 other user still on system.

MSM - System Job Status


7-AUG-97 4:26 PM

Max Partitions: 9 Current in Use: 4

JOB UCI/VOL ROUTINE P-SIZE STATUS #-COMMANDS DEVICES


NUM NAME NAME CURR/MAX TOTAL/INCR OWNED
--- ------- -------- -------- ------- ------------ -------
1 * * * M S M * * *
2 MGR,ABC DDPSRV 1.1/20.0 DDP 1922/182
4 MGR,ABC %SS 4.8/20.0 Running 3680/703 1pc
5 MGR,ABC X 0.1/20.0 Hang 258/58
p - Principal Device
c - Current Device

Total Buffers In System: 91, Modified#=0


Disk Cache Efficiency: 98.7%

Do you want to force a shutdown? ?

If you answer YES, a forced shutdown will be performed, and all


users will be logged off within a few seconds.
Answer NO to exit this routine without shutting down MSM.

Do you want to force a shutdown? Y

DDP Shutting down ...


DDP #3: DDP server halting
MDC ... Circuit Disabled
DDP Shutdown ... Link 1 is now disabled
DDP Shutdown Complete.

System going down immediately

Exit

MSM Utility Manual System Operation Utilities • 205


STU - System Startup
Use this utility to initialize the MSM system. It is invoked whenever the system is
started to configure memory, initialize the database, setup terminal devices, set up
the tied terminal table, and so on. At the end of startup, the user routine STUSER is
automatically invoked if it exists in the Manager’s UCI. Refer to the MSM User’s
Guide for additional information on system startup, system configurations, and the
SYSGEN process.

Sample terminal session


MSM-PC/PLUS, Version 4.4.0
Copyright (C) 1984-1998, Micronetics Design Corporation

License...: Serial# 9802171, 128 Users


Supplier..: MDC
End-User..: A.B. User
Options...: NET(1024), LAT(32)

Enter startup configuration <DFLT> ?


Enter the name of a configuration to be used to initialize MSM-
PC/PLUS,
Enter '^' to remain in baseline system (skip initialization).
You may then add/edit/delete configurations via: D ^SYSGEN and then
re-boot, or initialize the system via: D ^STU.
Enter '^L' to list available configurations.

Enter startup configuration <DFLT> DFLT

MSM-PC/PLUS, Version 4.4.0 is being initialized

No Link defined in this Configuration.


MSM-PC/PLUS, Version 4.4.0 Line #1 UCI:

206 • System Operation Utilities MSM Utility Manual


SWREG - Software Switch Register
Use this utility to set or reset software switches in the MSM system. These switches
are used to restrict various functions (such as user logons, database read operations)
and to show status (such as journaling active, STU routine has run). The following
table describes the switches.

Switch Description
Journaling suspended Indicates that journaling is suspended because the space is full.
When journaling is switched to a new space, this flag is reset.
Disable user logins Prevents any new users from logging on to the system. If a user
attempts to log on, the system displays a message indicating that
logons are not allowed and then terminates the logon.
Console jobs only Allows the system manager to log on to the system even if
logons are disabled. If a user other than the console device
attempts to use the JOB command, the request is denied.
Disable database WRITEs Disables all writes to all mounted volume groups except the
VIEW command. If a user attempts to write to the database, the
user’s job will be suspended until database writes are enabled.
Database reads are not restricted. Since this option updates a
series of flags for each volume group, no offset is given.
Disable database READs Disables all reads from the MSM database except for the VIEW
command. If a user attempts to do a READ/WRITE operation,
the job will be suspended until database reads are enabled.
Because this option updates a series of flags for each volume
group, no offset is given.
Initiate system shutdown Indicates that system shutdown has been initiated by the SSD
routine. This flag can be interrogated by background jobs
periodically to know when to shut down. To test for system
shutdown activity, use the following code:
I $ZB($V(4,-4,2),#8000,1)
STU has run Indicates that the system startup routine (STU) has run and the
configuration has been set.
Enable system-wide Activates journaling for all globals on the system.
journaling
Post special queue Indicates that the dispatcher needs to post all jobs suspended by
one of the flags in this field. If the resource for which the job is
waiting is not available, then the job continues to wait.
Emergency system Initiates an emergency shutdown of MSM. All users on the
shutdown system will be logged off, followed by an immediate shutdown
of MSM.
Restrict VIEW Prevents the VIEW command from being used except by the
command use Manager's UCI or % routines.

When this utility is invoked, it displays the value of each switch. Enter the switch to
toggle. If you enter a null response, the utility terminates.

MSM Utility Manual System Operation Utilities • 207


Sample terminal session
>D ^SWREG

MSM Switch Register Utility

Current switch settings are:

SWITCH DESCRIPTION STATUS


------ ---------------------------- ------
2 Journaling Suspended OFF
6 Disable User Login OFF
11 Console-only Jobs OFF
13 Disable Database Write OFF
14 Disable Database Read OFF
15 Initiate System Shutdown OFF
16 ^STU has run ON
17 Enable Journaling OFF
19 Post Special Queue OFF
20 Emergency System Shutdown OFF
23 Restrict VIEW command use OFF

ENTER SWIuH TO TOGGLE > ?

Enter either the switch number, or one or more characters of the


switch you want to turn on/off. The switch will immediately be set
opposite from its current value.
Enter <RETURN>, or '^', or '^Q' to exit this utility.

Note: If database Writes or Reads (switch 13 or 14) are toggled, the


Special Queue will automatically be posted. Thus, all jobs which are
hanging due to suspension of reads or writes will be freed.

ENTER SWITCH TO TOGGLE > 6 Disable User Login TURNED ON

Two program entry points in this utility allow application routines to control these
switches without user interaction. Use of the entry points ON and OFF is illustrated
below:
D ON^SWREG(Switch) Turns on the switch number designated by Switch.
D OFF^SWREG(Switch) Turns off the switch number designated by Switch.

208 • System Operation Utilities MSM Utility Manual


Performance Monitoring

Overview
This chapter describes the performance monitoring utilities that are provided within
MSM.

RTHIST - Routine Histogram


Use this utility to monitor application program activity (both system and user) and to
report on the application program’s impact on system resources. Reports produced
by the utility include histograms (profiles) of M routine and global usage, system
resource measurements, terminal response times, and so on. Application developers
can use the reports to pinpoint bottlenecks in the application, while system
administrators can use the reports to fine-tune system performance and throughput.
Conceptually, the RTHIST monitoring process can be divided into the following
steps:
Scheduling Determine when and how long the system is to be monitored.
Each scheduled period of system monitoring is called a
monitoring run. At a user-specified reporting interval within
each monitoring run, system counters are saved for later
report generation. When RTHIST is invoked, a background
task is initiated that waits until the designated time before it
continues.
System Monitoring When the monitoring run starts, the system allocates an
internal table for statistical counters to record all routine and
global activity. During the monitoring phase, all routine
usage, global accesses, and other activity are recorded in the
table of statistical counters. At the end of each reporting
interval, the system counters are saved in the ^RTHIST
global. In MSM-PC/PLUS, the current CPU and disk
utilization rates are saved at the end of each user-specified
sampling interval.
Print Reports After the monitoring run is complete, reports can be printed
from any or all reporting intervals that were saved during the
run. Reports can be reprinted as often as desired, and deleted
when the information is no longer needed.

MSM Utility Manual Performance Monitoring • 209


Invoking the RTHIST Utility
Because the RTHIST utility is primarily intended for use by the system manager, it is
available in the Manager’s UCI (MGR). All performance analysis functions are
initiated through the RTHIST routine. The RTHIST utility supports the following
functions:
Begin Histogram Initiates data collection of statistical information. This
Monitoring Run is used to schedule when the monitoring run begins and
how long it lasts, the reporting interval, the sampling
interval for CPU utilization (MSM-PC/PLUS), and the
size of the internal table of statistical counters.
Report Histogram Reports Generates histogram reports and summaries of the data
contained in the table of statistical counters collected
during a monitoring run.
Delete Histogram Reports Deletes individual, groups, or all monitoring runs and
associated reporting intervals from the RTHIST
database.
Terminate Histogram Terminates the current monitoring run immediately or
Monitoring Run at the end of the current reporting interval and
optionally saves the accumulated data.
To following terminal session illustrates how to invoke the RTHIST utility.
>D ^RTHIST

MSM - Usage Histogram Utility


10-JAN-98 11:12 AM

Histogram Data Collection Not Enabled

Available Options:

1 - Begin Histogram Monitoring Run


2 - Print Histogram Reports
3 - Delete Histogram Reports
4 - Terminate Histogram Monitoring Run

Select Option: ?

Select option by specifying the option number or supplying


enough characters to uniquely identify the option.
Enter <RETURN> or '^' to exit with no action.

Select Option:

210 • Performance Monitoring MSM Utility Manual


Begin Histogram Monitoring Run
Use this option to schedule a histogram monitoring run. Enter the time and date
when the run is to begin, length of the monitoring interval, reporting period within
the monitoring interval, sampling interval for CPU utilization (MSM-PC/PLUS
only), size of the Routine and Global Statistics table to create for recording routine
and global access statistics, and description of the run. The minimum size that can
be specified for the routine and global statistics table is 10 entries, and the maximum
size that can be specified is 32,000 entries.
Within the routine and global statistics table, entries are used to keep track of either
routine accesses (for example: a routine invoked by a DO, GOTO, Extrinsic
function, etc.) or global accesses (for example: SET, $DATA, $ORDER, etc.).
Specify a table size that is sufficient to accommodate the application being
monitored.
Each time a routine or global is accessed, the system searches the table to determine
if an entry already exists for the particular routine or global. If not, then an unused
entry is selected from the table and the routine or global access is recorded (counted)
in the entry. Each entry in the table requires 20 bytes of memory to record the
necessary information.
After all entries in the table are used, references to routines and globals whose names
have not already been assigned entries are accumulated in a single overflow counter
that appears in the reports as the ~Table Full~ entry. When the table is full,
references to routine and globals that were already assigned entries in the table will
continue to accumulate properly.
If the reports generated by RTHIST show a large number of accesses in the
~Table Full~ entry, then the size of the routine and global statistics table is too small.
In this case, use Option 4 of the RTHIST utility to terminate the Histogram
Monitoring Run and then restart it with a more appropriate routine and global
statistics table size.
To begin a histogram monitoring run, select Option 1 from the RTHISTmain menu.
The following sample terminal session illustrates this process.
Select Option: 1 - Begin Histogram Monitoring Run

Time to start monitoring run <Now>: ?

Enter the time of day at which the monitoring run will begin.
The time can be entered in any of the following formats:

8:30 PM, 1500 (3 PM military time), 11:00 AM


Enter '^' to return to the previous question
Enter '^Q' to exit this utility

Time to start monitoring run <Now>: RETURN

Date to start monitoring run <Today>: ?RETURN

Enter the date on which the monitoring run will begin.


The date can be entered in any of the following formats:

MM/DD/YY, DD-MON-YY, T+1 (Tomorrow)

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

MSM Utility Manual Performance Monitoring • 211


Date to start monitoring run <Today>: RETURN

Duration of monitoring run <4H>: ?RETURN

Enter the duration of the monitoring run in minutes or hours.


To specify time in minutes, enter nnnM (e.g., 30M, 60M, etc.)
To specify time in hours, enter nn.nnH (e.g., 1H, 2.5H, etc.)

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Duration of monitoring run <4H>: RETURN

Reporting interval <1H>: ?RETURN

A separate report can be printed for each report interval within a


monitoring run. Specify the duration of the report\ interval in
minutes or hours.
To specify time in minutes, enter nnnM (e.g., 30M, 60M, etc.)
To specify time in hours, enter nn.nnH (e.g., 1H, 2.5H, etc.)

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Reporting interval <1H>: RETURN

Reporting interval for CPU And Disk Utilization <10M>: ?RETURN

This value is used to indicate the frequency to record CPU and Disk
Utilization statistics within a report interval.The minimum value
is 5 seconds and the maximum value is the duration of the report
interval. For example, if one minute is specified, then the CPU
and Disk Utilization reports will display values at one-minute
intervals.
To specify time in seconds, enter nnnS (e.g., 5S, 30S, etc.)
To specify time in minutes, enter nnnM (e.g., 30M, 60M, etc.)
To specify time in hours, enter nn.nnH (e.g., 1H, 2.5H, etc.)

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Reporting interval for CPU And Disk Utilization <10M>: RETURN

Number of entries in RTHIST table <200>: ?RETURN

Space needs to be allocated for a table to store RTHIST counters.


Specify the number of entries to be contained within the table.
One entry is required for each unique routine and global name for
which counters are to be maintained. Each time a new routine is
executed or a new global is accessed, a table entry is dedicated to
that routine or global name. Once all entries are used up, new
routines and globals that are accessed will be grouped together in
a single overflow counter labeled ~Table Full~. The minimum table
size that can be specified is 10 entries, and the maximum table
size that can be specified is 32,000.

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Number of entries in RTHIST table <200>: RETURN

Report Description: ?RETURN

Enter a description for this monitoring run. It will appear as


entered on reports that are printed.

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

212 • Performance Monitoring MSM Utility Manual


Report Description: Sample Run Of RTHIST RETURN

Ready To Start Monitoring Run? <Y>: ?RETURN

Enter 'Y' to start the monitoring run at the specified time.


Enter 'N' to cancel the run.

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Ready To Start Monitoring Run? <Y>: RETURN

System monitor started

MSM Utility Manual Performance Monitoring • 213


Print Histogram Reports
Use this option to report on the data that was collected during the monitoring run.
Reports can be printed for all reporting intervals within a monitoring run or for
individual reporting intervals within a monitoring run. You also can use this option
to print reports for completed monitoring runs or to print reports for completed
reporting intervals with the current (active) monitoring run.
Although the reports produced by RTHIST only contain names of actual routines and
globals that were accessed during a monitoring run, two special cases may exist
within a series of reports. First, entries may appear that contain #PgmrMd# in a field
where the routine name normally is displayed. This entry is used to accumulate
commands that were entered in direct mode (in programmer mode directly from the
terminal).
The second case occurs when the internal table of statistical counters is not large
enough to record all of the routine and global accesses (it overflows). In this case,
all of the associated routine and global accesses are recorded using an entry labeled
~Table Full~. In all other cases, the actual routine and global names will be
reported.
For convenience, the various RTHIST reports are divided into groups. When the
reports are printed, you can select a single report group, several report groups, or all
report groups. This allows you to look at key areas of performance such as routine
and global activity without having to print other RTHIST reports that may not be of
interest.
When appropriate, the reports are sorted by UCI and Volume Group, and further
sorted by routine name and global name. Output from the reports may be routed to
any output device supported by the system (printer, terminal, host spooling, and so
on). When output is routed to the principal device, the report pauses every 24 lines
to prevent the report from scrolling off the screen. At each pause, the system
prompts you to verify that the report is to continue printing.
As with any performance measurement tool, the data that is produced must be
carefully reviewed and analyzed in order to draw meaningful conclusions.
The following sections show samples of the reports that are produced by the
RTHIST utility. A detailed explanation of each item on the report is provided.
Select Option: 2 - Print Histogram Reports

Available Histogram Monitoring Runs

Run Start Start Report CPU


# Date Time Duration Freq Sample Description
--- -------- ----- -------- ------ ------ -----------

1 02/23/97 7:30 60 min 10 min 1 min Sample RTHIST Run


2 02/24/97 9:00 4.0 hrs 2 hrs 10 min Lab Application
3 02/25/97 18:00 30 min 5 min 3 min All Applications
4 02/26/97 8:45 30 min 5 min 3 min Peak Activity
5 02/27/97 12:00 20 min 2 min 2 min Lunch Time Load
6 02/28/97 9:00 9.0 hrs 1 hrs 15 min Prime Shift Load
7 03/01/97 12:00 24.0 hrs 1 hrs 30 min Full Day Activity

214 • Performance Monitoring MSM Utility Manual


Select Histogram Run: ?

Enter the report number of the histogram monitoring run to be


printed.

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Select Histogram Run: 1

Available Reports

Interval Start Start End


Number Date Time Time
-------- ------------ ----- -----
1 May 12 1997 07:30 08:00
2 May 12 1997 08:00 08:30
3 May 12 1997 08:30 09:00
4 May 12 1997 09:00 09:30
5 May 12 1997 09:30 10:00
6 May 12 1997 10:00 10:30

Select interval to print <All>: ?

Enter the number of the reporting interval to print. A range of


intervals can be selected by using a hyphen between the starting
interval and the ending interval. For example, enter 1-3 to print
reports for the first three intervals. You may specify 'all' to
select all reporting intervals.

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Select interval to print <All>: RETURN

System Performance Monitoring Report Options:

1 - Routine and Global statistics


2 - System statistics
3 - Terminal response reports
4 - CPU and Disk Utilization
5 - All reports

Select reports to be printed <5>: ?

Enter the number of the report group to print. More than one report
group can be selected by entering the report numbers separated by
commas. For example, you can enter 1,2,3 to print reports for the
first report groups.

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Select reports to be printed <5>: RETURN

Routine Command Execution


The Routine Command Execution Report provides a profile of commands executed
in routines during the monitoring interval. The data collection process of RTHIST
counts the total number of commands that were executed by each routine. Each line
of the report contains the UCI and Volume Group name of the routine, the routine
name, and the number of commands performed by the routine. This value is
expressed as a percentage of the total number of commands executed during the
monitoring interval. The percentage also is displayed graphically as a histogram on
a scale from 0 to 100 percent. A subtotal line appears after each UCI and Volume
Group combination. This report counts commands executed in a routine, not the
actual time spent in a routine.

MSM Utility Manual Performance Monitoring • 215


To the extent that each routine performs a reasonable mix of commands (globals,
locals, arithmetic, and so on) this method directly corresponds to the percentage of
time spent in each routine. For certain commands, there is no direct correlation with
time. For example, a READ or OPEN command that may take several seconds to
complete only counts as a single command. This does not correspond to the amount
of time that is actually spent on the command. This method overcomes the
deficiency inherent in sampling techniques used by other systems where each
partition is examined on a regular basis to see which routine is current. Commands
such as READ, HANG, and so on, would grossly distort the samples and provide a
false reading of where processing activity occurs in an application.
******************************************************************
* #1 - Routine Command Execution *
******************************************************************

UCI,VGP Routine (%-CMDS) 0% 10% 20% 30% 40% 50% ... 100%
======= ================ +====+====+====+====+====+====+====+
DJM,MDC #PgmrMd# (0.0%) |
DJM,MDC MAPDDB (1.1%) |-
DJM,MDC MAPDDB5 (0.0%) |
DJM,MDC SGMENU (0.2%) |
-------
Subtotal (1.3%) |-

MGR,VME #PgmrMd# (0.0%) |


MGR,VME %D (0.0%) |
MGR,VME %GD (0.3%) |
MGR,VME %GE (0.2%) |
MGR,VME %GE1 (0.2%) |
MGR,VME %GSEL (0.1%) |
MGR,VME %INDEX (5.7%) |---
MGR,VME %INDX1 (0.5%) |
MGR,VME %INDX2 (14.9%) |----+--
MGR,VME %INDX3 (5.6%) |---
MGR,VME %INDX4 (6.4%) |---
MGR,VME %INDX5 (1.5%) |-
MGR,VME %INDX6 (1.0%) |
MGR,VME %INDX7 (0.0%) |
MGR,VME %INDX8 (32.5%) |----+----+----+-
MGR,VME %LOGON (0.1%) |
MGR,VME %MODESET (0.0%) |
MGR,VME %RD (6.4%) |---
MGR,VME %RSEL (0.1%) |
MGR,VME %SDEV (0.1%) |
MGR,VME %SRCHPAT (0.0%) |
MGR,VME %SS (0.0%) |
MGR,VME %T (0.0%) |
MGR,VME %VGUTIL (0.1%) |
MGR,VME LOCKTAB (0.0%) |
MGR,VME RTHIST (0.1%) |
MGR,VME RTHIST1 (0.2%) |
MGR,VME SGBKSP (0.1%) |
MGR,VME SGCFGMSM (0.4%) |
MGR,VME SGCNFG (0.0%) |
MGR,VME SGCS (0.0%) |
MGR,VME SGDDB (0.1%) |
MGR,VME SGDDBDSP (0.2%) |
MGR,VME SGJOB (0.0%) |
MGR,VME SGLOCK (0.0%) |
MGR,VME SGMENU (0.1%) |
.
.
.
MGR,VME SYSGEN (0.5%) |
MGR,VME SYSGEN2 (0.0%) |
MGR,VME TRANSLAT (0.0%) |
MGR,VME VALIDATE (0.8%) |
-------
Subtotal (98.7%) |----+----+----+----+----+----

216 • Performance Monitoring MSM Utility Manual


Routine Global Access Report
The Global Access Report provides a profile of global accesses performed within
routines during the monitoring interval. The data collection process of RTHIST
records the total number of global references (for example: SET, KILL, $DATA,
$NEXT) that were performed for each routine. Each line of the report includes the
UCI and Volume Group name of the routine, the routine name, and the number of
global accesses performed by the routine. This value is expressed as a percentage of
the total global accesses that occurred during the monitoring Interval. The percentage
also is displayed graphically as a histogram on a scale from 0 to 100 percent. A
subtotal line appears after each UCI and Volume Group combination. Only routines
which accessed globals during the monitoring interval appear in the report.
******************************************************************
* #2 - Routine Global Access *
******************************************************************

Total Global Accesses: 4,981

UCI,VGP Routine (%-CMDS) 0% 10% 20% 30% 40% 50% ... 100%
======= ================ +====+====+====+====+====+====+====+
DJM,MDC SGMENU (1.8%) |-
DJM,MDC DISPLAY (17.3%) |----+---
-------
Subtotal (19.1%) |----+----

MGR,VME %GD (1.0%) |-


MGR,VME %GE (0.1%) |
MGR,VME %GSEL (0.1%) |
MGR,VME %INDEX (2.4%) |-
MGR,VME %INDX1 (1.9%) |-
MGR,VME %INDX7 (0.1%) |
MGR,VME %INDX8 (3.5%) |--
MGR,VME %LOGON (0.3%) |
MGR,VME %RD (30.5%) |----+----+----+
.
.
.
MGR,VME SGMENU (0.4%) |
MGR,VME SGMODBUF (0.1%) |
MGR,VME SGPAC (0.1%) |
MGR,VME SGPART (0.4%) |
MGR,VME SGPSIZE (0.1%) |
MGR,VME SGTAPE (0.0%) |
MGR,VME SGTTT (0.0%) |
MGR,VME SYSGEN (1.5%) |-
MGR,VME SYSGEN2 (0.0%) |
MGR,VME VALIDATE (2.3%) |-
------
Subtotal (80.9%) |----+----+----+----+----+----

MSM Utility Manual Performance Monitoring • 217


Globals Report
The Globals Report provides a profile of global names accessed during the
Monitoring Interval. Each line of the report contains the name of the UCI and
Volume Group of the global, the global name, and the number of references made to
the specified global. This number is expressed as a percentage of the total number of
global references that occurred during the monitoring interval. The report also
includes the average access rate (accesses per second) for all globals referenced
during the monitoring interval. A subtotal line appears after each UCI and Volume
Group combination. High global access rates to a specific global should be
investigated as a possible source of bottlenecks.
******************************************************************
* #3 - Globals: % of References *
******************************************************************

Global Accesses Per Second: 3.08

UCI,VGP Global (%-CMDS) 0% 10% 20% 30% 40% 50% ... 100%
======= ================ +====+====+====+====+====+====+====+
DJM,MDC #PgmrMd# (0.0%) |
DJM,MDC SYSGEN (0.1%) |
DJM,MDC UTILITY (0.4%) |
DJM,MDC abc (0.2%) |
-------
Subtotal (0.7%) |

MGR,VME #PgmrMd# (0.0%) |


MGR,VME %E (0.2%) |
MGR,VME %HELP (0.2%) |
MGR,VME %ZIS (0.2%) |
MGR,VME HELP (0.2%) |
MGR,VME MSMBENCH (0.2%) |
MGR,VME MSMBSYS (0.2%) |
MGR,VME SYS (0.3%) |
MGR,VME SYSGEN (1.9%) |-
MGR,VME UTILITY (3.2%) |--
MGR,VME VREPORT (0.2%) |
MGR,VME VTST (0.2%) |
MGR,VME XCR (68.7%) |----+----+----+----+----+----+----+
.
.
.
MGR,VME z (0.2%) |
MGR,VME zz (0.2%) |
-------
Subtotal (99.2%) |----+----+----+----+----+----+----+---

TST,VME #PgmrMd# (0.0%) |


TST,VME UTILITY (0.1%) |
-------
Subtotal (0.1%) |

218 • Performance Monitoring MSM Utility Manual


System Statistics Report
The System Statistics Report displays raw values of internal system counters. The
counters, which reflect system resources utilization, are displayed with a total
activity count and a rate per second count.
******************************************************************
* #4 - System Statistics Report *
******************************************************************

Description Total Counts Events/Sec


======================================= ============ ===========
MUMPS Commands In Recording Interval..: 6,499,387 21,664.6
Total Disk I/O Operations.............: 2,152 7.2
...Physical Disk Reads................: 17 0.1
...Physical Disk Writes...............: 2,135 7.1
Newly Modified Buffers................: 4,476 14.9
Phys/Write due to Excl Read...........: 0 0.0
Phys/Write due to Panic Level.........: 0 0.0
Phys/Write (mumsm)....................: 0 0.0
Phys/Write X Capacity (mumsm).........: 0 0.0
Phys/Write X2 Capacity (mumsm)........: 0 0.0
Out of Buffers Condition..............: 0 0.0
Total Waits for Buffer Locked.........: 59 0.2
...Waits for Buffer Locked Exclusively: 13 0.0
...Waits for Buffer Locked Shared.....: 46 0.2
Bufrlse...............................: 26,166 87.2
Bflush................................: 0 0.0
Alloc Bfr From Freeq..................: 4,352 14.5
Total Global Accesses.................: 1,679,651 5,598.8
...Global Fetches.....................: 1,539,110 5,130.4
.....Global Find......................: 1,539,084 5,130.3
.....$N/$O/$Q/$prev...................: 18 0.1
.....$D...............................: 8 0.0
...SET Commands.......................: 140,411 468.0
...KILL Commands......................: 130 0.4
Local Symbol Table Space Reclamations.: 1 0.0
Mem Q Hdrs gcollect...................: 0 0.0
Reuse Same Global Block Attempts......: 1,679,361 5,597.9
...Global Find........................: 1,539,035 5,130.1
...$N/$O/$Q/$prev.....................: 13 0.0
...$D.................................: 8 0.0
...SET Commands.......................: 140,305 467.7
Reuse Same Global Block Failed........: 48,303 161.0
...Global Find........................: 16,117 53.7
...$N/$O/$Q/$prev.....................: 10 0.0
...$D.................................: 3 0.0
...SET Commands.......................: 32,173 107.2
Global Block Splits...................: 4,285 14.3
New Naked Required....................: 0 0.0
Naked Reused..........................: 0 0.0
Naked Reused (next)...................: 0 0.0
Naked Reused (next next)..............: 0 0.0

Journaling............................: 0 0.0
Journaling In Use.....................: 0 0.0
Journaling Buffers full...............: 0 0.0
Total Logical Read Operations.........: 114,192 380.6
..qread().............................: 96,642 322.1
...Block type=GDIR....................: 217 0.7
...Block type=POINTER.................: 47,901 159.7
...Block type=GDATA...................: 48,462 161.5
...Block type=RDIR....................: 62 0.2
...Block type=RTNHDR..................: 0 0.0
...Block type=RTNDATA.................: 0 0.0
...Block type=MAPBLK..................: 0 0.0
...Block type=ANY.....................: 0 0.0
..bread().............................: 17,550 58.5
...Block type=GDIR....................: 11 0.0

MSM Utility Manual Performance Monitoring • 219


...Block type=POINTER.................: 4,265 14.2
...Block type=GDATA...................: 4,463 14.9
...Block type=RDIR....................: 0 0.0
...Block type=RTNHDR..................: 31 0.1
...Block type=RTNDATA.................: 98 0.3
...Block type=MAPBLK..................: 8,675 28.9
...Block type=ANY.....................: 7 0.0
Total Logical Write Operations........: 157,943 526.5
...Block type=GDIR....................: 11 0.0
...Block type=POINTER.................: 4,481 14.9
...Block type=GDATA...................: 144,793 482.6
...Block type=RDIR....................: 0 0.0
...Block type=RTNHDR..................: 0 0.0
...Block type=RTNDATA.................: 0 0.0
...Block type=MAPBLK..................: 8,658 28.9
...Block type=ANY.....................: 0 0.0
Total Physical Read Operations........: 17 0.1
...Block type=GDIR....................: 0 0.0
...Block type=POINTER.................: 5 0.0
...Block type=GDATA...................: 4 0.0
...Block type=RDIR....................: 0 0.0
...Block type=RTNHDR..................: 2 0.0
...Block type=RTNDATA.................: 4 0.0
...Block type=MAPBLK..................: 2 0.0
...Block type=ANY.....................: 0 0.0
Total Physical Write Operations.......: 2,135 7.1
...Block type=GDIR....................: 6 0.0
...Block type=POINTER.................: 52 0.2
...Block type=GDATA...................: 2,049 6.8
...Block type=RDIR....................: 0 0.0
...Block type=RTNHDR..................: 0 0.0
...Block type=RTNDATA.................: 0 0.0
...Block type=MAPBLK..................: 28 0.1
...Block type=ANY.....................: 0 0.0
Total DDP Global Requests.............: 0 0.0
...Global Finds.......................: 0 0.0
...$N/$O/$Q/$prev.....................: 0 0.0
...$D.................................: 0 0.0
...SET Commands.......................: 0 0.0
...KILL Commands......................: 0 0.0
.. LOCK Commands......................: 0 0.0

Total RVG Global Requests.............: 0 0.0


...Global Finds.......................: 0 0.0
...$N/$O/$Q/$prev.....................: 0 0.0
...$D.................................: 0 0.0
...Global Directory Lookups...........: 0 0.0
...SET Commands.......................: 0 0.0
...KILL Commands......................: 0 0.0
.. LOCK Commands......................: 0 0.0
RVG Cache Misses......................: 0 0.0
...Global Finds.......................: 0 0.0
...$N/$O/$Q/$prev.....................: 0 0.0
...$D.................................: 0 0.0
...Global Directory Lookups...........: 0 0.0
...SET Commands.......................: 0 0.0
...SET splits.........................: 0 0.0
...SET not in cache...................: 0 0.0
RVG Purge List All....................: 0 0.0
RVG Purge List All (Unexpected).......: 0 0.0
RVG Purge List Wrap...................: 0 0.0
RVG Purge List Block..................: 0 0.0
RVG Purge List Block Not In Cache.....: 0 0.0
RVG Fetch Waiting For Pending Update..: 0 0.0
RVG Fetch Waiting For Pending Fetch...: 0 0.0
RVG Update Waiting For Pending Update.: 0 0.0
RVG Update Waiting For Pending Fetch..: 0 0.0
RVG ADD_BP............................: 0 0.0
RVG ADD_BP_REPL.......................: 0 0.0
RVG PURGE_BP..........................: 0 0.0

220 • Performance Monitoring MSM Utility Manual


RVG NO_BLK_RCVD.......................: 0 0.0
Total XECUTE Commands.................: 0 0.0
...XECUTE Commands On Local Variables.: 0 0.0
...reXECUTEs On Local Variables.......: 0 0.0
...XECUTE Commands On Global Variables: 0 0.0
...reXECUTEs Of Strings...............: 0 0.0
@Expression...........................: 140,000 466.7
Command Argument @....................: 149 0.5
@Local Variable.......................: 140,000 466.7
Job Dispatch Preemptions..............: 7,189 24.0
Job Dispatcher Idle...................: 14,761,579 49,205.3
Job Dispatches........................: 46,127 153.8
JWAIT.................................: 46,127 153.8
JPOST.................................: 9,279 30.9
External Process JPOST................: 0 0.0
Timesharing Slice-Checks..............: 36,830 122.8
PCCPUIDLE1............................: 14,761,579 49,205.3
PCCPUIDLE2............................: 0 0.0
$TEXT()...............................: 0 0.0
Memget()..............................: 350,642 1,168.8
Getmain().............................: 431 1.4
Sbrk()................................: 15 0.1
Total Terminal I/O Characters.........: 1,022 3.4
...Characters Input From Terminals....: 14 0.0
...Characters Output On Terminals.....: 1,008 3.4

The counters provide an overview of system performance during the Monitoring


Interval since they are not related to any individual job, routine, or global. The
following sections describe the meaning of each system counter.

M commands in recording interval


The total number of commands performed by the system during the monitoring
interval. This value also includes commands used by the RTHIST utility in
producing the reports. The number of events per second reflects the sustained
command rate over the recording interval. When the command rate is high, the
system is busy (it indicates an absence of idle time).

Total disk I/O operations


The total number of disk I/O operations. This is the sum of the physical disk read
operations and physical disk write operations that occurred during the monitoring
interval.

Physical disk reads


The number of physical disk read operations (database only) performed during the
monitoring interval. Use the access rate to determine whether or not the disk I/O
subsystem. The higher the rate, the busier the disk I/O subsystem. A typical disk
cannot sustain more than 50 random disk I/Os per second, based on an average
access time for the disk of 18 milliseconds. A high value normally indicates a disk
I/O bottleneck.
To resolve this problem, enlarge the MSM disk buffer cache, redistribute the
database across multiple physical disks, or examine the application and reduce the
number of global references. For example, if multiple nodes are frequently used
together, they could be stored in the same global node. The data can be retrieved
using a single global reference into a local variable, and the $PIECE function can be
used to separate the values.

MSM Utility Manual Performance Monitoring • 221


Physical disk writes
The number of times database blocks were physically written to the disk. Blocks are
only written to the disk after they have been modified by an application. The same
general concerns that were described for physical disk reads apply to physical disk
writes.

Newly modified buffers


The number of times an unmodified buffer was updated for the first time in the
cache. Since buffers may be updated multiple times before being rewritten to disk,
this number represents the growth in the total number of modified buffers in the
buffer pool cache.

Physical writes due to exclusive read


The number of times MSM had to rewrite a modified buffer from the cache because
a job initiated a physical read for a database block which it intended to update.

Physical writes due to panic level


The number of times physical writes occurred as a result of reaching the panic
threshold. When the number of modified buffer in the buffer pool reaches a panic
threshold (for example: typically 25% of the total buffer pool) and a job requests a
physical read of a database block for update (exclusive access), MSM will initiate
rewrites of modified buffers.

Physical writes (mumsm)


The number of times that MSM initiated physical writes of modified buffers to
prevent modified buffers from accumulating in the buffer pool or from being in
memory for a long period of time without being rewritten to the database.

Physical writes X capacity (mumsm)


The number of times physical writes took place because the I/O subsystem was
below a specified threshold. MSM monitors its disk I/O activity in order to balance
the CPU load and the I/O load. When the disk I/O level drops below the threshold,
MSM attempts to pick up the slack by rewriting modified buffers, thus achieving a
high overlap between CPU and disk I/O.

Physical writes X2 capacity (mumsm)


The number of physical writes that occurred in burst mode. When the number of
modified buffers gets too high, MSM enters a burst mode of disk I/O. It attempts to
quickly rewrite modified database blocks in order to reduce the modified buffer
count.

Out of buffers condition


The number of times that all buffers in the disk cache were in use (none of the blocks
were available to be reused). This condition normally does not occur. If it does, the
disk cache is too small for the number of partitions running, or the I/O thresholds
(see SYSGEN utility) are set too high. High values for this counter reflect an
extreme condition which should be remedied as soon as possible.

222 • Performance Monitoring MSM Utility Manual


Total waits for buffer locked
The total number of Buffer Locked conditions. This is the sum of the Waits for
Buffer Locked Exclusively and the Waits for Buffer Locked Shared that occurred
during the monitoring interval.

Waits for buffer locked exclusively


The number of times that an MSM job requested a buffer for either shared or
exclusive use but had to wait because the buffer was marked for exclusive use by
another MSM job. A high number of buffer-locked conditions indicates that there is
contention within the application for the same global nodes. One solution is to
spread the data that is being accessed more evenly across multiple globals.

Waits for buffer locked shared


The number of times that an MSM job requested a buffer for exclusive use but had to
wait because the buffer was already being held for shared use by another MSM job.
This counter measures the same contention as the Buffer Locked Exclusively
counter, except that the reason for the unavailability of the buffer is different (shared
use versus exclusive use). As with the Buffer Locked Exclusively counter, a high
value reflects contention within the application on global nodes.

Buffer releases
The number of times a block in the buffer pool was released. Buffer pool blocks are
continually used (both shared and exclusive) by the running jobs. When the
concurrent use count for a block drops to zero, the buffer is returned to the free
queue (the buffer is released).

Buffer flushes
The number of times MSM searched for a modified buffer to rewrite back to the
database.

Allocate buffer from free queue


The number of times that a buffer allocation was requested and could be satisfied by
removing a buffer from the queue of buffers available for reuse by jobs.

Total global accesses


The total number of global accesses. This is the sum of the Global Fetch, SET, and
KILL operations that occurred during the monitoring interval.

Global fetches
A count of Global nodes fetched. This value includes all references made using
$DATA, $NEXT, $ORDER, $QUERY, and so on, as well as any references to a
global node made as part of an M expression. A high rate of global references may
indicate a database bottleneck. If so, consider strategies to reduce global usage. This
value is sub-divided into global find operations, global search operations ($NEXT,
$ORDER, $QUERY), and $DATA operations.

MSM Utility Manual Performance Monitoring • 223


Global SETs
A count of SET commands on global nodes. A high value can indicate a database
bottleneck. If a bottleneck exists, consider strategies to reduce global usage. One
possibility is to build up the global node in a local and use a single SET command to
update the global rather than adding several pieces of a global node with multiple
SET commands.

Global KILLs
A count of the total number of KILL commands issued for globals during the
Monitoring Interval. No distinction is made between a KILL for the entire global
and a KILL for a portion of the global.

Local symbol table space reclamations


The number of times local symbol garbage collection was performed in the system.
By design, internal space within a partition ($STORAGE) is only reorganized when
a partition tries to expand and there is no space available. A high value in this
counter indicates that partition sizes are set too low and should be increased.

Mem Q Hdrs Gcollect


The number of times that a memory garbage collection occurred. When the
underlying Host OS indicates that all available memory has been allocated, MSM
attempts to reclaim space internally by removing fragments from its free memory
queues. The removal of fragments involves coalescing segments into fewer but
larger memory segments.

Reuse same global block attempts


When a global access is made by a job, the MSM Global Manager tests whether or
not the specified node is in the same data block as the previous global access made
by the job. When the node is in the same data block, the system can access the data
without searching the global directory and the pointer blocks. This significantly
reduces the time required to retrieve the data.
This approach is predicated on the assumption that most global accesses by a job are
sequential in nature, or at least frequently access information in the same data block.
This counter reflects the number of times that the requested node was found in the
last accessed data block. Generally, the higher the counter, the more efficient the
global accesses. This value is subdivided into global find operations, global search
operations ($NEXT, $ORDER, $QUERY), $DATA operations, and SET commands.

Reuse same global block failed


The number of times a global reference was made by a job and the node was not
found in the data block associated with the last global referenced by the job. The
ratio of the Reuse Same Block Global Attempts counter to this counter indicates the
degree to which the strategy of accessing the last data block is successful. This
category is subdivided into global Find operations, global search operations
($NEXT, $ORDER, $QUERY), $DATA operations, and SET commands.

224 • Performance Monitoring MSM Utility Manual


Global block splits
A count of the number of times that a global SET command caused a data block,
pointer block, or global directory block to be split into two blocks. A high rate of
global splits can have a significant impact on system performance. Strategies to
reduce this type of global usage should be considered.

New naked required


Internally, the system maintains a table for each job of the last three naked references
that were made. This counter represents the number of times that a global request
could not be satisfied with one of the naked references in this table.

Naked reused
This counter indicates the number of times a global reference could be satisfied by
the first entry in the job's table of naked refrences.

Naked reused (next)


This counter indicates the number of times a global reference could be satisfied by
the second entry in the job's table of naked references.

Naked reused (next next)


This counter indicates the number of times a global reference could be satisfied by
the third entry in the job's table of naked references.

Journaling
The number of times a database journal entry was made. Journal entries include
SET, KILL, TSTART, TCOMMIT, and so on.

Journaling in use
The number of times the journal appears busy to a job due to use by other jobs.
Journaling serializes database updates so they can be recorded in the journal. Any
delays in adding entries to the journal (such as switching to a new journal file) cause
other jobs to wait if they attempt a journal operation.

Journaling buffers full


The number of times all journal buffers were full. MSM maintains a set of journaling
buffers which it writes to the journal file periodically or when the buffers are full. If
journal entries are generated faster than the buffers can be written to disk, the buffers
may be full for a new job attempting to journal. The job waits for space to free up in
the journal buffers.

Total logical read operations


The total number of Logical Buffer Read operations. This is the sum of various
Logical Read operations that occurred during the monitoring interval. This category
is sub-divided into Qread operations and Bread operations (buffer reads that hold a
buffer until explicitly released).

MSM Utility Manual Performance Monitoring • 225


Qread operations
Quick read operations are requests that hold a buffer for a single time-slice. At the
end of the time-slice, the held buffer is automatically released. This category is
subdivided by the type of block being read (Global Directory, Pointer Block, Global
Data Block, Routine Directory, Routine Header, Routine Data, Map Block, and any
other type).

Bread operations
Block read operations are requests that hold a buffer until it is explicitly released by
the process that held it. This category is subdivided by the type of block being read
(Global Directory, Pointer Block, Global Data Block, Routine Directory, Routine
Header, Routine Data, Map Block, and any other type).

Total logical write operations


The number of times a database block was updated in memory. In a busy system, a
block may be modified several times in memory before the system writes it to disk.
The higher the ratio of logical writes to physical writes, the busier the system. This
category is subdivided by the type of block being read (Global Directory, Pointer
Block, Global Data Block, Routine Directory, Routine Header, Routine Data, Map
Block, and any other type).

Total physical read operations


The number of physical disk read operations (database only) performed during the
monitoring interval. The access rate can be used to determine whether or not the
disk I/O subsystem is overloaded. The higher the rate, the busier the disk I/O
subsystem. A typical disk cannot sustain more than approximately 50 random disk
I/Os per second, based on an average access time of 18 milliseconds for the disk. A
high value normally indicates a disk I/O bottleneck. This category is subdivided by
the type of block being read (Global Directory, Pointer Block, Global Data Block,
Routine Directory, Routine Header, Routine Data, Map Block, and any other type).

Total physical write operations


The number of times database blocks were physically written to the disk. Blocks are
only written to the disk after they are modified by an application. The same
concerns that were described for Physical Disk Reads apply to Physical Disk Writes.
This category is subdivided by the type of block being read (Global Directory,
Pointer Block, Global Data Block, Routine Directory, Routine Header, Routine Data,
Map Block, and any other type).

Total DDP global requests


The number of DDP requests performed on behalf of all other systems in the
network. This category is subdivided into global find operations, global search
operations ($NEXT, $ORDER, $QUERY), $DATA operations, SET commands,
KILL commands, and LOCK commands.

226 • Performance Monitoring MSM Utility Manual


Total RVG global requests
The number of global requests that were made to a volume group that is mounted on
a remote system (a Remote Volume Group). This category is subdivided into global
find operations, global search operations ($NEXT, $ORDER, $QUERY), $DATA
operations, SET commands, KILL commands, and LOCK commands.

RVG cache misses


The number of global requests that were made to a volume group that is mounted on
a remote system (a Remote Volume Group) that could not be satisfied from the RVG
cache. This category is sub-divided into global find operations, global search
operations ($NEXT, $ORDER, $QUERY), $DATA operations, SET commands,
KILL commands, and LOCK commands.

RVG purge list all


The number of times that the client was told by a server to purge all blocks from its
local cache. Rarely, an RVG server may determine that a client’s RVG cache is
out-of-date with respect to the server (all the buffers have aged beyond a threshold).
When this occurs, the server asks the client to purge its entire RVG cache.

RVG purge list all (unexpected)


The number of times that client/server RVG cache mismatches occurred. This
counter should always be zero.

RVG purge list wrap


The number of times that a client purged its own RVG cache. When the client’s
RVG cache gets too far behind the server’s cache, the client purges its own RVG
cache and requests new copies of the RVG buffers as needed.

RVG purge list block


The number of individual blocks purged from the client’s RVG cache. The client
and server continually communicate in order to keep the client’s cache consistent.
The server periodically informs the client which RVG blocks are no longer valid.
The client then purges them from its own RVG cache.

RVG purge list block not in cache


The number of times the server notified the client to purge a particular block from its
RVG cache, but the client had already purged it from its RVG cache for unrelated
reasons.

RVG fetch waiting for pending update


The number of times MSM has had to serialize a database fetch due to an update in
progress. MSM RVG protocol allows multiple updates and fetches to be performed
concurrently. However, update and fetch collisions can occur because of set or fetch
operations to the same global. When this occurs, MSM will serialize the accesses as
necessary.

MSM Utility Manual Performance Monitoring • 227


RVG fetch waiting for pending fetch
The number of times that database fetches were delayed to allow other jobs to send
or receive RVG requests. Since the RVG protocol allows multiple updates and
fetches to be performed concurrently, MSM will prevent a client/server connection
(a circuit) from being monopolized by either database updates or database fetches.

RVG update waiting for pending update


The number of times MSM has serialized a database update due to a database fetch
in progress. Since the RVG protocol allows multiple updates and fetches to be
performed concurrently, update and fetch collisions can occur when setting or
fetching the same global. When this occurs, MSM serializes the operations as
necessary.

RVG update waiting for pending fetch


The number of times that database updates were delayed to allow other jobs to send
or receive RVG requests. Since the RVG protocol allows multiple updates and
fetches to be performed concurrently, MSM prevents a client/server connection (a
circuit) from being monopolized by database updates or database fetches.

RVG ADD_BP
The number of times a new database block was added to the client’s RVG cache.

RVG ADD_BP_REPL
The number of times a new RVG block replaced an older version in the client’s RVG
cache.

RVG PURGE_BP
The number of times an RVG block was purged from the client’s RVG cache.

RVG NO_BLOCK_RCVD
The number of RVG messages between the client and a server that did not include
the transfer of an RVG database block.

Total XECUTE commands


The total number of XECUTE commands performed by the system during the
monitoring interval.

XECUTE commands on local variables


The total number of XECUTE commands performed by the system on local
variables during the monitoring interval. The difference between this counter and
the Total XECUTE Commands counter is the number of XECUTEs performed from
globals variables and expressions.

228 • Performance Monitoring MSM Utility Manual


ReXECUTEs on local variables
The total number of times that an XECUTE command was repeated on the same
local variable. The system includes special code to optimize performance for this
situation.

XECUTE commands on global variables


The total number of XECUTE commands performed by the system on global
variables during the monitoring interval. The difference between this counter and
the Total XECUTE Commands counter is the number of XECUTEs performed from
Local Variables and Expressions.

ReXECUTEs on strings
The total number of times that an XECUTE command was repeated on the same
string. The system includes special code to optimize performance for this type of
situation.

@Expression
The number of expressions evaluated by the system that included indirection.

Command Argument @
The number of commands evaluated by the system that included indirection in one of
their arguments.

@Local Variable
The number of times M(UMPS) indirection was used on a local variable.

Job dispatch preemptions


The number of times that an executing MSM job was preempted to allow another
MSM job to execute. Generally, this situation only occurs when a disk I/O request
or terminal input operation completes. A high value in this counter may indicate an
I/O-bound system. A low value may indicate either a CPU-bound or an idle system.

Job dispatcher idle


The number of times that the MSM job dispatcher was entered and there was no
work to do (no jobs were ready to be dispatched). When this occurs, the dispatcher
waits until a job is ready to dispatch.

Job dispatches
The number of times that an MSM job was dispatched. In a system where more than
one job is running, dispatches can occur when a job’s time slice has been exceeded,
when a disk I/O operation completes, when a terminal read command completes, etc.
The algorithms used by the dispatcher are intended to balance job performance while
maintaining maximum throughput and interactive responsiveness.

MSM Utility Manual Performance Monitoring • 229


JWAIT
The number of JWAIT operations performed during the monitoring interval. A
JWAIT is issued by a job when it needs to wait for some event to occur (for
example: block read, hang time, LOCK unavailable).

JPOST
The number of JPOST operations performed during the monitoring interval. A
JPOST is issued by the system to wake up a job that has gone to sleep as a result of a
JWAIT operation.

External process JPOST


The number of JPOST operations performed by an external process during the
monitoring interval. A JPOST is issued by an external process to wake up a job that
has gone to sleep as a result of a JWAIT operation.

Timesharing slice-checks
The number of times that an MSM job's execution was suspended because the job
had completed its allotted time-slice. At the end of each execution time-slice, the job
with the highest internal priority that is ready to run will be dispatched. Typically,
an execution time-slice is determined by the number of M commands performed by
the job.

PCCPUIDLE1
The number of CPU idle clock ticks. This counter is only valid in MSM-PC/PLUS.

PCCPUIDLE2
This counter is used in conjunction with PCCPUIDLE1 counter. This counter is
only valid in MSM-PC/PLUS.

$TEXT ()
The number of times the $TEXT system function was used during program
execution.

Memget ()
The number of times internal memory allocation was requested by running jobs.
Memory allocation is typically associated with local variables.

Getmain ()
The number of times the internal memory allocator requested memory from the
system memory allocator. The system memory allocator in MSM requests memory
from the host operating system if it cannot satisfy the request from its own memory
queue.

Sbrk ()
The number of times the system memory allocator requested memory from the host
operating system.

230 • Performance Monitoring MSM Utility Manual


Total terminal I/O characters
The total count of characters sent to or received from terminals on the system. This
is the sum of the Characters Input From Terminals and the Characters Output to
Terminals during the monitoring interval.

Characters input from terminals


The number of characters received (input from the terminal via the READ
command) from all active terminals in the system during the monitoring interval.

Characters output on terminals


The number of characters sent (output to the terminal via the WRITE command) to
all active terminals in the system during the monitoring interval.

Computed Ratios Report


This report provides an overview of key system indicators. A sample report and a
description of each ratio are provided below.
******************************************************************
* #5 - Computed Ratios Report *
******************************************************************

Description Value
===========================================: =======
Cache Read Hit Ratio.......................: 99.7%
...Block type=GDIR.........................: 97.2%
...Block type=POINTER......................: 100.0%
...Block type=GDATA........................: 99.9%
...Block type=RDIR.........................: 89.2%
...Block type=RTNHDR.......................: 60.8%
...Block type=RTNDATA......................: 17.1%
...Block type=MAPBLK.......................: 99.9%
...Block type=ANY..........................: 94.7%
Cache Write Buffering Ratio................: 78.2
...Block type=GDIR.........................: 1.0
...Block type=POINTER......................: 160.4
...Block type=GDATA........................: 72.8
...Block type=RDIR.........................: n/a
...Block type=RTNHDR.......................: n/a
...Block type=RTNDATA......................: n/a
...Block type=MAPBLK.......................: 616.9
...Block type=ANY..........................: n/a
Reuse Same Block Efficiency................: 94.8%
...Global Find()...........................: 98.1%
...$N/$O/$Q/$prev..........................: 85.0%
...$D......................................: 92.6%
...SET Commands............................: 72.9%
Buffer Reads Per Global Reference..........: 0.1
Physical Buffer Writes Per Global SET/KILL.: 0.0
Logical Buffer Writes Per Global SET/KILL..: 1.1
Global Block Splits Per Global SET.........: 0.0
Global Fetches per Global SETs.............: 6.6
Global SETs per Global KILLs...............: 1,132.8
% Xecute Commands On Local Variables.......: 0.0%
% ReXecute of Locals.......................: 0.0%
% Xecute Commands On Global Variables......: 0.0%
% ReXecute of Strings......................: 100.0%
% ReXecute of Saved Pcode..................: 100.0%
RVG: % Total Global References.............: 0.0%
...Global Finds............................: 0.0%
...$N/$O/$Q/$prev..........................: 0.0%
...$D......................................: 0.0%

MSM Utility Manual Performance Monitoring • 231


...SET Commands............................: 0.0%
...KILL Commands...........................: 0.0%
RVG: % Cache Hits..........................: n/a
...Global Finds............................: n/a
...$N/$O/$Q/$prev..........................: n/a
...$D......................................: n/a
...Global Directory Lookup.................: n/a
...SET Commands............................: n/a

Cache read hit ratio


This ratio indicates how often a specified database block was found in the disk buffer
cache. When the requested block is found in the cache, a physical disk I/O operation
(a block read) is avoided. This ratio reflects extent to which the working set of the
application is maintained in the cache. The higher the ratio, the fewer physical disk
I/Os that are required for the application to process its work. To improve this ratio,
increase the size of the disk buffer cache. Generally, this ratio should be 90 percent
or higher. As a sub-category, the Cache Read Hit Ratio is shown for each block type
found in MSM.

Cache write buffering ratio


This ratio reflects the average number of times a block was updated in memory
compared to the number of times that it was written to disk. A high ratio indicates
that global activity during the monitoring interval was more sequential than random.
This ratio is affected by the I/O threshold parameters in SYSGEN. The higher the
thresholds, the higher this ratio is likely to be. As a sub-category, the Cache Write
Buffering Ratio is shown for each block type found in MSM.

Reuse same block efficiency


This ratio indicates the success of the Global Manager strategy in locating the
requested global node in the same block that was last referenced. If this ratio is low,
the global accesses are random, and the Reuse Same Block strategy is not very
useful. If the rate is greater than 100/n, where n is the average depth of a global (the
number of pointer block levels +1), then the strategy is successful in eliminating
unnecessary pointer block reads and searches. As a sub-category, the Reuse Same
Block Efficiency is shown for global finds, global search ($NEXT, $ORDER, and so
on), $DATA operations, and SET commands.

Buffer reads per global reference


This value shows the average number of global database blocks searched in order to
satisfy a global reference. The smaller this value, the better the system performance.
This value is dependent on the Reuse Same Block Efficiency statistic.

Physical buffer writes per global SETs + KILLs


This value indicates the average number of physical block writes incurred by every
SET or KILL of a global. This value is affected by the I/O threshold parameters
specified through SYSGEN and by the size of the disk buffer cache.

Logical buffer writes per global SETs + KILLs


This value indicates the average number of logical block updates incurred by every
SET or KILL of a global. This value includes block splits, map block updates, and
so on.

232 • Performance Monitoring MSM Utility Manual


Global block splits per global SET
This value indicates the extent to which SET commands for global nodes result in
one or more block splits (data blocks, pointer blocks, and global directory blocks).
The higher the value, the greater the impact on overall system performance.

Global fetches per global SET


This ratio reflects the number of global fetch (retrieve) operations compared to the
number of global update (create or modify global node) operations. Since global
fetches are more efficient than global updates (they have less impact on system
throughput), tune the application to make this ratio as high as possible.

Global SETs per global KILLs


This is the ratio of global SET operations (update and create global nodes) to global
KILL operations. Since global SETs impact system performance less than global
KILLs, whenever possible the application should be tuned to make this ratio as high
as possible.

XECUTE commands on local variables


This ratio reflects the total number of XECUTE commands performed by the system
compared to the number of XECUTE commands performed on local variables (the
remainder were done using globals or expressions).

ReXecute of locals
This ratio reflects the percentage of time that an XECUTE of a local variable was
repeated. Since the system optimizes repeated executes of the same local variable by
saving the compiled code, modify the application, if possible, to copy frequently
executed global nodes or constant expressions into locals.

XECUTE commands on global variables


This ratio reflects the total number of XECUTE commands performed by the system,
compared to the number of XECUTE commands performed on global variables (the
remainder were done using locals or expressions).

ReXecute of strings
This ratio reflects the percentage of time that an XECUTE command was a
re-execution of a string expression.

ReXecute of saved p-code


This ratio reflects the percentage of time that an XECUTE command was able to
used saved pseudo-code that was compiled during a previous execution of an
XECUTE command.

MSM Utility Manual Performance Monitoring • 233


RVG: % total global references
This ratio reflects the total number of global accesses that were made to globals
stored in a remote volume group on another system. As a sub-category, the
percentage of access is shown for global finds, global search ($NEXT, $ORDER,
and so on) operations, $DATA operations, SET commands, and KILL commands
performed on Remote Volume Group globals.

RVG: % cache hits


This ratio indicates how often a desired remote volume group block was found in the
remote volume group disk buffer cache. When the requested block is found in the
cache, a network I/O operation (a block read through the network) is avoided. As a
sub-category, the RVG % Cache Hits Ratio is shown for global finds, global search
($NEXT, $ORDER, and so on) operations, $DATA operations, global directory
lookup, and SET commands.

System Configuration Parameters Report


This report displays the current settings for the critical internal configuration
parameters. These parameters govern the way MSM responds to varying work
loads.
******************************************************************
* #6 - System Configuration Parameters Report *
******************************************************************

Buffer Cache Size..........................: 464 Buffers


Disk I/O Thresholds
Begin Burst Flush......................: 40
Stop Burst Flush.......................: 20
Flush Panic Level......................: 116
Flush Interval (sec)...................: 2
Flush Quantity.........................: 1
Maximum Partitions.........................: 256
Maximum Concurrent Partitions..............: 200
Dispatch Parameters
Slice Size.............................: 200
RunQ Slice.............................: 5
Q1 -> Q2 Threshold.....................: 1,200
Q2 -> Q3 Threshold.....................: 20,000
STAP Size..................................: 30,720 (=30K)
STACK Size.................................: 30,720 (=30K)

Buffer cache size


The number of internal buffers available to cache database blocks. The larger the
number, the more MSM is able to cache information, thereby reducing physical disk
activity. Database blocks of all types (for example: routine, map, directory, pointer,
data, and so on) reside in the cache on Most Frequently Used (MFU) basis. The
more often a block is required, the higher the probability that it is found in the cache,
bypassing the need for a disk read.

Disk I/O threshold


Disk I/O threshold parameters affect when, how often, and how much database block
rewrite activity takes place.

234 • Performance Monitoring MSM Utility Manual


Begin burst flush
When the number of modified buffers reaches or exceeds this value, MSM initiates
continuous writes of modified blocks in an attempt to reduce the total number of
modified buffers residing in the cache. This activity is done by a background
partition in MSM.

End burst flush


When the number of modified buffers has been reduced to this threshold value or
below, MSM suspends the Burst Flush activity and resumes a periodic rewrite
governed by the other parameters (Flush Interval and Flush Quantity).

Flush panic level


When the number of modified buffers reach this value, MSM makes the Burst Flush
operation the highest priority activity within the system. This continues until the
End Burst Flush value is reached. Buffer flushing then returns to its normal priority.

Flush interval (sec)


When MSM is not in Burst Flush mode, modified buffers are written to the database
periodically. This parameter specifies the interval (in seconds) at which buffers are
to be rewritten.

Flush quantity
This parameter specifies how many modified buffers are rewritten at each periodic
interval when MSM is not in Burst Flush mode.

Maximum partitions
The maximum number of partitions that will be allowed to run for this MSM license.

Maximum concurrent partitions


The maximum number of simultaneously executing partitions allowed. This
parameter is established using the SYSGEN utility. It can range from 1 up to the
value of Maximum Partitions.

Dispatch parameters
These parameters govern the way in which the MSM internal scheduler establishes
the dispatch priority of executing jobs.

Slice size
Specifies the execution slice size measured in commands. At the end of each slice,
the MSM dispatcher scans its internal run queues for other partitions ready to be
dispatched. Because MSM is a real-time operating system, priorities are
dynamically established. A higher priority partition will preempt a running partition.

RunQ slice
The size of the current execution slice for a pre-empting job. Once a pre-empting
job exhausts its RunQ slice, it resumes its normal allocation of execution slices.

MSM Utility Manual Performance Monitoring • 235


Q1 -> Q2 threshold
The number of commands executed without a terminal READ operation governs a
job’s internal priority. When the Q1 -> Q2 threshold is reached, the job drops from
an internal level of Q1 down to an internal level of Q2. MSM typically exhausts the
Q1 level before initiating any activity from the Q2 level.

Q2 -> Q3 threshold
When the Q2 -> Q3 threshold of commands since last terminal READ operation is
reached, the job drops from an internal level of Q2 down to an internal level of Q3.
MSM typically exhausts all Q2 level activity before initiating any activity from the
Q3 level.

STAP size
The size of the internal expression and ZSAVE work stack used by each partition. A
large value allows complex expressions to be properly evaluated, larger routines to
be ZSAVEd, and so on.

STACK size
The size of the internal system stack used by each partition. This affects the
maximum nesting levels of DOs, XECUTEs, and indirection.

Terminal Response Time Report


The Terminal Response Time report is a visual indicator of system responsiveness as
perceived by the user. Two separate variables are measured by this report: the
elapsed time from the end of one READ to the start of the next READ on the same
terminal, and the number of M commands performed during that interval. The
measurement is made simultaneously (and independently) on all active terminals.
This report produces a two-dimensional graphic representation of the data. For each
time interval measured (the time between the end of one READ and the start of the
next READ on the same terminal), the number of commands performed by the
application is recorded and displayed. Following are samples of this report.
******************************************************************
* #7 - Terminal Response Time Report - Detail *
******************************************************************

Number of M commands executed in time interval between end


of a READ command to the start of the next READ command

# MUMPS # of 0 Seconds = Response Time


Commands Events 0% 10% 20% 30% 40% 50% ... 100%
======== ======= +====+====+====+====+====+====+====+
10: 6 |----+-
50: 16 |----+----+----+
100: 15 |----+----+----
200: 7 |----+---
500: 8 |----+---
1000: 1 |-
2,000: 1 |-
5,000: 0 |
10,000: 0 |
20,000: 0 |
100,000: 0 |
=======
54

236 • Performance Monitoring MSM Utility Manual


# MUMPS # of 0 Seconds < Response Time ≤ 1 Second
Commands Events 0% 10% 20% 30% 40% 50% ... 100%
======== ======= +====+====+====+====+====+====+====+
10: 0 |
50: 1 |-
100: 1 |-
200: 5 |----+----+----+
500: 6 |----+----+----+----
1,000: 2 |----+-
2,000: 0 |
5,000: 1 |-
10,000: 0 |
20,000: 0 |
100,000: 0 |
======
16

# MUMPS # of 1 Second < Response Time ≤ 5 Second


Commands Events 0% 10% 20% 30% 40% 50% ... 100%
======== ======= +====+====+====+====+====+====+====+
10: 0 |
50: 0 |
100: 0 |
200: 0 |
500: 0 |
1,000: 0 |
2,000: 0 |
5,000: 1 |----+----+----+----+----+----+----+
10,000: 0 |
20,000: 0 |
100,000: 0 |
======
1

# MUMPS # of 5 Seconds < Response Time ≤ 6 Seconds


Commands Events 0% 10% 20% 30% 40% 50% ... 100%
======== ======= +====+====+====+====+====+====+====+
10: 0 |
50: 0 |
100: 0 |
200: 0 |
500: 0 |
1,000: 0 |
2,000: 0 |
5,000: 2 |----+----+----+----+----+----+----+
10,000: 0 |
20,000: 0 |
100,000: 0 |
======
2

# MUMPS # of 6 Seconds < Response Time ≤ 50 Seconds


Commands Events 0% 10% 20% 30% 40% 50% ... 100%
======== ======= +====+====+====+====+====+====+====+
10: 0 |
50: 0 |
100: 0 |
200: 0 |
500: 0 |
1,000: 0 |
2,000: 0 |
5,000: 0 |
10,000: 0 |
20,000: 0 |
100,000: 1 |----+----+----+----+----+----+----+
======
1

MSM Utility Manual Performance Monitoring • 237


At the end of the Terminal Response Time reports, the system produces a summary
report, which graphs the time intervals against the number of times they occurred.
The average response time is calculated as is the median (Mean) response time. The
mean response time is a value at the fiftieth percentile (half of all response times
were shorter, and half were longer). Statistically, this is a good indicator of
perceived response time by the user.
******************************************************************
* #8 - Terminal Response Time Report - Summary *
******************************************************************

Elapsed # of
Times Events 0% 10% 20% 30% 40% 50% ... 100%
======= ======= |====+====+====+====+====+====+====+
0: 54 |----+----+----+----+----+----+
1: 16 |----+----+
2: 0 |
3: 0 |
4: 0 |
5: 1 |
6: 2 |-
7: 0 |
8: 0 |
9: 0 |
10: 0 |
20: 0 |
30: 0 |
40: 0 |
50: 1 |
60: 0 |
100: 0 |
150: 0 |
200: 0 |
======
74

Average Response time: 0.1 second(s).


Median Response Time: 0 second(s).

A long delay between application READs may be due to an overloaded system. In


this case, the number of commands in the interval between READ commands tends
to be small. Alternatively, the application may perform a large amount of processing
between the READs. For example, an application that prompts the user for input and
then performs an extensive database search, exhibits long intervals between the end
of one READ and the start of the next. Because this is caused by the nature of the
application, the only solution is to tune the system and application to make
processing as efficient as possible.
By contrast, when the interval between READ operations is long but the number of
commands is small, then either the system is overloaded or the application is issuing
a timed operation (OPEN, LOCK, HANG) that is blocked. Since the latter situation
is unusual, the most likely reason for the delay is poor system performance.
The final report displays the distribution of commands executed between terminal
reads. It represents the amount of work performed by the application between each
of its terminal prompts.

238 • Performance Monitoring MSM Utility Manual


******************************************************************
* #9 - Command Distribution Between READ Commands Report *
******************************************************************

# of # of
Commands Events 0% 10% 20% 30% 40% 50% ... 100%
======== ======= |====+====+====+====+====+====+====+
10: 2,416 |----+----
50: 1 |
100: 2 |
200: 1,200 |----
500: 5,357 |----+----+----+----+
1,000: 4,439 |----+----+----+-
2,000: 12 |
5,000: 124 |-
10,000: 1 |
20,000: 0 |
100,000: 5 |
======
13,557

Average number of commands between READs...: 629 command(s).


Median value...............................: 500 command(s).

CPU and Disk Utilization Reports


The CPU Utilization Report and the Disk Utilization Report (available only in
MSM-PC/PLUS) provide histograms showing the percentage of time that the CPU or
Disk Subsystem was busy during the reporting interval. For each sampling interval
during the reporting interval, the report shows the percentage of time the CPU or
Disk Subsystem was busy, the average busy time and average number of active jobs,
the minimum busy time and minimum number of active jobs, and the maximum busy
time and maximum number of active jobs.
******************************************************************
* #10 CPU Utilization Report *
******************************************************************

Time CPU Busy Jobs 0% 10% 20% 30% 40% 50% ... 100%
======== ======== ==== +====+====+====+====+====+====+====+
08:50 am 32.97% 3 |----+----+----+-
08:51 am 7.69% 3 |----
08:52 am 97.91% 11 |----+----+----+----+----+----+----
08:53 am 49.34% 3 |----+----+----+----+----
08:54 am 3.30% 3 |-
-------- -------- ----

Average 38.24% 4.6 |----+----+----+----


Maximum 97.91% 11.0 |----+----+----+----+----+----+----
Minimum 3.30% 3.0 |-

******************************************************************
* #11 Disk Utilization Report *
******************************************************************

Time Disk Busy Jobs 0% 10% 20% 30% 40% 50% ... 100%
======== ========= ==== +====+====+====+====+====+====+====+
08:50 am 0.00% 3 |
08:51 am 2.20% 3 |-
08:52 am 26.37% 11 |----+----+---
08:53 am 8.79% 3 |----
08:54 am 0.00% 3 |
-------- -------- ----

Average 7.47% 4.6 |---


Maximum 26.37% 11.0 |----+----+---
Minimum 0.00% 3.0 |

MSM Utility Manual Performance Monitoring • 239


Delete Histogram Reports
Use this option to delete one or more reporting intervals from the RTHIST database.
You can purge RTHIST data that is no longer required. When you select this option,
a list of monitoring runs stored in the RTHIST database is displayed. This list
includes the start date of the monitoring interval, end date on the monitoring run,
duration, report frequency, CPU sample rate, and monitoring run description. Select
an individual run, a range of runs, or all runs to be deleted.
Select Option: 3 - Delete Histogram Reports
Available Histogram Monitoring Runs

Run Start Start Report CPU


# Date Time Duration Freq Sample Description
--- -------- ----- -------- ------ ------ -----------

1 02/23/97 7:30 60 min 10 min 1 min Sample RTHIST Run


2 02/24/97 9:00 4.0 hrs 2 hrs 10 min Lab Application
3 02/25/97 18:00 30 min 5 min 3 min All Applications
4 02/26/97 8:45 30 min 5 min 3 min Peak Activity
5 02/27/97 12:00 20 min 2 min 2 min Lunch Time Load
6 02/28/97 9:00 9.0 hrs 1 hrs 15 min Prime Shift Load
7 03/01/97 12:00 24.0 hrs 1 hrs 30 min Full Day Activity

Select monitoring run(s) to delete: ?

Enter the number of the monitoring run to delete. A range of


monitoring runs can be deleted by entering the starting and ending
numbers separated by a hyphen. For example, enter 1-4 to delete
the first 4 monitoring runs. To delete all of the monitoring runs
in the database, enter ALL.

Enter '^' to return to the previous question


Enter '^Q' to exit this utility

Select monitoring run(s) to delete: ALL

Ok to delete report(s)? <N>: ?

Enter YES to delete the selected monitoring runs.

Enter NO or '^' to backup to the previous question.


Enter '^Q' to exit this utility

Ok to delete report(s)? <N>: Y Deleted.

240 • Performance Monitoring MSM Utility Manual


Terminate Histogram Monitoring Run
Use this option to terminate a monitoring run. When you select this option, MSM
displays the current monitoring run if one is active, as well as a list of all monitoring
runs that have been scheduled. Select the run to be terminated. If it is the active run,
indicate whether or not data from the current run is to be saved. The following
example illustrates how to terminate an RTHIST monitoring run.
Select Option: 4 - Terminate Histogram Monitoring Run

Available Options:

1 - Terminate Immediately, Discard Current Interval


2 - Terminate Immediately, Save Current Interval
3 - Stop At End Of Current Interval
4 - Cancel A Scheduled Run

Select Option: ?

Select the option that indicates how the monitoring run is to be


terminated. Options 1 and 2 allow you to specify if the data in the
current reporting interval is to be saved when the run is
terminated. Option 3 will save the data from the completed run.
Option 4 provides a list of runs that have been scheduled but have
not been started.

Enter '^' to backup to the previous question.


Enter '^Q' to exit this utility

Available Options:

1 - Terminate Immediately, Discard Current Interval


2 - Terminate Immediately, Save Current Interval
3 - Stop At End Of Current Interval
4 - Cancel A Scheduled Run

Select Option: 1

System monitoring terminated.

MSM Utility Manual Performance Monitoring • 241


242 • Performance Monitoring MSM Utility Manual
SBP and Spooling

Overview
This chapter describes the Manager’s utilities that can be used to start up, shut down,
and configure Journaling and Cross-System Journaling, and control the Sequential
Block Processor (SBP) and Spooling functions.

SBP - Sequential Block Processor


MSM’s Sequential Block Processor (SBP) facility allows all types of disk devices to
be accessed as either sequential or random-access devices. You may use this
capability, for example, to spool out printed reports when multiple copies are needed
or to transfer routines and globals between UCIs. Before an SBP area can be used, it
must be identified to the system. To create an SBP area, identify the name of the
area, the volume group number, and the starting block within the volume group.
The SBP facility is supported by most utility programs that request an output device.
For additional information on the SBP facility, refer to the MSM User's Guide.

Invoking the SBP Utility


>D ^SBP

MSM - Sequential Block Processor Utility

Available Sequential Block Processor options:

1 - Allocate and initialize new SBP area


2 - Reset SBP area to empty
3 - Delete (release) SBP area
4 - List Current SBP areas
Select Option: ?

Select option by specifying the option number or supplying


enough characters to uniquely identify the option,
To get help information specific to an option, enter a '?'
followed by the option number.
Enter <RETURN> or '^' to exit with no action,
Enter '^L' to get a list of options
Select Option:

MSM Utility Manual SBP and Spooling • 243


List Current SBP Area
The list option is used to display all SBP areas that are defined in MSM. It shows
the SBP number (when SBP areas are created, they are assigned a number in
sequence), volume group number, starting block number within the volume group,
number of blocks allocated to the area (the size), and user-assigned name of the
space.
Select Option: 4 - List Current SBP areas

MSM: SBP Space Display

SBP# Vol Group Block# Size SBP Area Name


---- --------- ------ ----- -------------
1 SYS 1175 50 WORK

Allocate and Initialize New SBP Area


Before an SBP area can be accessed, it must be created. The creation process
allocates free blocks within an MSM volume group to the named SBP area. As part
of the allocation process, the blocks are rewritten to the volume group with all zeros
in the block and with a block type of SBP. An error occurs if an attempt is made to
access a block in a volume group with the SBP, but the block type is not SBP.
Select Option: 1 - Allocate and initialize new SBP area

Enter name for new SBP area: ?

SBP area name may be any string of characters up to 12 characters.


Enter '^L' for a list of existing SBP areas.

Enter name for new SBP area: TEST

Select starting block number for SBP area: ?


Select a block number in volume group 0 where the new SBP area is
to be allocated. This utility will search, starting at the block
you select, for a contiguous range of free blocks large enough to
accommodate the size of the SBP area you selected.

Enter the block number in one of the following formats:


bn
vn:rbn

Where vn is the volume number (default is 0),


rbn is the relative block number on the volume,
bn is an actual block number.
For blocks on volume 0, 'rbn' and 'bn' are equivalent.

Select starting block number for SBP area: 1200

SBP area size: ?


Specify size of SBP area in number of 1-K blocks, you may use a suffix
of 'M' to indicate 'megabytes' (fractional megabytes are valid).

SBP area size: 5

Searching.........

Please verify:
Starting block number..............: 0:4880:G0
Size of SBP area...................: 5

OK to proceed <Y>: YES

Allocating: 100% done


Resetting: 100% done
SBP area 'TEST' created.

244 • SBP and Spooling MSM Utility Manual


Press <RETURN> to continue

MSM - Sequential Block Processor Utility

Available Sequential Block Processor options:

1 - Allocate and initialize new SBP area


2 - Reset SBP area to empty
3 - Delete (release) SBP area
4 - List Current SBP areas

Select Option: 4 - List Current SBP areas

MSM - SBP Space Display

SBP# Vol Group Block# Size SBP Area Name


---- --------- ------ ----- -------------
1 SYS 4880 5 TEST

Press <RETURN> to continue

Reset SBP Area to Empty


Use the reset option to clear the area to all zeros. Each block in the specified area is
rewritten with a zero value.
Select Option: 2 - Reset SBP area to empty

Select SBP area (by name or by number) to be reset: TEST

Are you sure <N>: Y

Resetting

SBP area 'TEST' now reset.

Delete (Release) SBP Area


Use this option to free an SBP area when it is no longer needed. When an area is
freed, all blocks allocated to it are returned to MSM.
Select Option: 3 - Delete (release) SBP area

Select SBP area (by name or by number) to be released: TEST

Are you sure <N>: Y

Releasing blocks: 100% done

SBP area 'TEST' now deleted.

MSM - Sequential Block Processor Utility

Available Sequential Block Processor options:

1 - Allocate and initialize new SBP area


2 - Reset SBP area to empty
3 - Delete (release) SBP area
4 - List Current SBP areas

Select Option: 4 - List Current SBP areas

MSM: SBP Space Display

SBP# Vol Group Block# Size SBP Area Name


---- --------- ------ ---- -------------
1 SYS 1175 50 WORK

MSM Utility Manual SBP and Spooling • 245


SPL - Spooling Utility
MSM’s Spooling facility provides a mechanism that prevents contention for physical
printer devices within the system. The Spool device (device 2) allows concurrent
users to create multiple print files that are stored separately in a designated spool
area within the MSM system.
This utility enables you to manage the spooling facility, including allocating and
deallocating spool space, reinitializing spool space, enabling and disabling spooling,
starting and stopping the despooler, and deleting spooled files without printing them.
For more information on the Spooling facility, refer to the MSM User's Guide.

Invoking the SPL Utility


>D ^SPL

MSM - Spool Utility

Select Spool Options:

1 - Create Spool Area


2 - Free Spool Area
3 - Initialize Spool Area
4 - List Spool Area
5 - Enable Spooling
6 - Disable Spooling
7 - Start Despooler Job
8 - Terminate Despooler Job
9 - Remove a Spool File

Select Option: ?

Enter option number or enough characters to identify the option.


Enter '^' or '^Q' to exit the utility.

Create Spool Area


Before print spooling can be used, you must create a spooling area within the MSM
database. Although the area can be any size, the space must be contiguous. The
spooling area can reside within any volume group mounted on the system.
Select Option: 1 - Create Spool Area

Select starting block number for SPOOL area: ?


Select a block number in volume group 0 where the new SPOOL area is
to be allocated. This utility will search, starting at the block
you select, for a contiguous range of free blocks large enough to
accommodate the size of the SPOOL area you selected.

Enter the block number in one of the following formats:


bn
vn:rbn

Where vn is the volume number (default is 0),


rbn is the relative block number on the volume,
bn is an actual block number.
For blocks on volume 0, 'rbn' and 'bn' are equivalent.

Spool area size: ?

Specify size of SBP area in number of 1-K blocks; you may use a
suffix of 'M' to indicate megabytes (fractional numbers are valid).

246 • SBP and Spooling MSM Utility Manual


Spool area size: 1000

Searching...

Please verify:
Volume group number................: 0
Starting block number..............: 0:1517
Size of spool area.................: 1000

OK to proceed <Y>: YES

Creating
Initializing

Spool area created.

Free Spool Area


Use this option to free (delete) allocated spooling space that is no longer required.
When the space is freed, all blocks that were allocated to the spool area are returned
to MSM.
Select Option: 2 - Free Spool Area

Are you sure you want to free the spool area <N>: Y

Freeing the blocks.

Spool area now freed.

Initialize Spool Area


Use this option to remove all files within the spool space. This may be necessary if
the spool space is corrupted through hardware or software errors. When the spool
area is initialized, it is overwritten with blocks of zeros.
Select Option: 3 - Initialize Spool area

Are you sure you want to re-initialize spool area <N>: Y

Initializing.

Spool area now Initialized.

MSM Utility Manual SBP and Spooling • 247


List Spool Area
Use this option to display the status of the spool area. The display includes the
starting location of the spool area, the size of the area in 1-K blocks, the number of
free blocks in the spool area, and the percentage of space that is free. Status
information about spooling activity and the despooler task also is displayed.
Select Option: 4 - List Spool Area

Enter output device <5>: RETURN

Do you want to scroll? <N> RETURN

MSM - Spool Status Display


7:05 PM 12-AUG-97

Volume Group Starting block# Size (kb) Free blks %Free


------------ --------------- --------- --------- -----
SYS 1517 (0:1517) 100 96 96.00

Spooling is enabled for device 3.


Despooler is ACTIVE as job #4,
Currently printing file #5 to device 3.

Enable Spooling
Before you can create spool files, the system spooler must be running. Use this
option to start the spooler task in MSM and to assign the default device to be used
for spooling.
Select Option: 5 - Enable Spooling

Enter spool device <3> ?

Select a device to be used as the spool device. Any output to this


device will not print immediately, but will create a spool file to
be printed in turn by the despooler.
Enter '^' to return to the previous question.
Enter '^Q' to exit the utility.

Enter spool device <3> 3

Do you want to start the despooler <YES>: Y

Enter the device to despool to <3> RETURN

Spooling enabled.

Despooler started.

Disable Spooling
Use this option at any time to stop the spooling task within MSM. This should be
done only after all jobs that are in the process of spooling have ended.
Select Option: 6 - Disable Spooling

Spooling disabled.

248 • SBP and Spooling MSM Utility Manual


Start Despooler
In MSM, despooling of print files is accomplished through a background job that
executes the DESPOOL utility routine. You can modify this routine to meet
site-specific requirements. Use this option to initiate the background job
(JOB ^DESPOOL).
Select Option: 7 - Start Despooler

Enter the device to despool to <3>: RETURN

Despooler started.

Terminate Despooler Job


Use this option to terminate the background job that despools print files. The job can
be terminated immediately (even if it is in the process of despooling a file) or when it
becomes dormant. Use the List Spool Area option to determine the status of the
despooler.
Select Option: 8 - Terminate Despooler Job

Stop despooler immediately <NO> ?

Enter 'Y'es to stop the despooler immediately.


Enter 'N'o to stop the despooler after printing current file.
Enter '^' to return to menu.
Enter '^Q' to exit this utility.

Stop despooler immediately <NO> YES

Despooler stopped.

Remove a Spool File


Use this option to remove a file from the spool area. This erases all spooled data for
the file and puts the space associated with the file on the free queue within the spool
area.
Select Option: 9 - Remove a Spool File

Enter spool file number to be deleted: ?

Enter the number of the spool file to be deleted from the spool
area without being printed.
Enter '^L' for a list of spool files.
Enter '^' to return to menu.
Enter '^Q' to exit this utility.

Enter spool file number to be deleted: ^L

Spool File List

File# Size
----- -----
1 3

Enter spool file number to be deleted: 1

Are you sure <NO> YES

Spool file #1 removed.

MSM Utility Manual SBP and Spooling • 249


250 • SBP and Spooling MSM Utility Manual
Glossary

ASCII
The American Standard Code for Information Interchange. This code consists of 128
characters which comprise the standardized character set.

baud
The data transmission rate between two devices.

break
A command used to interrupt program execution so that debugging can occur.

canonic number
A numeric value that has no leading or trailing zeros after the decimal point.

checksum
The summation of all ASCII characters in a routine. Use checksum to compare
routines.

collating sequence
An order that is assigned to a grouping of subscripts, sorted in either string or
numeric sequence.
string - All subscripts are treated as character strings and are stored in ASCII
sequence.
numeric - Storage is in the order of canonic numbers first, followed by the non-
numeric values in ASCII sequence.

Configuration
1) A collection of hardware and software that comprises the computer system.
2) A collection of attributes that describes how the system will function when it is
initialized. Use the SYSGEN utility to set up or modify MSM configurations.

MSM Utility Manual Glossary • 251


control characters
Non-printable ASCII characters. The control character set is comprised of ASCII
characters whose decimal value is 0-31 and 127. These characters are obtained by
pressing the CTRL key while simultaneously pressing the associated control character.

cursor
The on-screen marker, usually a box or an underline, which indicates the location
where the next data entry is to occur.

data
Information (letters, numbers, symbols) that is entered into the system for processing
or storage.

database repair
The process by which the system manager repairs the internal structure of a volume
group.

default
A value that is assumed as the entry to a prompt if the RETURN key is pressed. In
MSM, default values are displayed within greater than (>) and less than (<) signs
(for example: <DEFAULT>).

descendant
Any array node on a lower subscript level which can be reached from the node and
which shares the first 'x' subscripts in common. For example, the nodes R(3,4,5) and
R(3,6,4,7) are descendants of R(3).

device
Any part of the computer other than the CPU, the memory, or any associated
architectural part, for example: a printer, terminal, or modem.

directory
An alphabetical listing of the contents in the current UCI. MSM uses two types of
directories:
global directory - All global names saved in the current UCI.
routine directory - All routine names saved in the current UCI.

function
An action that streamlines routine operations. In MSM, a function begins with a
dollar sign ($) or with a dollar sign and the letter Z ($Z) for specialized M functions.

252 • Glossary MSM Utility Manual


global
A permanent storage medium used by M. Information is stored in a global array or a
simple global variable and generally is placed on a disk system.

global variable
A reference name for data stored in a global on the disk. Any user with the proper
protection level can access or change global variables.

hardware
The physical components of the computer system other than the software; for
example, the computer itself (monitor, disk drive, and so on), the tape drive, and the
printer.

$HOROLOG
A special variable which contains the current date and time as integer values
separated by a comma.

interpreter
A component of the MSM system which processes the pseudo-machine code
generated by the compiler.

job
Any use of the MSM system that requires a partitioned work space.

journaling
A method of recording global SETs and KILLs while the system is in use. All
information is recorded in a journal entry which can be used to reconstruct a volume
group. This option does not apply to single-user versions of MSM.

line
A string of characters that end with a specified READ terminator (carriage
return/line feed).

line label
An optional name at the beginning of a routine line that identifies that line to MSM.
This label is limited to eight characters and must begin with an alphabetic or percent
(%) character.

local variable
A symbolic name assigned to a data value that exists only for the duration of the
terminal session or routine that creates it. Local variables are unique to each
partition.

MSM Utility Manual Glossary • 253


map block (map)
A disk block that contains a list of block ownership. Each map governs 512 blocks
(each 1024 bytes in size).

modem
Acronym for MOdulator DEModulator. This device converts data to a form which
can be transmitted via a phone line to a remote site, and then reconverted to a form
usable by the remote site processing system.

MSMDR
An MSM utility which is used to take a backup of a volume group or restore a
previous backup copy. Three types of backup can be performed:
full - A complete backup of the entire volume group (mirror-image).
allocated - A dump of all blocks currently in use by MSM.
incremental - A dump of all blocks modified since the last backup was taken.

M[UMPS]
The Massachusetts General Hospital Utility Multi-Programming System. This
system was developed in the late 1960s to handle storage, retrieval, and manipulation
of large amounts of medical data. It is one of only four ANSI standard languages.

node
An element of a global array which is addressed by the name common to all
members of the array and a unique subscript.

parameters
User-specified options for a device.

partition
An area of memory which consists of a logical grouping of the local symbol table,
current routine edit buffer, and work areas used by the system and job. This space
expands and shrinks based on the current job’s requirements.

programmer mode
A system mode which enables you to directly enter M commands to the interpreter.
You must enter a valid UCI and programmer access code (PAC) in order to access
programmer mode.

Prompt
A system-generated message which requires user input.

254 • Glossary MSM Utility Manual


%RELOAD
An MSM utility that recompiles all routines in a UCI after an upgrade.

routines
library Routines - Utility programs that are accessible to all system users.
system manager routines - Utility programs that can be accessed only via the
Manager’s UCI (MGR).

special variables
A group of variables ($ZA, $ZB, and $ZC) that has special meaning to MSM and is
used to specify status information about the results of the last operation performed.

string
Any set of ASCII characters.

Subscript
A numeric-interpreted or string-interpreted value which is appended to a local or
global variable and which identifies a specific element or node in an array.
Subscripts must be enclosed in parentheses. Multiple subscripts are separated by
commas.

SYSGEN
The system generation utility which is used to define configurations to MSM. At
system startup, MSM uses the configurations to initialize the system with the
specified parameters.

terminator
A set of control characters which is used to terminate a READ operation. MSM uses
a default value of line feed, carriage return ($C(10,13), but allows you to modify this
value by using proper parameters associated with the current device.

%TRANS
The data transfer utility which permits communication between MSM and any ANSI
standard M system.
The three-letter designation (uppercase) for a work area within the MSM system.
Each UCI created has its own unique routine and global directory.

user class identifier (UCI)


A three-letter designation (uppercase) for a work area within MSM. Each UCI has a
unique routine and global directory.

MSM Utility Manual Glossary • 255


Utilities
library utilities - Utilities that supply commonly performed functions.
system manager utilities - Utilities that are intended for use by the system manager to
ensure proper system performance. These utilities can be accessed only from the
Manager’s UCI (MGR).

variable
A symbolic name for a location where data is stored. MSM uses the following types
of variables:
global variable - A variable that is stored in arrays for permanent storage on disk.
local variable - A variable that is stored only in memory.
special variable - A variable that holds special meaning to the MSM system.

volume
A file or entire disk in which data (both globals and routines) is stored.

volume group
A collection of one or more volumes grouped together to form a single storage area
for routines, globals, SBP areas, spool space, and so on.

256 • Glossary MSM Utility Manual


Index

$ %HELP utility 2
%HL utility 108
$HOROLOG 4, 6 %INDEX utility 25
$TEST special variable 111 %INDSTR utility 28
$ZCRC function 23 %LOGON utility 109
$ZDATE function %MDMP utility 88
Return four-year digit 110 %MFUNC utility 123
%MODESET utility 110
% %MTCHK utility 114
%NEWED utility 29
%D utility 7 %OS utility 79
%DEBUG utility %PARTSIZ utility 116
Invoking 98 %RCHANGE utility 31
%DEVUSE utility 86 %RCMP utility 32
%DH utility 121 %RCOPY utility 35
%DI utility 8 %RD utility 36
%DO utility 9 %RDEL utility 37
%ECHO utility 13 %RELOAD utility 38
%ER utility 102 %RPRT utility 39
%ERRCODE utility 106 %RR utility 40
%ET utility 4, 107 %RS utility 42
%FGR utility 51 %RSAND utility 43
%FGS utility 52 %RSE utility 44
%FL utility 4 %RSEL utility 45
%FLIST utility 49 %RSIZE utility 47
%GCH utility 54, 126, 146 %SDEV utility 117
%GCHANGE utility 60 %SI utility 90
%GCOPY utility 63 %SP utility 92
%GD utility 65 %SQRT utility 124
%GDEL utility 68 %SS utility 94
%GE utility 4, 69, 144 %T utility 10
%GEDIT utility 71 %TI utility 11
%GL utility 53, 72 %TO utility 12
%GR utility 73 %VIDEO utility 119
%GS utility 74
%GSE utility 75
%GSEL utility 76
^
%GSIZE utility 5, 6, 78 ^%GCMP utility 61
%GUCI utility 87 ^%ZSTIME utility 48
%HD utility 122

MSM Utility Manual Index • 257


< %GCHANGE utility 4, 60
Job priority
<ASYNC> error 110, 111 %HL utility 5
Routines 31
A Checksums
%CHKSUM utility 4, 23
Active jobs Computing 14, 23
%ACTJOB utility 4 Clear
Add Block 134
Entry to block 134 Collating sequence 54, 66, 125
Allocate Command
Block 137, 138 Stepping 99
SBP area 244 Communication utilities 13
ANSI Compare
Conformance 110 Routines 32
Arithmetic utilities 121 Compile
AUTO 161 Routines
AUTO^OLC 149 %RELOAD utility 5, 38
AUTOBACK^OLB 169 Compression
Online 147
B Compute
Backup Checksums 23
Full Computed ratios 231
Volume group 169 Configuration
Online 168 Utilities 155
Baud rate Console
SETBAUD utility 203 Jobs only 207
BCS utility 189, 190 Convert numbers 121, 122
Before-Image Journal 156, 157, 160, 168 Copy
BIJ utility 168 Globals
BLKDMP utility 125 %GCOPY utility 4, 63
Block Routines
Dump %RCOPY utility 5, 35
See BLKDMP utility 125 CPU
Patch 139 Utilization 90, 239
Validate 140 Create
Breakpoint 99 Spool area 246
Command stepping 99 UCI 178
Line stepping 99 Volume group 156
Broadcast Cross-reference routines 25
message Cross-UCI references 110
BCS utility 189
Message D
BCS utility 190 Data
Bullet-proofing 156, 157, 160, 168 Transfer 14
Database
C Maintenance
Cache 195 Add volume 157
Call-by-reference 161 Automatic repair 143, 144
Call-by-value 162 DBMAINT utility 155
Canonic numbers 54 Display 160
Change Expansion 162
Global characteristics Manual repair 132
%GCH utility 4, 54 Reinitialization 159
Global values Rename 163

258 • Index MSM Utility Manual


Repair Disable
DBFIX utility 132 Debugging 101
Utilities 125 Logins 207
Validation 132 Disk
Writes I/O modes 90
Disable 207 Utilization 90, 239
Date DISKMAP utility 140
And time Dispatch queues 108
%D utility 4 Display
%T utility 6 Blocks 125
Display Error codes
%D utility 7 %ERRCODE utility 4, 106
Input Error log
%DI utility 8 %ER utility 4
Output
%DO utility 9 E
DBFIX utility 132
DBMAINT utility 155 Echo characters
Invoking 156 %ECHO utility 4, 13
DDP Edit
Asynchronous errors 111 Global
Deallocate %GEDIT utility 5
Block 137, 138 Global values
Debugging %GEDIT utility 71
Disable 101 UCI 182
Enable 101 Editor
Interactive Global
%DEBUG utility 98 %GEDIT utility 71
Decimal 121, 122 Enable
To hex Debugging 101
%DH utility 4, 121 Environmental flags
Delete %MODESET utility 5
Entry from block 135 Environmental variables 100
Globals Erase
%GDEL utility 4, 68 Screen
Routines On WRITE # 111
%RDEL utility 5, 37 Error
SBP area 245 Codes 106
Device %ERRCODE utility 4
Descriptor Block Debugging 98
Host File Server 199 Display 102
Magnetic tape 199 Erase 104
Sequential Block Processor 199 Print 104
Terminal 199 Report
VIEW device 199 %ER utility 102
In use Summarize 105
%DEVUSE utility 86 Trap
IRQ level %ET utility 107
STUIRQ utility 170 Trapping 107
Select VALIDATE utility 151
%SDEV utility 117 Escape
Selection Processing 112
%SDEV utility 6 Examine
Directory Job
Global 65 JOBEXAM utility 191
Routine 36

MSM Utility Manual Index • 259


Extended global directory list Fast restore
%GDE utility 4 %FGR utility 4
External Fast save
To internal date %FGS utility 4
%DI utility 4 Histogram 217, 218
To internal time List
%TI utility 6, 11 %GL utility 5, 53, 72
Maintenance
F GBMAINT utility 143
Placement
Fast global GBPLACE utility 146
Restore Pointer 128
%FGR utility 4, 51 Repair
Save DBFIX utility 132, 144
%FGS utility 4, 52 Restore
Fetch %GR utility 5, 73
Null subscripts 111 Save
File %GS utility 5, 74
List Search
%FLIST utility 4, 49 %GSE utility 5, 75
First line list Select
%FL utility 24 %GSEL utility 5, 76
Free Size
Space 137 %GSIZE utility 78
Free space Transfer 14
%SP utility 6, 92 %TRANS utility 6
Translation 173
G Undefined nodes 112
Utilities 49
GBMAINT utility 143 Validation 151
GBPLACE utility 146 Global
Generating the system Replication 173
SYSGEN utility 171, 174 Growth values 54, 56, 126
Get UCI information
%GUCI utility 87
H
Global
Change Help
%GCHANGE utility 4, 60 Information 2
Characteristics Utilities 5
%GCH utility 4, 54 Hex to decimal
Compare %HD utility 5, 122
^%GCMP utility 61 Hexadecimal 121, 122
Copy Block list 139
%GCOPY utility 4, 63 HFS
Data 126, 129 DDB 199
Delete Host file
%GDEL utility 4 List
%GDEL utility 68 %FLIST utility 4
Directory 127 Server
%GD utility 4, 65 Select 117
Edit Host File System
%GEDIT utility 5, 71 List 49
Efficiency 144 Host spooling device 117
%GE utility 4, 69 Index
Extended directory list Routines
%GDE utility 4 %INDEX utility 5, 25

260 • Index MSM Utility Manual


%INDSTR utility 28 Logging errors
Initialize %ET utility 4
Spool Area 247 Logon to system
Interactive debugging %LOGON utility 5, 109
%DEBUG utility 4
Internal M
To external date
%DO utility 4 Magnetic tape
To external time %MTCHK utility 5, 114
%TO utility 6, 12 DDB 199
IRQ level Selecting 117
STUIRQ utility 170 Managing UCIs
UCIMGR utility 178
Map
J
Block 131
Job Verification 154
Execution utilities 97 Buffer pointers
Priority MAPBP utility 195
%HL utility 5 Device descriptor
Change 108 MAPDDB utility 197
JOB Disk blocks
Command 111 DISKMAP utility 140
JOBEXAM utility 191 MAPBP utility 195
Journal MAPDDB utility 197
Utilities 243 Mathematical functions
Journaling 54, 58, 66, 125, 131, 207 %MFUNC utility 5, 123
Suspend 207 Memory
Dump
K %MDMP utility 5, 88
Patch
KILLJOB utility 193 MPATCH utility 200
Mode flags
L %MODESET utility 5, 110
Modifying %TRANS 14
Library Monitor
Utilities 3 Job 201
Line Terminal session
Length 111 PEEK utility 201
Stepping 99 Monitoring
List Performance 209
Block contents 133 Monitoring run 211
Global directory Mount
%GD utility 4 Volume group 160, 161, 162
%GL utility 5, 53, 72 MPATCH utility 200
Replication table 174 MSM-NET 164
SBP area 244 MSMSHELL
Spool area 248 Programmer prompt 110
Translation table 173
Local N
Undefined nodes 112
LOCK table Networking
Display Asynchronous errors 110
LOCKTAB utility 194 Null
Recovery Subscripts 111
RECOVLK utility 202 Number conversions
LOCKTAB utility 194 Decimal to hex 121

MSM Utility Manual Index • 261


Hex to decimal 122 R
Record terminal session 22
O Recover
Offset Lost blocks
Into block 136 RECOVER utility 150
OLB utility 168 RECOVER utility 150
AUTOBACK^OLB 169 RECOVLK utility 202
OLC utility 147 Remote volume group 161, 164
Autostart entry point (AUTO^OLC) 149 Asynchronous errors 111
Internal entry point 149 Remove
Invoking 147 Spool file 249
Online backup 168 Rename
Online compression Global 63
Activate 147 Repair
Deactivate 147 Global 132, 143, 144
History log Replicating
Print 148 Globals
Reset 149 TRANSLAT utility 173
OLC utility 147 Replication
Resume 148 Table
Status 148 Editing 174
Open Listing 174
Devices Report
%DEVUSE utility 4 System performance 214
Operating system Reset
Functions SBP area 245
%OS utility 5 Restore
Interface Globals
%OS utility 79 %GR utility 5, 73
Routines
%RR utility 5, 40
P Restrict VIEW command 207
Parity 203 Routine
Partition Change
Size %RCHANGE utility 5, 31
%PARTSIZ utility 5, 116 Checksum
Patch %CHKSUM utility 23
Block 139 Compare
P-code 165 %RCMP utility 5, 32
PEEK utility 201 Compile
Performance %RELOAD utility 5, 38
Monitor Copy
RTHISTutility 209 %RCOPY utility 5, 35
Monitoring 209 Data 130
Pointer Debugger
Block 126 %DEBUG utility 4
Right link 136 Delete
Print %RDEL utility 5, 37
Routines Directory 130
%RPRT utility 5, 39 %RD utility 5, 36
Programmer Editor date
Prompt 110 %NEWED utility 5, 29
Protection First line list
Attributes 54, 56, 66, 126 %FL utility 4, 24
Prevent KILL 59 Header 130

262 • Index MSM Utility Manual


Histogram 215 Routines
Index %RSEL utility 6, 45
%INDEX utility 5, 25 Sequential Block Processor 131
Line length 111 %SBP utility 89
Print SBP utility 243
%RPRT utility 5, 39 Selecting 117
Restore SETBAUD utility 203
%RR utility 5, 40 Shutdown
Save Emergency 207
%RS utility 5, 42 System 207
Search Size
%RSAND utility 6 Globals
%RSAND utility 43 %GSIZE utility 78
%RSE utility 6 Routine
%RSE utility 44 %SIZE utility 47
Path 187 Software
Select Mode switches
%RSEL utility 6, 45 SWREG utility 207, 208
Size SPL utility 246
%RSIZE utility 47 Create area 246
Structured index Free area 247
%INDSTR utility 28 Initialize area 247
Transfer 14 List area 248
%TRANS utility 6 Remove spool file 249
Utilities 23 Start despooler 249
Validation 151 Stop despooler 249
RTHIST utility 209 Spooling
Invoking 210 Disable 248
Enable 248
S System
SPL utility 246
Save Utilities 243
Globals Square root
%GS utility 5, 74 %SQRT utility 6, 124
Routines SSD utility 204
%RS utility 5, 42 Start
SBP Despooler 249
DDB 199 Status
Status System
%SBP utility 6 %SI utility 90
Utility 89, 243 %SS utility 94
Allocate area 244 CPU utilization 90
Delete area 245 Disk utilization 90
List area 244 Utilities 85
Reset area 245 Stepping mode
Search Into subroutine 100
Globals Over subroutine 100
%GSE utility 5, 75 Stop
Routines Bits 203
%RSAND utility 6, 43 Despooler 249
%RSE utility 6, 44 Structured routine list 28
Select STU utility 206
Device STUIRQ utility 170
%SDEV utility 6, 117 Subscripts
Globals Null 111
%GSEL utility 76

MSM Utility Manual Index • 263


Suspend Time
Journaling 207 And date
Switch %T utility 6
Register 207, 208 Display
SWREG utility 207, 208 %T utility 10
SYSGEN utility 155, 171, 174 Transfer data 14
System TRANSLAT utility 173
Configuration parameters 234 Translatation
Database repair (DBFIX) 132 Table
Device use (%DEVUSE) 86 TRANSLAT utility 173
Error report Translation
%ER utility 102 Disable 177
Free space Enable 177
%SP utility 6, 92 Table
Generation Editing 175
SYSGEN utility 171 Listing 173
Get UCI (%GUCI) 87
Logon U
%LOGON utility 109
Manager utilities 3 UCI
Memory dump (%MDMP) 88 Create 179
Mode switches Delete 184
%MODESET utility 110 Edit 182
Monitoring 209 Index 178
Operation List 182
Utilities 189 Name 87, 178
Partition size Number
%PARTSIZ utility 116 %GUCI utility 5
SBP status Rename 182
%SBP utility 89 Routine search paths 187
Shutdown 207 UCIMGR utility 146, 178
SSD utility 204 Undefined nodes 112
Startup 207 Unmount
STU utility 206 Volume group 162
Statistics 219 User
Status Logon identification 185
%SI utility 6, 90 Utility
%SS utility 6, 94 Common routines 3
Library 3
Menu 6
T
System manager 3
Tape System-supplied 4
Device
Status 114 V
Terminal
Baud rate Validate
SETBAUD utility 203 Block 140
DDB 199 Database
Emulator 21 VALIDATE utility 151
%XMIT utility 6 VALIDATE utility 151
Response time 236, 238 Errors 151
Terminate Variable
Job Environmental 100
KILLJOB utility 193

264 • Index MSM Utility Manual


Verify
Block 138
Map blocks
VERIFY utility 154
VERIFY utility 154
Video
Buffer modifications
%VIDEO utility 6, 119
VIEW
Command
Restriction 207
DDB 199
Volume group
Add volume 157
Characteristics 165
Create 156
Defining 155
Display 160
Expand volume 162
Full backup 169
Index 161
Mount 160, 161, 162
Reinitialize volume 159
Remote (RVG) 164
Rename volume 163
Unmount 162

Z
ZSAVE
Date
And time
Display
^%ZSTIME utility 48

MSM Utility Manual Index • 265

You might also like