       User's Guide     SD Version 4.2A      (Set/Show Default Utility)     April, 1987       @ SD is a utility which gives a shortened command for SET DEFAULT > and SHOW DEFAULT, as well as giving expanded capabilities for  these commands.   4 SD with no parameters is equivalent to SHOW DEFAULT.0 SD with paramaters is equivalent to SET DEFAULT.  " RUNNING SD:  from the VMS prompt--  	      $ SD   7 EXITING SD:  SD will exit after accomplishing its work.   H GETTING HELP:  Type SD ? or SD HELP.  If you are in the "tree" display, ) press the PF2 or HELP key for assistance.                 D SD was initially submitted in 1984 by Alan L. Zirkle, Naval Surface F Weapons Center, and has been improved (and submitted to DECUS) by him H since that time.  This version is a spin-off from his submission to the F Spring 1986 Symposium Tape, and was extensively re-written by Dale E. $ Coy, Los Alamos National Laboratory.  H Constructive suggestions, "bug reports", etc. should be referred to the  system manager.         & Set/Show Default Directory Version 4.2     Command Summary   $ 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) 5 SD >X	   Set default to [z.X] when currently in [z.y]  SD >	   Traverse horizontally # SD .X	   Set default to [current.X] " SD X.Y.Z   Set default to [X.Y.Z] 0 SD n	   Set default to n'th predefined directory* SD \	   Fully traverse the directory tree  SD <<	   Show the SD stack  > SD *	   Show (and go to) subdirectories under current default   SD ?	   Show SD help information SD	   Show the current default  . Multiple SD functions may be used in one call.     SD ^  A Sets default to the next highest directory level.  If default is  F [X.Y.Z], execution of SD ^ will set default to [X.Y].  If the current 2 default is a top-level directory, nothing happens.     SD ^^   G Sets default to the top level directory.  If currently in [X.Y.Z], you   will then be in [X] .      SD .  6 Sets default to the login default directory and disk.      SD <n   G SD maintains a stack of the last twenty directories visited.  Entering  G SD <n sets default to the n'th previous entry in the SD stack. If n is  F omitted, 1 is assumed (takes you back to the directory you came from).     SD >X   E Sets default to the directory "X" at this subdirectory level. If the  I 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.     Directory Traverses   I SD > traverses horizontally, and SD \ traverses entire directory trees.     I When doing either type of traversal, you will get the error message "End  E of traversal reached" when there are no more directories to traverse.    SD >  C Sets default to the next directory (in alphabetical order) on this  H level.  If the current directory is [A.B], then successive uses of SD > * will set the default to [A.C], [A.D], etc.   SD \  G Fully traverses the directory tree under the current master directory,  I starting at the current default.  For instance, if the current directory o? is [A.B], then successive uses of SD \ will set the default to:d       [A.B.B1]       [A.B.B2]       [A.C]  t     [A.C.C1]       [A.C.C1.C1X]       [A.D]  D     etc.  E If the traverse starts from a master directory, then ALL of the tree -F under it will be traversed; the above example starts in the middle of G the tree, and shows that parts of the tree 'before' the starting point l* (in alphabetical order) are not traversed.     SD .X   I Sets default to the subdirectory named X at the next lower level. If the  F current default is [A.B], then SD .X will result in default of [A.B.X]     SD X  G Sets default to directory [X] on the current device.  Note that square 8G brackets are not required around the directory name; they are allowed, a however.  Examples:r        $ SD MYDIR       $ SD NEWDIR.A.B s  6 You can also move to a different device, by executing:        $ SD device:directory  F The colon is required; you may follow the colon with a blank.  If you D 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 n  B Sets default to the n'th predefined directory.  These are usually B defined at login, using global symbols SD__nn.  You can define or 5 redefine these yourself, as in the following example:Y  .      $ SD__02 == "SYS$SYSDEVICE:[MYDIR.MYSUB]"  F Such definitions last until you logout or redefine them.  If you want 6 them to be permanent, put them in your LOGIN.COM file.  A Note that you must include the square brackets in the definition.t  A The definition can also be of a device only, such as "_DRC0:" or  I "SYS$SYSROOT:".  If so, then you can combine it with another entry, such Z as:e        $ SD 1 X.Y.Z * DM a    
 SD's STACK  G SD maintains a stack of the last twenty directories visited.  Entering ^C SD << displays the SD stack, with the current directory at the top.Z  E You may use the up and down "arrow" keys to position the cursor to a eD 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.p  D You may quit without changing directories by pressing any other key G (such as space or "Q").  The stack display will remain on the screen.  h; Entering SD <n sets the default to the corresponding entry.     ' SD STAR (Displaying the Directory Tree)u  D Entering SD * builds a display on the screen showing subdirectories G under the current directory.  Note that for a large, complex directory dI structure, this may take a minute or two.  When the display is complete, vH press a regular key (such as space or "Q") to exit, or enter any of the 5 following key commands to travel through the display:e  1      up-arrow	    left-arrow	   <Gold> T	  ctrl/we+      down-arrow	    right-arrow	   <Gold> By-      next screen    prev screen	   PF2 (help)s  C Only four levels of subdirectories are shown at one time; if lower eH levels exist, the parent directory shows a line pointing to the right.  I If a directory name is too long, it will be truncated and a diamond will vG be displayed after it.  Truncation will occur for names longer than 17   characters.t  B Pressing the Return or Select keys will place you in the selected 	 directoryt  I To print a copy of the diagram, press <Gold> P (The PF1 key, followed by s. p or P).  To change printers, press <Gold> A .  *      Arrow Keys - Move around in the tree.7      Next Screen (VT2xx) - Move DOWN in Current Column.o5      Prev Screen (VT2xx) - Move UP in Current Column.cA      Return/Select/Enter/Do (VT2xx) - Select directory to "GoTo".[  *      Gold T - Go to TOP of Current Column.-      Gold B - Go to BOTTOM of Current Column. ?      Gold P - Print the Tree display (on your default printer).i*      Gold A - Change your default printer.  7      Press any other key to exit from the Tree Display.      Errors  G SD checks for the existence of the directory being entered, and prints i= an error if it is not found, or if the device is not mounted.      Multiple SD Commands  H In most cases, SD can do multiple functions in one call.  Space(s) must  separate the functions.R  .      A.  A * can be done after all operations:   	    $ SD X.Y *.  5      B.  You can do a DIRECTORY after all operations:o  A             $ SD >X DIR /DATE (you must use the abbreviation DIR)l  /      C.  You can enter DM after all operations::  2 	    $ SD >X DM (you must use the abbreviation DM),                                             ?      D.  On GO operations, you can have it do another movement:t  @ 	    $ 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)  C      E.  If you use Multiple operations, the order of execution is:    	    oo All Explicit MovementsD 	    oo * (Show Tree) 	    oo << (Show Stack) 	    oo DIR 	    oo DM     
 Logical-names   I SD translates logical names if given.  For example, SD SYS$HELP will set r, the default to the translation for SYS$HELP.      Initializing  D You may initialize SD's Stack and your own Predefined Directories.    G These are usually defined at login (in your LOGIN.COM), but Predefined e' Directories may be changed at any time.   F Such definitions last until you logout or redefine them.  If you want 6 them to be permanent, put them in your LOGIN.COM file.  G Initializing SD's Stack allows you to begin with the stack as you like eB it.  However, subsequent use of SD will change the stack contents.  I Initializing the Predefined Directories allows you to type "SD n" at any e* time and be moved to a specific directory.   Initializing the Stack  H Initialize the SD Stack at login (in your LOGIN.COM file), using global C symbols SD_SLOTnn and the global symbol SD_STACK_POINTER. You must  0 define all 20 slots as in the following example:  /      $ SD_STACK_POINTER == "00"       two zerose&      $ SD_SLOT00        == "SYS$LOGIN"8      $ SD_SLOT01        == "SYS$SYSDEVICE:[MYDIR.MYSUB]"      ...8      $ SD_SLOT19        == "SYS$SYSDEVICE:[MYDIR.MYSUB]"  A Note that you must include the square brackets in the definition.    Duplicates are allowed.  e  # Initializing Predefined Directoriesn  H Initialize the Predefined Directories at login (in your LOGIN.COM file) G or at any time you wish, using  global symbols SD__nn.  You may define A@ 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]"  A Note that you must include the square brackets in the definition.   H You may then use the command "SD 99" (or whatever) to move to your n'th  predefined directory.h  A The definition can also be of a device only, such as "_DRC0:" or  I "SYS$SYSROOT:".  If so, then you can combine it with other entries, such   as:         $ SD 1 X.Y.Z * DM     Creditsf  D SD was initially submitted in 1984 by Alan L. Zirkle, Naval Surface F Weapons Center, and has been improved (and submitted to DECUS) by him H since that time.  This version is a spin-off from his submission to the F Spring 1986 Symposium Tape, and was extensively re-written by Dale E. $ Coy, Los Alamos National Laboratory.  G This revision uses entirely FORTRAN and MACRO code, as well as the SMG sC screen interface.  It also incorporates an interactive stack of 20 p/ directories, and an interactive "Tree" display.b  