COMMENT
DECPage using RSP1 (or GEN1)

DM Installation Instructions

Directory Management Utility

DM Version 8.0A

October, 1988

** If you are using VMS Version 5.x **
DM Version 8.0 is the first version which works correctly with VMS V5.0.  Changes to SMG$ caused some problems (particularly with the "tree" function) which have been corrected.

** If you are using VMS Version 4.x **
DM Version 8.0 has been thoroughly tested on VMS V5.0.  The .EXE file supplied was linked on VMS V5.0 - but you can use DM_LINK.COM to re-link for VMS V4.x.  Then re-link under VMS V5.0 when you upgrade VMS.
If you have access to DM Version 7.3A, it is recommended that you continue to use it until you upgrade to VMS V5.0, at which time you should install DM Version 8.0.  Although our testing did not show any problems using DM V8.0 with VMS V4.x, you should be aware that this testing was less thorough than with VMS V5.0.

Installation using Defaults
If you use a TPU-based editor (EVE, WPE, etc.), and if the command PRINT is appropriate for the default printer on your system, you should not need to do any customization to DM.  You may wish to read the section "Integration with Editors".
To install non-customized DM:

	oo  Edit DM.COM - Change the line indicated "LOCAL" to point to the directory where you will place the file DM.EXE.
	oo  Follow Steps 3 through 7 in Installation (with FORTRAN Compiler) below.

Installation (with FORTRAN Compiler)
0.  You must select a system default Editor, Viewer, and Printer.  (A "Viewer" is something with the functions of an editor, but which is read-only [i.e., will not change the file]).
	oo  The as-built default editor is "TPU".  We use a TPU-based editor which we call "WPE", but any TPU-based editor (such as EVE) will work with this default.  If that is satisfactory, you won't have to change this default.
	oo  The as-build default "Viewer" is "TPU".  The "Viewer" can actually be any editor (thus eliminating the difference).  We use a read-only version of WPE called "MORE".  TYPE would also work, but isn't too elegant.  If you are using WPE (or EDW), the editor will be called correctly.  Other TPU-based editors (including the EVE editor) will be called with the /READ_ONLY qualifier.  If that is satisfactory, you won't have to change this default.
	oo  If "PRINT" works at your site, you won't have to change the default printer.
	oo  There are two ways to change the defaults (if necessary) - you may put them in DM.COM or DM.FOR; I recommend putting them in DM.FOR, and this is the procedure outlined below.
	oo  Before you adapt this to your site, please read the section "Integration of Editors" later in this document.

1.  Edit the following files:

	oo  DM.COM - Change the line indicated "LOCAL" to point to the directory where you will place these files. 
	oo  COMMON.DAT - Edit the information marked "LOCAL" to indicate where you will put the DM Help Library (if it will not be SYS$HELP:DM.HLB).
	oo  DM.FOR - At the start of the program (there are a lot of comments before you get there), edit the information for Default_Editor, Default_Viewer, and Default_Print_Command to the values you have selected.  Note that you probably have to change the sizes of the Character variables with these names, also.

2.  Do @DM_Install.  This will compile DM.FOR and link a new image.
3.  Place the files in the appropriate place.  The files necessary for running DM are:
	DM.COM  
	DM.EXE  (This may be installed if you wish)
	DM$ATPRINT.COM  (Attached Printer Controller)
	DM.HLB  (this is usually placed in SYS$HELP)
	DM_USER_DOC.TXT  (in SYS$HELP)
4.  Point appropriate system symbols.  This is usually done in your system-wide login procedure.  Note that these are both .COM files.  On our system, we use the following:
	DM	:==	@Sys$Utils:[DM$SD]DM
	DM$ATP	:==	@Sys$Utils:[DM$SD]DM$ATPRINT
5.  You can check that you did it correctly by typing DM.  Then, when the DM screen comes up, type <Gold> A (or PF1 followed by A).  This should show you the default settings you have made.
6.  You will probably want to publish the user's guide.  It is present in three forms: a .WPL file if you have WPS+, a .LN03 file if you have an LN03 printer, and a .TXT file.
7.  If you wish to add help to your help library, the file DM.HLP is available.

Installing (customized) without a FORTRAN compiler
1.  Edit DM.COM as indicated in Step 1 above.
2.  Either in your SYLOGIN.COM (best) or in DM.COM, define (if necessary):
	DM$Editor :== your editor
	DM$Viewer :== your viewer
	DM$Print_Command :== your default print command

3.  Follow steps 3 thru 7 above.

Integration with Editors
DM considers TPU, WPE, EDW, and MORE to be "special" symbols for Editor and Viewer.  If these are the default values, DM will use callable TPU for its interface.  If you use a TPU-based editor on your system, you will not have to change these symbols.  However, you must have the logical symbol TPU$SECTION defined correctly:
If TPU$SECTION is undefined	DM uses the default interface to TPU (EVE).
TPU$SECTION defined for WPE	If the logical contains the characters 'WPE' or 'EDW', DM assumes that the interface is really 'WPE' (contained with this distribution).
TPU$SECTION defined otherwise	DM uses your defined .TPU$SECTION

	The logic for "Editor" is:
	If "Editor" = TPU or WPE or EDW then
	Edit/TPU
	Else
	Spawn 'Editor'
	EndIf
	The logic for "Viewer" is:
	If "Viewer" = TPU or MORE then
	If TPU$SECTION = WPE or EDW then
	Edit/TPU/NoJournal 
	Else
	Edit/TPU/Read_Only
	EndIf
	Else
	Spawn 'Viewer'
	EndIf
If these options don't suit, you may either use names other than those shown, or edit the logic in ENVOKE.FOR to meet your needs.

