1 SD
!
[1;1H[2J[7m Set/Show Default Directory [m

SD ^      Go up one subdirectory level
SD ^^     Go to top level of current directory (enter TOP for help)
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 (enter TRAVERSE for help) [7m NEW [m
SD .X     Set default to [current.X]
SD X.Y.Z  Set default to [X.Y.Z] (enter X for help)
SD n      Set default to n'th predefined directory
SD \      Fully traverse the directory tree (enter TRAVERSE for help) [7m NEW [m
SD <<     Show the SD stack (enter STACK for help)
SD *      Show subdirectories under current default (enter STAR for help)
SD ?      Show this SD help information
SD        Show the current default

Enter MULT for help showing how to do multiple SD functions in one call.
!
2 ^
!
 Sets default to the next highest directory level.  If default is [X.Y.Z],
 execution of [7m SD ^ [m will set default to [X.Y].  If the current
 default is a top-level directory, nothing happens.
!
2 TOP
!
 Entering [7m SD ^^ [m sets default to the top level directory.  If currently
 in [X.Y.Z], you will then be in [X] .
!
2 .
!
 Sets default to the login default directory and disk.
!
2 <n
!
 SD maintains a stack of the last twenty directories visited.  Entering
 [7m SD <n [m 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). 
!
2 >X
!
 Sets default to the directory "X" at this subdirectory level.
 If the current directory is [A.B.C] then [7m SD >X [m will set default
 to [A.B.X].  If the current default is a top-level directory,
 nothing happens.
!
2 TRAVERSE
!
   Using [7m SD > [m traverses horizontally, and [7m SD \ [m traverses en-
   tire directory trees.  See the subtopics for more information.

   When doing either type of traversal, you will get the error
   message "End of traversal reached" when there are no more dir-
   ectories to traverse.
!
3 >
!
   Sets default to the next directory (in alphabetical order) on
   this level.  If the current directory is [A.B], then success-
   ive uses of [7m SD > [m will set the default to [A.C], [A.D], etc.
!
3 \
!
   Fully traverses the directory tree under the current master dir-
   ectory, starting at the current default.  For instance, if the
   current directory is [A.B], then successive uses of [7m SD \ [m 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.
!
2 .X
!
 Sets default to the subdirectory named X at the next lower level.
 If the current default is [A.B], then [7m SD .X [m will result in default
 of [A.B.X]
!
2 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:

	$ [7m SD MYDIR [m        $ [7m SD NEWDIR.A.B [m

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

	$ [7m SD device:directory [m

 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]).
!
2 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:

	$ [7m SD 1 X.Y.Z * DM [m
!
2 STACK
!
 SD maintains a stack of the last twenty directories visited.  Entering
 [7m SD << [m 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 [7m SD <n [m sets the default to the corresponding entry.
!
2 STAR
!
 Entering [7m SD * [m builds display on VT100 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
	down-arrow	right-arrow       <Gold> B

 Only four levels of subdirectories are shown; if lower levels exist,
 the parent directory shows a line pointing to the right.  If a dir-
 ectory 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.

!
2 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.                                         
!
2 MULT
!
 In most cases, SD can do multiple functions in one call.  Space(s) must
 separate the functions.

   A.  A [1m*[m can be done after all operations:

		$ [7m SD X.Y * [m

   B.  You can do a DIRECTORY after all operations:

		$ [7m SD >X DIR /DATE [m  (you [1mmust[m use the abbreviation DIR)

   C.  You can enter DM after all operations:

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

		$ [7m SD . .Y [m   (go to subdirectory Y of login default directory)

		$ [7m SD ^ ^ [m    (go up two levels; note difference from SD ^^ )

		$ [7m SD <3 >X [m  (the explanation of this is left as an exercise
							       to the user)

   E.  If you use Multiple operations, the order of execution is:

		o All Explicit Movements
		o [1m*[m (Show Tree)
		o [1m<<[m (Show Stack)
		o [1mDIR[m
		o [1mDM[m
!
2 Logical-names
!
 SD translates logical names if given.  For example, [7m SD SYS$HELP [m
 will set the default to the translation for SYS$HELP.
!
2 Document
!
 For a hard-copy listing of this HELP text for SD, print the file:

	SYS$HELP:SD.DOC
 
!
2 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.

!
3 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.  

!
3 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:

	$ [7m SD 1 X.Y.Z * DM [m

!-------------------------------------------------------------------------
!
!	Alan L. Zirkle     Naval Surface Weapons Center
!			   Code K53
!			   Dahlgren, Virginia  22448
!
!
!		sgs_version = "3.0"
!
!	Dale E. Coy	   Los Alamos National Laboratory
!
!		Version 4.0A
!
