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

SD        Show the current default directory and disk
SD ^      Go up one subdirectory level
SD ^^     Go to top level of current directory structure (enter TOP for help)
SD .      Go to login default directory and disk
SD <<     Show the SD stack of 20 previous directories (enter STACK for help)
SD <n     Go to n'th previous default directory (default for n is 1)
SD >X     Set default to [z.X] when currently in [z.y]
SD >      Traverse horizontally (enter TRAVERSE for help)
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)
SD *      Show subdirectories under current default (enter STAR for help)
SD ?      Show this SD help information (SD HELP or SD /HELP also work)

Enter MULT for help showing how to do multiple SD functions in one call.
SD can save its history stack over logouts; enter SAVE for help on this.
!
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
!
 Entering [7m SD < [m returns you to the directory you were in immediately
 before your current setting.

 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.
!
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 sets default
 to [A.B.X], or [7m SD >X.Y [m sets default to [A.B.X.Y].

 If the current default is a top-level directory, nothing happens.

 Wildcards (* and %) may be used in the directory names; SD will
 go to the first directory matching the specification.
!
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  results in a new default
 of [A.B.X], or [7m SD .X.Y.Z [m results in default of [A.B.X.Y.Z].

 Wildcards (* and %) may be used in the directory names; SD will go
 to the first directory matching the specification.
!
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 DUA0:[X.Y] to DUA1:[X.Y]).

 Wildcards (* and %) may be used in the directory names; SD will go to
 the first directory matching the specification.
!
2 n
!
 Sets default to the n'th predefined directory.  You can define or
 redefine these yourself, as in the following example:

        $ SD  /2=MYDISK:[MYDIR.MYSUB]  /3=MYDISK:[MYDIR.OTHER]

 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 definitions.

 A definition can also be of a device only, such as "DUA0:" or
 "SYS$SYSROOT:".  If so, then you can combine it with another entry,
 such as:
            $ [7m SD  1  X.Y.Z [m
! LOCAL K50 NSWC LOCAL K50 NSWC LOCAL K50 NSWC LOCAL K50 NSWC LOCAL K50 NSWC

 On the SGS VAXcluster, numbers 1-7 are defined for you to point to
 each UDISKn.  For example, [7m SD 2 ABC [m will move to UDISK2:[ABC].
!
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 can use the up-arrow and down-arrow keys to move the cursor to an
 element of the stack, then use the ENTER, SELECT, or DO key to set the
 default to that directory.

 If directory names are too long to fit on the screen, -> is displayed
 at the right margin.  The left-arrow and right-arrow keys can be used
 to view the rest of the name.
 
 The SPACE bar exits the stack display without moving to a new directory.

 The Control/W key refreshes the screen.
!
2 STAR
!
 Entering [7m SD * [m builds a display on VTnnn screens showing subdirectories
 under the current directory.  When the display is complete, you may enter
 a BLANK to exit the display, or you may travel through the display using
 EDT-like key commands; hit the HELP key for definitions.

 You may highlight any directory in the display using the arrow keys.  To
 travel to the highlighted directory, hit the ENTER, SELECT, or DO key.

 Often the display is too wide to fit on the screen.  Keys are defined to
 change the screen width to 132 and 80, and to shift the screen to view
 off-screen portions.

 The Control/W key refreshes the screen.

 The separate SDDRAW utility is used to create a printable file containing
 a directory structure diagram like [7m SD * [m produces.  See HELP SDDRAW for
 details.
!
2 Errors
!
 SD checks for the existence of the directory being entered, and prints an
 error message if it is not found, if the device is not mounted, or if you
 don't have privilege to use the directory.
!
2 Version
!
 Entering [7m SD /VERSION [m displays SD's current version number.  Entering
 [7m SD $ [m will currently also do this, but may not in the future.
!
2 SYSMGRs
!
 [7m SD and System Managers [m

 When a privileged user executes SD, the following differences apply:

    SD @username   Goes to login directory of the specified user (if
                   username is blank, goes to your login directory)

    SD #     If in [SYSi.xxx], goes to [SYSj.xxx], where j=i+1 in hex

    SD #n    If in [SYSi.xxx], goes to [SYSn.xxx]; i and n are hex

       The latter two work only if currently in a directory named
       [SYSn.xxxx], where N is any hex number, and XXXX is any sub-
       directory(s).  These are for traversing VMS system roots.

    SD >X, and SD >, if at a top-level directory, will go to the next
    alphabetic directory.  SD ^ from a top-level directory will go to
    [000000].  These are all no-ops for unprivileged users.

    Also, SD /TEST [params] will run SD in "SD Debug" mode.
!
2 SDENTRY
!
 If a file "SDENTRY.COM" exists in the new directory, it is executed.
 This allows you to define symbols related to that directory.

 If you don't want SD to execute SDENTRY or SDEXIT procedures, set
 global DCL symbol SD_COM to a string value beginning with "N".  If
 you set SD_COM to a string value beginning with "Y", SD will tell
 you when it runs these procedures.
!
2 SDEXIT
!
 If a file "SDEXIT.COM" exists in the current default directory, it
 is executed before a move is made to a new directory.  This allows
 cleaning up of symbol or logical name definitions when leaving the
 current directory.  SDEXIT.COM will find P1 set to the name of the
 directory where SD is traveling to.

 Normally, this feature would be used in conjunction with SDENTRY.

 If you don't want SD to execute SDENTRY or SDEXIT procedures, set
 global DCL symbol SD_COM to a string value beginning with "N".  If
 you set SD_COM to a string value beginning with "Y", SD will tell
 you when it runs these procedures.
!
2 SD.COM
!
 If a file "SYS$LOGIN:SD.COM" exists, and if global DCL symbol SD_COM
 is set to a value of "xY" (where "x" is any character), then SD.COM
 is executed before a move is made to a new directory; it will find
 P1 set to the name of the directory where SD is traveling to.  The
 procedure will be called before any SDEXIT.COM is called.  An error
 message will be displayed if you have not provided an SD.COM.

 This provides a way, for example, for users to easily change the DCL
 prompt based on what directory they are going to.  Users on VT3nn or
 VT4nn terminals can use this to put the new directory name in the 25th
 line.
!
2 MULT
!
 In certain cases, SD can do multiple functions in one call.  Blank(s) must
 separate the functions.

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

                $ [7m SD X.Y * [m

   B.  You can do a DIRECTORY after all operations except SHOWs:

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

   C.  On GO operations, you can have it do multiple movements:

                $ [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 < >X [m   (the explanation of this is left as an exercise
                                                               to the user)
!
2 Logical_Names
!
 SD translates logical names if given.  For example, [7m SD SYS$HELP [m
 will set the default to SYS$SYSROOT:[SYSHLP].

 If a logical name translates to a full file name, SD only uses the
 device and directory portions.
!
2 Document
!
! LOCAL K50 NSWC LOCAL K50 NSWC LOCAL K50 NSWC LOCAL K50 NSWC LOCAL K50 NSWC
 For a hard-copy listing of this HELP text for SD:

                  Print the file:  NSWC$ROOT:[DOC]SD.DOC
 
 or LASER the file (/MODE=PORT5):  NSWC$ROOT:[DOC]SD.LAS

                 or LQP the file:  NSWC$ROOT:[DOC]SD.LQP
!
2 SAVE_RESTORE
!
 SD can save its history over logouts.  Do "SD /SAVE" to save it before you
 log out, and "SD /RESTORE" when you log in.  This works best if you create
 a LOGOUT.COM.  An example of setting this feature up is:

        LOGIN.COM:   $  IF F$MODE() .EQS. "INTERACTIVE"
                     $  THEN
                     $    SD /RESTORE
                     $    LO*GOUT == "@SYS$LOGIN:LOGOUT"
                     $  ENDIF

        LOGOUT.COM:  $  SD /SAVE
                     $  LOGOUT = ""     ! Prevents infinite loops
                     $  LOGOUT

 SD uses the file SYS$LOGIN:SD.HISTORY to save this context.

2 Symbols

 SD uses Global DCL Symbols to maintain its history stack and to hold
 the definitions of the predefined directories.  Deleting or changing
 the values of these symbols will cause SD to work incorrectly.  The
 names of the symbols are:

        SD_SLOTn, where n=0 to 20     (the stack)
        SD_SP                         (stack pointer)
        SD__i, where i is an integer  (predefined directories)

 Also, the use of Global DCL Symbol "SD_COM" is described elsewhere in
 this help text, and SD itself is called as a "foreign command", using
 Global DCL Symbol "SD".

!
!       Alan L. Zirkle     Naval Surface Weapons Center
!                          Code K55
!                          Dahlgren, Virginia  22448
!
!       SD Version 4.0, 23 January 1991
!	