Integration with VMS Mail
Pressing <Gold> M runs VMS Mail (VAXMail) in the DM subprocess.  The action taken depends on the definition of the logical MAIL$EDIT.
Using VMS V5.0, MAIL$EDIT is not normally defined - therefore, the user has full choice of mail editor.
If MAIL$EDIT is defined (as anything), DM requires that it be a callable editor.  If the logical symbol MAIL$EDIT does not contain the characters 'CALLABLE', DM defines MAIL$EDIT in the subprocess to be 'CALLABLE_TPU'.
The comand passed to the subprocess is MAIL.  Since symbols are known to the subprocess, this command may equate to anything you wish (for instance, MAIL/EDIT=(SEND,REPLY=EXTRACT).

Integration with SD
If you install both DM and SD on your system, DM will integrate automatically with SD.  You do not have to take any special actions.  Exiting from DM will update SD's stack, so you will not get the "Unexpected Stack Environment" message from SD.

Re-Compiling
There are command procedures for re-compiling and linking the whole of DM.  There are separate files for compiling with and without the limits-checking.  The version submitted to DECUS was compiled without checking:
	CPL and CPL_CHECK         compile/assemble everything.
	DM_LINK                   links DM
	DOALL and DOALL_CHECK     compile and then link.

Additional Information
See the files DM_USER_DOC and DM_PROGRAMMER_DOC for details of usage and adding functions.

New Features in V7.3A and 8.0A
The <Gold>-A menu in DM now provides for saving the user's default Editor, Viewer, Print_Command, and Printer_Type in SYS$LOGIN:DM_DEFAULTS.COM.  This file (if it exists) is used by DM to establish defaults.  It is a fixed-field file, and should not normally be edited.  DM first looks for DM_DEFAULTS.COM.  If that fails, DM examines defined symbols.
Tree print now uses DEC's line-drawing character set if the printer supports it.  You may add additional printer types in DM_TREE.FOR, if you have other requirements.
In addition to correcting for "features" of VMS 5.0, DM V8.0 adds the ability to efficiently use any TPU-based editor.  It is particularly well integrated with the WPE editor.

Highlighting
The DM Main and Tree displays normally highlight (bold) entries as your cursor moves through the display.  In certain circumstances, you may wish to disable this feature.  You might want to do this if your terminals do not support highlighting, or if you are using a slow baud rate (highlighting does take time).  To eliminate dynamic highlighting, define a symbol:

	$ DM$HIGHLIGHT :== N

Test Files
In the .DM$SD directory, there are several .DIR files:
	A_JUST_LONGENOUGH.DIR and A_LONGER_DIRECTORY_NAME_TEST.DIR are there to check the DM * function.
	A_FAKE.DIR and B_FAKE.DIR are there to check the capabilities of DM to detect and handle .DIR files which really aren't directories.
	TEST_FILES.DIR actually contains some files we used for testing.

Feature for System Managers
The <Gold> D (new device) has an additional option which is useful for system managers.
At the "Enter New Device or Directory" prompt, editing the supplied response to @Username will place you in the login directory for the specified user.  This facility of DM is not documented in the Users' Guide.
The capability is normally implemented by accessing SYSUAF.DAT, and therefore only certain users will be able to use it.
There is an optional alternative provided - to use the file SYS$SYSTEM:SYSUAF.LIS, which can be created using the LIST/BRIEF command from the Authorize utility.  The file will usually not have world read access.  If you want normal users to have access to the @ facility of DM, you can change the protection on the file, edit it to delete critical entries, etc.
To implement this alternative, locate (in STACK.FOR) the line "Call DM_UserName_UAF ()" and exchange it for the adjacent line, which is "Call DM_UserName_List ()".  Then rebuild DM.  

Known Bugs

Attribution
Directory Manager was initially submitted in January 1983 by John C. Hayre, Texas Instruments (later with Veeco Integrated Automation, Dallas).
Additional extensive improvements and submissions were made by Rich Gregory, Pharmaceutical Research Associates, Charlottesville, VA.
The version spun-off in 1986 (now Version 8.0A), which incorporated an All-In-1-like user interface and use of the SMG$ utilities for screen management is by Dale E. Coy, Los Alamos National Laboratory, Los Alamos, NM 87545. (505) 667-3270/665-0145

COMMENT
DecPage using RSP1 (or GEN1 or GEN2) format

DM Users' Guide

Directory Management Utility

DM Version 8.0A

October, 1988

DM is a utility which allows you to more easily manage, clean up, and otherwise work with your files and directory structure.
DM works with VT2xx and VT3xx series terminals.  Your VT2xx/VT3xx setup must be some variant of VT2xx/VT3xx.  It should also work correctly with VT1xx terminals.  With terminal emulators on PCs, and with VT100-lookalikes, you're on your own.  

Using DM

Running DM:  from the VMS prompt -
	$ DM

Exiting DM:  from any "main" DM menu, just press "Q" (single character).  [The F10 key, <GOLD> K and <GOLD> F also have the same effect].  You will be returned to the directory from which you began DM.  (If you want to stay in the presently-displayed directory, press X).

Getting Help:  Run DM.  Press PF2, the Help key, or ?

DM has been improved and submitted to DECUS by a succession of writers including John C. Hayre, Rich Gregory, and Dale E. Coy.
Constructive suggestions, "bug reports", etc. should be referred to the system manager.

Main Screen
When you access DM, you will see a presentation of the files in your current directory.
On line 23 is a reminder of your current direction of movement, the current directory, and the current wild-card.
On line 24 is a brief list of the single-character commands.
Most commands work by placing the "highlighted" area on the file of interest, and then doing the command.  Some commands also work using "tagged" files (described later).

Help
DM may seem complex, but complete help is available.  The "Help" key, the PF2 key, the ? key, and <GOLD> H, may be used to access the help menus.  There are 4 help screens available for the various functions.  Press Return to return to the main screen.  [Note: <Gold> means to press the <Gold> (PF1) key, and then press another key].
Text descriptions are available for must functions.  While you are in one of the 4 help screens, press "Help" or PF2.

Commands
Commands use the normal keys, keypad, and function keys.  Where a normal key is specified, you may use either upper or lower case.  Commands are usually single-keystroke (you do not have to use the Return key to complete the command).

DM Single-Keystroke Commands

Simple Movements Around the Screen
Use the Up and Down Arrow keys to highlight the file names.  There are about a dozen more ways to move within the directory, described under "Advanced Movements" below.

Movements Between Directories
To move Down in a directory tree, highlight the .DIR file and press either Select key (function key or KP.).  The V and E keys will also work.
To move Up in a directory tree, press the "Upper Case" (KP3) key on the keypad.  In this case the highlighted file makes no difference.

Information About Files
You may get information about any file (size, creation date, owner, protection).  Since this involves opening the file, operations are somewhat slower.  Press I to display information about single files as they are highlighted.  Press M to display information about all files.  From either of these states, press L to get back to the regular display.
You may get "full" (DIR/FU) information on individual highlighted files (or "tagged" files) by pressing <Gold> I.

Editing & Viewing Files
To Edit or View a file (Viewing is read-only), use the following commands.  Your system manager has selected a default editor and viewer for your use.  Note that the highlighted file must not be a .DIR file:

	E	- to Edit.
	V	- to View.
	Select	- to Edit (this is the function key "Select").
	Sel	- to View (this is KP. or "Sel").	
	F	- to FMS edit a file (of type FRM, FLG, or FLB).

Tagging and Untagging Files
Files may be "Tagged" so that multiple files may be Deleted, Printed, Renamed, or Copied.  To Tag a file, highlight it and press T (the tag symbol will appear).  To Untag a file, highlight it and press U.  Tags will "disappear" if you do some operation which requires reloading the directory (edit, view, $, %, etc.).  Therefore, it is best to do the tagging just before you do the associated operation.

Deleting Files & Directories
Single highlighted files may be deleted by pressing D or the Remove key or F13.  You will be asked to confirm the deletion.
Tagged files may be deleted in the same way.  You will be given an overlay menu with choices for All, Confirm, and Quit.
Single and Tagged directories may be deleted in the same way.  In this case, the entire directory tree is handled.
Regardless of whether you have tagged files at the moment, you may delete a single file by pressing F6.  You will be asked to confirm the deletion.

Copying Files
You may copy files (highlighted or tagged) from the current directory.  Press either C or <Gold> W.  You will be prompted for the file destination.
To copy files into the current directory, press either <Gold> G or "Insert Here".  You will be prompted for the source file names.  Any legal VMS filenames (including wildcards) will work.

Printing Files
You may print files (highlighted or tagged).  Press P to print files.  The files will be printed on the default device (see below for how to change it).

Printing the DM Directory
Print the DM directory (the screen display) by pressing <Gold> P.

Purging Files
To purge files, press G.  Only the files shown by DM will be purged.  (See below for how to change your wildcard).

Renaming Files
You may rename single (highlighted) files by pressing R.
You may also rename tagged files.  Any legal VMS "target" name may be used.

Finding Files (Searching)
Search for files by any substring of the file name (such as XYZ or .TXT).  This is not a wildcard function, so don't use the '*' character.
For the first search, press <Gold> , (yes, the comma key) or the "Find" key.  You will be prompted for the search string.
For subsequent searches on the same string, press <Gold> . (Cont Srch) or PF3.  You may also press Find twice to search for the same string.

Executing .COM Files
.COM files may be executed by pressing @.  The .COM file is executed in a subprocess.

General Rules for Functions
If you are prompted for an answer, DM will either give you a single prompt character ($ or >), or will supply the present setting for a variable.
You may usually use the Up Arrow to recall your previous responses to a question, and then edit the response.  This function is similar to the VMS command recall function.
If you are prompted to edit the present entry, you may do so or may use <Ctl> U to erase it and start over.
In some menus, you are not told how to exit the menu.  Almost any key will get you out (for instance, <CR>).

Changing the Wildcard
Press W.  You will be prompted to edit the current wildcard used for files display (Default for "all" is '*').  You may use any legal VMS wildcard string.

DM Advanced Movements
Because movements on the screen are the most frequent operations, there are many functions to simplify this job. (NOTE: <Gold> in the following commands indicates that you should press the <Gold> (or PF1) key, and then press another key).

	A	- Moves the cursor to the top of the screen.
	Z	- Moves the cursor to the bottom of the screen.
	<Gold> T	- Moves to the Top (first screen of files).
	<Gold> B	- Moves to the Bottom (last screen of files).
	Prev	- Moves "Up" one screen.
	Next	- Moves "Down" one screen.
	F11	- Toggles the direction of movement (Fwd/Rev).
	Backup	- Sets movement to Reverse & moves 1 line Up.
	Advance	- Sets movement to Forward & moves 1 line Down.
	<CR>	- Moves one line in the present direction.
	Para	- (KP5) Moves one screen in the present direction.

There are a few more movement functions - see the Help screens.

Advanced Directory/Device Movements
You may move upward in the directory tree structure until you reach the [000000] level (if you have "read" access to the directory file).  After you reach the top level, DM will ask you to enter the name of another device or directory.  A <CR> will leave you in the current device.
You may change disk devices at any time by using <Gold> D.  You will always be placed at the top level if you specify only a new device.  This is also a quick way to get to the top level on the current device.
You may also specify a directory (on the current device), or a complete device and directory.  If you make an error in specification, you will usually be placed in the top level of the device.
If you have a "Rooted Directory" structure, DM will handle upward movements.

Displaying the Subdirectory Structure
You may display a schematic map of the subdirectories below your current level by pressing *.  Move around the display by using the arrow keys, and use 'Sel' or Return to change your current directory.  This function has it's own help - accessed by pressing PF2.
Print the subdirectory tree (the screen display) by pressing <Gold> P.
Change the printer parameters by pressing <Gold> A.

Advanced DM Functions

Wildcard File Deletes
If the Wildcard is set to something other than '*', the delete-directory function will delete only files.  Therefore, to delete all .LIS files, set the wildcard to '*.LIS', go to the appropriate .DIR file, and press D.

Single DCL Commands
There are two environments for doing DCL commands from DM; in a subprocess, and in the main process (outside DM).  Using the subprocess is more efficient, but you can't respond to a question from DCL (e.g., COPY where you want to supply a file name to the prompt).
To use the subprocess, press $ or the "Do" key.  You will be prompted for the DCL command.  You may include the highlighted file in your DCL command by entering \ at the appropriate spot in the command.  You may include tagged files by entering \\.
To do the DCL command in the main process, type %.  Note that your context is the current DM directory, and you may only do a single command.

Multiple DCL Commands
You may execute multiple commands (in the subprocess) by pressing <Gold> $, <Gold> Do, or <Gold> [.  An "empty" <CR> will return you to DM.

Messages and Mail
Messages from the system (broadcasts) are automatically saved by DM, and are displayed for you when you exit.  You may choose to read them without leaving DM.
If you are sent a message by the system (e.g., mail notification), a notification will appear at the bottom of the screen.  You will be notified of the first message to arrive, and every 20th message thereafter.  If you want to read your messages without leaving DM, press the ! key.  NOTE: All of your messages will be scrolled; if you have lots of messages, be ready with the "hold screen" key.
You may run VMS Mail (VaxMail) by pressing <Gold> M.  If you want to send mail, you will normally be using the mail editor you use outside of DM.  If this is not the case, see the system manager for help.

Changing Defaults
When you enter DM, you will be given default values for DM's Editor, Viewer, Print Command, and Printer Type.  You can change these by pressing <Gold> A.  The changes you make will remain for the duration of your login session (even if you exit and re-enter DM).
The <Gold> A menu also provides an option for saving your own preferred default values.  Your saved defaults will be retained for future login sessions.

Attached Printers
If you have an LA50 or LA100 (or more recent DEC printer) attached to your terminal, you can define DM's Print Command to use the attached printer.  Using the <Gold> A menu, set the Print Command to (spaces are important):
	DM$ATP	- to print using the printer's normal mode.
	DM$ATP DM$LQ	- to print in "Letter Quality" mode.
	DM$ATP DM$COMPRESSED	- to print in compressed mode.
	DM$ATP DM$12	- to print at 12 characters per inch.

Re-Defining Symbols in your LOGIN.COM
Normally, when you enter DM, you will be given system default values for DM's Editor, Viewer, and Print Command.  If you always want to use something different from the system defaults, you can establish your own defaults by creating symbols in your LOGIN.COM file.  Unless you need the special capabilities provided by defining symbols in your LOGIN.COM file, it is preferable to use the Save option on the <Gold> A menu to preserve your defaults.  The Save function provides the same effect, and is more efficient.
The applicable symbols are:
	DM$EDITOR
	DM$VIEWER
	DM$PRINT_COMMAND
	DM$PRINTER_TYPE

For instance, you might put the following lines in your LOGIN.COM file:

	DM$EDITOR :== EDIT/TPU/SECTION=ABC.TPU$SECTION
	DM$VIEWER :== @SYS$LOGIN:MYEDITOR FOO BAR
	DM$PRINT_COMMAND :== PRINT/QUEUE=MY_PRINTER/FORM=PAYCHECK
	DM$PRINTER_TYPE :== LN03

Note that blanks are permitted; DM will add one space and the selected file name(s) to the end of your defined symbol, and pass this to a subprocess.
There is one more "trick" to this: If you use :==, DM will save any changes you make with the <Gold> A menu for the duration of your login session.  If you use :=, DM will re-initialize to your defaults each time you re-enter DM.

Using a TPU-Based Editor
If the DM$Editor symbol is 'TPU', 'WPE', or 'EDW' (or the DM$Viewer symbol is 'TPU' or 'MORE'), DM expects to use a tpu-based editor.  This is very efficient (callable TPU is used, and no subprocess is involved).  You can control which edit interface (TPU Section File) is used by defining TPU$SECTION in your LOGIN.COM file.
If you want to use the EVE interface, which is the default, you should make sure that TPU$SECTION is not defined.
Consult the system manager if you want to use the WPE interface.
If you use a TPU-based editor other than EVE, WPE, or EDW, you may simply:
	DEFINE TPU$SECTION disk:[directory]YOUR.TPU$SECTION
This definition you need may already have been made by your system manager.  In any case, the system manager can provide advice.

Highlighting
The DM Main and Tree displays normally highlight (bold) entries as your cursor moves through the display.  In certain circumstances, you may wish to disable this feature.  You might want to do this if your terminal does not support highlighting, or if you are using a slow communication rate (highlighting does take time).  To eliminate dynamic highlighting, set a symbol:

	$ DM$HIGHLIGHT :== N

Command String Options
If the SD (set/show default) utility is available on your system, SD commands may be included as parameters when DM is invoked.  For example:

	$ DM ^ ^
	$ DM .SUB1.SUB2

If this option is used, you will be returned to the original directory when you exit from DM.

Summary of DM Keys and Functions

Regular Keyboard Commands

(Listed in the order they appear on the "menu")

$	-	Do a single DCL command (using Spawn).
%	-	Do a single DCL command (in the context of the current directory).
@	-	Execute the selected .COM file.
*	-	Show (and select from) SubDirectory Tree.
A/Z 	-	Go to Top/Bottom of screen.
W	-	Select a new wild-card for display of files.
T	-	Tag a file - Used in D, C, P, R, <Gold> I, $, and %
U	-	Untag a file.
Q	-	Quit (Returning to starting directory).
X	-	Exit (In currently-shown directory).
R	-	Rename current file or tagged files.
V	-	View current file, or GoTo .DIR
E	-	Edit current file, or GoTo .DIR
F	-	FMS
M	-	Show all file information.
I	-	Show information for selected files only.
L	-	Show less information (file names only).
D	-	Delete file(s)
C	-	Copy file(s) [to another name or another directory].
G	-	Purge the current files.
P	-	Print file(s) on default printer.
<CTL> W	-	Refresh screen.
S	-	View.
?	-	Help (on the normal keys)
!	-	Read all saved messages.

Gold Commands
GOLD T - Go to the Top of the Directory.
GOLD B - Go to the Bottom of the Directory.
GOLD F, GOLD K - Quit.
GOLD G - Get file(s) [from another Directory].
GOLD H - Help.
GOLD SEARCH - (<Gold> ,) Find text string in file names.
GOLD CONTINUE SEARCH -  (<Gold> ,) Find previous string.
GOLD $ or [ - Go out to DCL for commands.
GOLD W - Copy files from this directory (write).
GOLD P - Print the DM Directory.
GOLD A - Change default editor, viewer, or printer.
GOLD D - Change to another disk device and/or directory.
GOLD I - DIR/FU on files.
GOLD M - VMS Mail

Keypad Functions
1) The inner keypad (with the arrow keys) works as it is labeled:

	Up and Down Arrows	Move the highlighted area. (Left and Right arrows do nothing)
	Find	Search file names for a text string.
	Insert Here	Copy files into this directory.
	Remove	Delete file(s).
	Select	Either Edit for a regular file, or "Go to this directory" for a .DIR file.
	Prev Screen	Up a screen.
	Next Screen	Down a screen.
 
2) The right keypad works a little like WPS+

	PF1	Gold
	PF2	Help
	PF3	Find Next (Search)
	Upper Case (PF3)	Go UP one directory in the tree. 
	Sel	Either View (More) for a regular file, or "Go to this directory" for a .DIR file.
	Sent, Tab Pos,	Go one line in current direction.
	Line, and Enter	 
	Para	Go one screen in current direction.
	Backup, Advance	Set direction and/or move one line.
	<Gold> PF3	Find
	<Gold> Backup	Go to top screen.
	<Gold> Advance	Go to bottom screen.

3) Function keys F6 thru F16 have functions as follows:

    F6      F7      F8      F9      F10
 ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
 ³DELETE ³       ³       ³       ³       ³
 ³ THIS  ³       ³       ³       ³ EXIT  ³
 ³ FILE  ³       ³       ³       ³       ³
 ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ

                   F11     F12     F13     F14
                ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄ¿
                ³FORWARD³ MOVE  ³DELETE ³       ³
                ³REVERSE³  UP   ³ FILE  ³       ³
                ³ TOGGLE³1 LINE ³       ³       ³
                ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÙ

                                     F15         F16
                                  ÚÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
                                  ³       ³               ³
                                  ³ HELP  ³      DO       ³
                                  ³       ³               ³
                                  ÀÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
                                             DO = 1 DCL Command

KEY LABELS FOR VT2xx and VT3xx TERMINALS
The WPE labels are reproduced here.  Some of the functions (F6, F10-F13) labeled are similar to DM functions.
Reduce this page to about 74% to properly fit the key strip on VT2xx terminals.

ÚÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄ¿
³Delete Line³   Quote   ³ Cap Word  ³           ³           ³
ÃÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄ´           ³    Exit   ³    F6 -F10
³Undelete Ln³   Escape  ³Upper Word ³           ³           ³
ÀÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÙ

ÚÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄ¿
³  Forward  ³   Move    ³Erase Word ³  Insert/  ³
³  Reverse  ³    by     ÃÄÄÄÄÄÄÄÄÄÄÄ´Overstrike ³                F11-F14
³  Toggle   ³   Line    ³ Rub Sent. ³  Toggle   ³
ÀÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÙ

ÚÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄ¿
³           ³ 2 Windows ³ Other Buf.³  Delete   ³ (Normal Functions)
³ 1 Window  ÃÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄ´    to     ³ ÄÄÄÄÄÄÄÄÄÄÄÄÄÄ F17-F20
³           ³ Get File  ³  Buffer   ³End of Line³ (Gold Functions)
ÀÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÙ

For VT300s and LK250 keyboards: (reduce to 65%)

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³ Delete Line ³    Quote    ³  Cap Word   ³             ³             ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´             ³     Exit    ³
³Undelete Line³    Escape   ³ Upper Word  ³             ³             ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³   Forward   ³    Move     ³ Erase Word  ³   Insert/   ³
³   Reverse   ³     by      ÃÄÄÄÄÄÄÄÄÄÄÄÄÄ´ Overstrike  ³
³   Toggle    ³    Line     ³Rub Sentence ³   Toggle    ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³             ³  2 Windows  ³Other Buffer ³   Delete    ³
³  1 Window   ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄ´     to      ³
³             ³  Get File   ³   Buffer    ³ End of Line ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

COMMENT
DECPage using RSP1

SD -- INSTALLATION INSTRUCTIONS

Set/Show Default Utility

SD Version 5.0A

October, 1988

NOTE: VMS Versions 4.x and 5.0
The supplied SDMAIN.EXE was linked under VMS V5.0, and will not run under VMS 4.x.  If you are still running VMS V4.x, use the procedure LINK_SD.COM to re-link SD.  When you move to VMS V5.0, use the same procedure to again re-link SD.  No code changes are necessary.

Installation using a FORTRAN compiler

1.	Edit the following file to fit your site:
	oo  SD_COMMON.DAT - The required changes are parameter statements at the top of the file, and are delimited by lines "LOCAL" and "END LOCAL".  Local decisions are:

	(a). The location of the help library, and 
	(b). Definition of SD_TRANS, which can be set up to encourage (force?) people to use logical names for devices.  Device logical names in SD_TRANS will not be translated into their physical names.  A prototype and explanation are in the file. 
2.	Do @REBUILD_SD.  This will rebuild SD.  A new SDMAIN.EXE will be created.
3.	Place the files in the appropriate place.  The files necessary for running SD are:

	SDMAIN.EXE - this file should be put in SYSEXE.  NOTE: It is logical to re-name this file SD.EXE.  It may be installed if you wish.  If you have skipped steps 1 and 2, AND if you are still using VMS V4.x, execute the file LINK_SD.COM to re-link before you move this file.
	SD.HLB  (this is usually placed in SYS$HELP)
	SD_USER_DOC.TXT  (in SYS$HELP)
	The file INSTALL_SD.COM is the way we do it.  Of course, you will have to edit INSTALL_SD.COM for your site.  
4.	Point the system symbol SD.  On our system, we use the following:
	SD :== $SD
5.	You can check that you did it correctly by typing SD.  The name of your current directory should be displayed.
6.	You will probably want to publish the user's guide.  It is present in three forms: a .WPL file if you have WPS+, a .LN03 file which prints nicely on an LN03 printer, and a .TXT file.
7.	If you wish to add help to your help library, the file SD.HLP is available.
8	(Purely optional) Predefined directories (for SD n) can be defined in several ways:
	a.  In the System-wide Login Command File (same for all users)
	b.  In each users' Login Command File (unique for each user)
	c.  Manually, by the user
	Note that definitions in (c) override definitions in (b), and (b) overrides (a).

Installing without a FORTRAN compiler
Follow steps 3 thru 8 above.  You must put the files where indicated, and you will not be able to change the SD_TRANS parameters, but SD should still work correctly.

Re-Compiling
There are command procedures for re-compiling and linking the whole of SD:  
	BUILD_SD.COM	(Full Build)
	INSTALL_SD.COM	(Install Prototype)
	LINK_SD.COM	
	REBUILD_SD.COM	(Partial Build)

Feature for System Managers
Typing SD @Username will place you in the login directory for the specified user.  This facility of SD is not documented in the Users' Guide.
The capability is normally implemented by accessing SYSUAF.DAT, and therefore only certain users will be able to use it.
There is an optional alternative provided - to use the file SYS$SYSTEM:SYSUAF.LIS, which can be created using the LIST/BRIEF command from the Authorize utility.  The file will usually not have world read access.  If you want normal users to have access to the @ facility of SD, you can change the protection on the file, edit it to delete critical entries, etc.
To implement this alternative, locate (in SDSUBS.FOR) the line "Call SD_UserName_UAF (AtStat)" and exchange it for the adjacent line, which is "Call SD_UserName_List (AtStat)".  Then rebuild SD.  

New Features in V4.4A and V5.0A
The <Gold>-A menu in DM (but not in SD) now provides for saving the user's default Editor, Viewer, Print_Command, and Printer_Type in SYS$LOGIN:DM_DEFAULTS.COM.  This file (if it exists) is used by SD (in the Print Tree section) to establish defaults.  It is a fixed-field file, and should not normally be edited.
Tree print now uses DEC's line-drawing character set if the printer supports it.  You may add additional printer types in SDTREE.FOR, if you have other requirements.
V5.0A corrects SD to conform to the way VMS 5.0 SMG$ functions differ from the previous implementation.  One "bug fix" is also included.

Documentation
You should read SD_USER_DOC for a description of SD's functions.  
Other notes:
You can go up to the [000000] level if you have SETPRV.  If you want to allow any user to go there (or add other privs), it's easy to do following the model in SD.FOR.
The incremental version number and link date of SD are available using the command SD $

What's in this directory:
In addition to AAAREADME.DOC, you will find in this Directory the following:
Documentation:
	SD_USER_DOC (User documentation)
	SD_INSTALLER_DOC (This file)
	(These are available in .TXT, in .WPL if you have the WPS+ editor on your system, and in .LN03 which prints nicely on an LN03 printer.  The LN03 files are formatted for 7" x 9" binders.)
	SD.HLP (Source for Help Library)
	SD.HLB
Command Files:
	BUILD_SD.COM (Full Build)
	INSTALL_SD.COM (Install Prototype)
	LINK_SD.COM	
	REBUILD_SD.COM (Partial Build)
Sources:
	Common block definitions (include files):
	SD_COMMON.DAT
	SD_SMG.DAT

	Code Source (with associated .OBJ)
	SDMain.FOR
	SD_Common.FOR (Block Data Subroutine)
	SD.FOR
	SDTree.FOR
	SDTree_Subs.FOR
	SDSubs.FOR
	IS_Dir.FOR (Checks .DIR files)
	SDMacros.MAR	
	Read_Header.MAR

Known Bugs

Attribution
This is a revision to the NSWC-SD package which has appeared on previous VAX SIG Symposium tapes.  It provides enhancements to the older SD packages.
SD was initially submitted in 1984 (we think) by Alan L. Zirkle, Naval Surface Weapons Center, and had been improved (and submitted to DECUS) by him since that time.  This version is a spin-off from his submission to the Spring 1986 Symposium Tape, done by Dale E. Coy, Los Alamos National Laboratory.
Why another SD?  Previous versions of SD have used DCL for some portion of the task.  This modification is entirely in FORTRAN and MACRO, giving about 25% speed improvement.
What's new? The SD Stack is now 20 directories.  Most exciting is the user may interactively select a "destination" directory from either the Stack or Tree displays.
Comments, suggestions, etc. are welcome.  Bug fix requests will also be considered.
	Dale E. Coy 
	Los Alamos National Laboratory 
	CRM-2, MS/B270, PO Box 1663 
	Los Alamos, NM 87545 
	(505) 667-3270 or 665-0145

COMMENT
DecPage using RSP1 (or GEN1 or GEN2) format

SD Users' Guide

Set/Show Default Utility

SD Version 5.0A

October, 1988

SD is a utility which gives a shortened command for SET DEFAULT and SHOW DEFAULT, as well as giving expanded capabilities for these commands.
SD with no parameters is equivalent to SHOW DEFAULT.
SD with paramaters is equivalent to SET DEFAULT.

Using SD
RUNNING SD:  from the VMS prompt -

	$ SD

EXITING SD:  SD will exit after accomplishing its work.

GETTING HELP:  Type SD ? or SD HELP.  If you are in the "tree" display, press the PF2 or HELP key for assistance.

SD was initially submitted in 1984 by Alan L. Zirkle, Naval Surface Weapons Center, and had been improved (and submitted to DECUS) by him since that time.  This version is a spin-off 
from his submission to the Spring 1986 Symposium Tape, and was extensively re-written by Dale E. Coy, Los Alamos National Laboratory.
Constructive suggestions, "bug reports", etc. should be referred to the system manager.

Command Summary

SD	Show the current default
SD X	Set default to Directory [X]
SD .X	Set default to [current.X]
SD X.Y.Z	Set default to [X.Y.Z] 
SD ^	Go up one subdirectory level
SD ^^	Go to top level of current directory 
SD .	Go to login default directory and disk
SD <n	Go to directory in n'th entry of the SD stack. (D=1)
SD >X	Set default to [z.X] when currently in [z.y]
SD >	Traverse horizontally 
SD \	Fully traverse the directory tree 
SD n	Set default to n'th predefined directory
SD <<	Show the SD stack 
SD *	Show (and go to) subdirectories under current default 
SD ?	Show SD help information

Multiple SD functions may be used in one call.

SD X
Sets default to directory [X] on the current device.  Note that square brackets are not required around the directory name; they are allowed, however.  Examples:

	$ SD MYDIR 
	$ SD NEWDIR.A.B 

You can also move to a different device, by executing:

	$ SD device:directory

The colon is required; you may follow the colon with a blank.  If you just enter a device, you will go to your current default on the new device (e.g. from DRA0:[X.Y] to DRA1:[X.Y]).

SD .X
Sets default to the subdirectory named X at the next lower level. If the current default is [A.B], then SD .X will result in default of [A.B.X]

SD ^
Sets default to the next highest directory level.  If default is [X.Y.Z], execution of SD ^ will set default to [X.Y].  If the current default is a top-level directory, nothing happens.

SD ^^
Sets default to the top level directory.  If currently in [X.Y.Z], you will then be in [X] .

SD .
Sets default to the login default directory and disk. 

SD <n
SD maintains a stack of the last twenty directories visited.  Entering SD <n sets default to the n'th previous entry in the SD stack. If n is omitted, 1 is assumed (takes you back to the directory you came from).

SD >X
Sets default to the directory "X" at this subdirectory level. If the current directory is [A.B.C] then SD >X will set default to [A.B.X].  If the current default is a top-level directory, nothing happens.

SD n
Sets default to the n'th predefined directory.  These are usually defined at login, using global symbols SD__nn.  You can define or redefine these yourself, as in the following example:
	$ SD__02 == "SYS$SYSDEVICE:[MYDIR.MYSUB]"

Such definitions last until you logout or redefine them.  If you want them to be permanent, put them in your LOGIN.COM file.
Note that you must include the square brackets in the definition.
The definition can also be of a device only, such as "_DRC0:" or "SYS$SYSROOT:".  If so, then you can combine it with another entry, such as:

	$ SD 1 X.Y.Z * DM 

Directory Traverse
SD > traverses horizontally, and SD \ traverses entire directory trees.  
When doing either type of traversal, you will get the error message "End of traversal reached" when there are no more directories to traverse.

SD >
Sets default to the next directory (in alphabetical order) on this level.  If the current directory is [A.B], then successive uses of SD > will set the default to [A.C], [A.D], etc.

SD \
Fully traverses the directory tree under the current master directory, starting at the current default.  For instance, if the current directory is [A.B], then successive uses of SD \ will set the default to:
	[A.B.B1]  
	[A.B.B2]  
	[A.C]  
	[A.C.C1]  
	[A.C.C1.C1X]  
	[A.D]  
	etc.

If the traverse starts from a master directory, then ALL of the tree under it will be traversed; the above example starts in the middle of the tree, and shows that parts of the tree 'before' the starting point (in alphabetical order) are not traversed.

SD's STACK
SD maintains a stack of the last twenty directories visited.  Entering SD << displays the SD stack, with the current directory at the top.
You may use the up and down "arrow" keys to position the cursor to a stack entry.  Then, pressing Return or Select will move you to that directory.
<Gold> T and <Gold> B move to the Top or Bottom of the stack.
You may quit without changing directories by pressing any other key (such as space or "Q").  The stack display will remain on the screen.  Entering SD <n sets the default to the corresponding entry.

SD STAR (Displaying the Directory Tree)
Entering SD * builds a display on the screen showing subdirectories under the current directory.  Note that for a large, complex directory structure, this may take a minute or two.  When the display is complete, press a regular key (such as space or "Q") to exit, or enter any of the following key commands to travel through the display:
	up-arrow	left-arrow	<Gold> T	ctrl/w
	down-arrow	right-arrow	<Gold> B	<Gold> left-arrow
	next screen	prev screen	PF2 (help)	<Gold> right-arrow
Only four levels of subdirectories are shown at one time (six if you have a 132-column terminal); if lower levels exist, the parent directory shows a line pointing to the right.  If a directory name is too long, it will be truncated and a diamond will be displayed after it.  Truncation will occur for names longer than 17 characters.
Pressing the Return or Select keys will place you in the selected directory
To print a copy of the diagram, press <Gold> P (The PF1 key, followed by p or P).  To change printers, press <Gold> A .
The printed copy will use DEC's line-drawing character set, if your printer supports it.
	Arrow Keys - Move around in the tree.
	Next Screen (VT2xx/3xx) - Move DOWN in Current Column.
	Prev Screen (VT2xx/3xx) - Move UP in Current Column.
	Return/Select/Enter/Do - Select directory to "GoTo".
	Gold T - Go to TOP of Current Column.
	Gold B - Go to BOTTOM of Current Column.
	Gold Right-arrow - Go to the Rightmost Column.
	Gold Left-arrow - Go to the First Column.
	Gold P - Print the Tree display (on your default printer).
	Gold A - Change your default printer.
	Press any other key to exit from the Tree Display.

Multiple SD Commands
In most cases, SD can do multiple functions in one call.  Space(s) must separate the functions.
	A.  A * can be done after all operations:

	$ SD X.Y *

	B.  You can do a DIRECTORY after all operations:

	$ SD >X DIR /DATE (you must use the abbreviation DIR)

	C.  You can enter DM after all operations:

	$ SD >X DM (you must use the abbreviation DM)
                                            
	D.  On GO operations, you can have it do another movement:

	$ SD . .Y (go to subdirectory Y of login default directory)
	$ SD ^ ^ (go up two levels; note difference from SD ^^ )
	$ SD <3 >X (the explanation of this is left as an exercise to the user)

	E.  If you use Multiple operations, the order of execution is:
	oo All Explicit Movements
	oo * (Show Tree)
	oo << (Show Stack)
	oo DIR
	oo DM

Initializing
You may initialize SD's Stack and your own Predefined Directories.  
These are usually defined at login (in your LOGIN.COM), but Predefined Directories may be changed at any time.
Such definitions last until you logout or redefine them.  If you want them to be permanent, put them in your LOGIN.COM file.
Initializing SD's Stack allows you to begin with the stack as you like it.  However, subsequent use of SD will change the stack contents.
Initializing the Predefined Directories allows you to type "SD n" at any time and be moved to a specific directory.

Initializing the Stack
Initialize the SD Stack at login (in your LOGIN.COM file), using global symbols SD_SLOTnn and the global symbol SD_STACK_POINTER. You must define all 20 slots as in the following example:
	$ SD_STACK_POINTER == "00"       two zeros
	$ SD_SLOT00        == "SYS$LOGIN"
	$ SD_SLOT01        == "SYS$SYSDEVICE:[MYDIR.MYSUB]"
	...
	$ SD_SLOT19        == "SYS$SYSDEVICE:[MYDIR.MYSUB]"

Note that you must include the square brackets in the definition.
Duplicates are allowed.  

Initializing Predefined Directories
Initialize the Predefined Directories at login (in your LOGIN.COM file) or at any time you wish, using  global symbols SD__nn.  You may define these as you desire (and with the numbers you choose) as in the following example:
	$ SD__02 == "SYS$SYSDEVICE:[MYDIR.MYSUB]"
	$ SD__99 == "DISK$USER99:[FOO.BAR]"

Note that you must include the square brackets in the definition.
You may then use the command "SD 99" (or whatever) to move to your n'th predefined directory.
The definition can also be of a device only, such as "_DRC0:" or "SYS$SYSROOT:".  If so, then you can combine it with other entries, such as:

	$ SD 1 X.Y.Z * DM

Miscellaneous Information

Errors
SD checks for the existence of the directory being entered, and prints an error if it is not found, or if the device is not mounted.

Logical-names
SD translates logical names if given.  For example, SD SYS$HELP will set the default to the translation for SYS$HELP.

Highlighting
The SD Tree and Stack displays normally highlight (bold) entries as your cursor moves through the display.  In certain circumstances, you may wish to disable this feature.  You might want to do this if your terminal does not support highlighting, or if you are using a slow baud rate (highlighting does take time).  To eliminate dynamic highlighting, define a symbol:

	$ DM$HIGHLIGHT :== N

Credits
SD was initially submitted in 1984 by Alan L. Zirkle, Naval Surface Weapons Center, and had been improved (and submitted to DECUS) by him since that time.  This version is a spin-off from his submission to the Spring 1986 Symposium Tape, and was extensively re-written by Dale E. Coy, Los Alamos National Laboratory.
This revision uses entirely FORTRAN and MACRO code, as well as the SMG screen interface.  It also incorporates an interactive stack of 20 directories, and an interactive "Tree" display.