1 S|D|D
    Is used to change a process' device and/or directory default.
    Default will not be set to a directory that does not exists, or that
    the process does not have access to because of privilege or protection
    settings. A stack of previously set defaults will be maintained.
    If the command is entered without a parameter or qualifiers, then
    the accumulated stack values are displayed.

    Format:  $ S|D|D  Parameter  /qualifiers
2 More
    A max. of fifty (50) stack positions can be maintained at one time.
    the default number of stack positions is 6.  See /COUNT for more.
    No two stack positions will contain the same Dev:[Dir] spec. Nor will
    any of the stack values be the same as the current default setting.
    When the stack position values are displayed and no parameters or
    qualifiers are given a ">" will display beside the previous directory
    spec. before the current directory was set.
    If the command SWAP is entered, the current default setting is switched
    with the directory spec. with the ">" beside it.
2 Examples
             $ S|D|D

                 2 SYS$SYSROOT:[SYSMGR]
               > 1 SYS$SYSROOT:[SYSEXE]
                Default is [0;7m DUA0:[MYDIR.SUB1] [0m (SYSTEM)

        This example will display all the stack positions with values
        and the current default setting.  In "()" is the username running
        SDD.  The "[4m>[0m" indicates the default setting prior to
        setting the current default setting. 


             $ S|D|D 2
              SYS$SYSROOT:[SYSMGR]
             $

        This examples shows how a stack directory spec. can be recalled
        without keying in the whole directory spec. over again.  The value
        stack position 2 is recalled. Any valid stack position number can
        be used.  Checks are made for a valid stack number and stack value
        before any changes are made.
        
             $ S|D|D \
             $ S|D|D .\
             $ S|D|D [-]
             $ S|D|D [\]

        These examples will set the default setting back one directory
        level.  A max. of seven "\" and/or "-" can be used in one
        command.

             $ S|D|D .SOURCE
             $ S|D|D [.SOURCE]

        This examples shows how to set default directory up one
        directory level.  A max. of seven sub-directories can be set.
        This is the max. allowed by VMS 4.7.


             $ S|D|D /USER=SYSTEM

        This command sets default to the SYS$LOGIN of the SYSTEM
        username. If you have the necessary privileges and access to
        the requested directory.  The System manager has the option
        to create any user's SYS$LOGIN directory if one does not
        exists.  The directory will be created and default will then
        be set. 


             $ DEFINE BIG_BROTHER SYSTEM
             .
             .
             .
             $ SDD/USER=BIG_BROTHER

        This command sets default to the SYS$LOGIN of the SYSTEM
        username using a previously defined logical name. 
        If you have the necessary privileges and access to the requested
        directory.  The System manager has the option to create any user's
        SYS$LOGIN directory if one does not exists.
        The directory will be created and default will then be set. 


             $ S|D|D/DELETE

        This command will delete the directory stack. Leaving just the
        current directory setting.


             $ S|D|D/COUNT=12

        This example shows one way to set the number of stack positions.
        After this command, there will be a max. of 12 positions.

             $ S|D|D/COUNT

        This example shows the result of using the /COUNT option without
        supplying a value.  The number of available stack positions and
        the number of positions in use are shown.
2 Parameter

     Directory-name

      Any valid directory spec, with or without [], the placement of the
      brackets will be accounted for.

      Will check the existence of the requested directory and that the
      process has access to the directory and then set default to the
      directory if the two conditions are met.

     Numeric-value

      The parameter passed can also be a nuneric value.  If it is a value
      between 1 and the current number of stack positions in use, it will
      be taken as a request to set default to that stack position.  If the
      number is not a current stack position, the number will be taken as
      a directory name and normal directory check will continue. If the
      numeric value entered is a valid stack position and there is a
      directory by the same name, the stack value will be used.  To avoid
      this, one of the directory brackets "[" or "<" should be used in
      front of the numeric value.

   Logical-name

     Logical names will be translated to the Dev:[dev] they are assigned
     and existence and access are check before allowing the process to
     set default to the directory.
2 Credits
        Original program written by;

            Jim McDowall Pgmr
            Board of Education for the City or Windsor
            Windsor, Ontario, Canada N9A 6K1
            (519)255.3348    Fax (519)255.1514
2 Qualifiers
/ADD_USER
  /ADD_USER=(username,[,...])

   This qualifier is used to add Usernames to the DS$USR list
   of users who are allowed to create user's SYS$LOGIN directory 
   when the do not exists.  SYSNAM and SYSPRV privileges are
   required to update the DS$USR list. If you specify more than one
   Username to be added, separate list with commas and enclose the
   list in parentheses.  /ADD_USER and /USER are mutually exclusive.

/APPEND
    /APPEND    Can be used only with the /RECALL or /SAVE qualifiers.

     When used with the /RECALL qualifier. DIR_STACKS will add the directory
     specifications found in the file to the end of your current directory
     stack.

     When used with the /SAVE qualifier. DIR_STACKS will add the current
     directory stack to the end of the specified file.

/COUNT
  /COUNT=

   This option can be used to set the number of stack positions.  The
   default number of positions is six (6).  A user can request up to
   fifty (50) stack positions.  No two stack positions will contain
   the same directory spec.

   Defining DS$CNT to a numeric value between 0 and 50, will also
   control the number of stack positions. Use the following DCL
   command to set DS$CNT to the value.

            $ DEFINE DS$CNT "x"

   x being the number of stack positions you wish.

   Supplying /COUNT without a value will display the current number of
   stack positions available and the number currently in use.

/DELETE

   /DELETE is used to remove all stack values.  Just the current default
   setting will remain.


/FIND
  /FIND=

   Use this qualifier to find a sub-directory that you can't remember the
   full or correct name of.  Using the wildcards (* and\or %) a disk
   search is performed to find any directorys that fit the request.  Each
   disrectory found matching the option will be displayed to the user.
   Entering a "Y" will set your default to the directory displyed.  Pressing
   RETURN will continue the search for any more directories.

/LOG
  /LOG     (D)
  /NOLOG

   Controls whether or not the new directory specification is displayed
   when a default change is made.  /NOLOG will only suppress output ONLY
   when a change is made, NOT on the display of the stack values or stack
   count display or change.

/USER
  /USER=username

   Specifies that you want to set default to the user's SYS$LOGIN directory.
   A process must have GROUP priv. and access to the directory to set 
   default to any user's SYS$LOGIN within the same UIC group, or SYSPRV
   and access to the directory to set default to any user's SYS$LOGIN
   directory outside of your UIC group.  If you have either of these
   privileges but not have access to the directory, an error message
   is issued and no change will be made.  The user's SYS$LOGIN directory
   spec. WILL NOT be displayed to an unsuccessful default setting.
   /USER qualifier can not be used with the /ADD_USER qualifier.

   A logical name assigned a Username can be entered in place of a username.

   Users that are in the DS$USR list will be asked if the users
   SYS$LOGIN directory is to be created if one does not exists.  SYSNAM
   SYSPRV privileges are also required for this function.  See /ADD_USER
   Qualifier for more information.
/RECALL
  /RECALL     (D)
  /RECALL=file-spec
   
   Used to restore the directory stack from values previously stored using
   the /SAVE qualifier.  If a file-spec is not supplied, the default file
   name is SYS$LOGIN:DIR.STACK.  /SAVE and /RECALL are mutually exclusive.
/SAVE
  /SAVE        (D)
  /SAVE=file-spec

   Will write all the current stacked directory specs. to a disk file.
   If a file name is not supplied, the stack will be stored in a file
   called SYS$LOGIN:DIR.STACK.  See /RECALL for information on recalling
   the stored stack.  /SAVE and /RECALL are mutually exclusive.

/SHOW_ONLY

   This qualifier can only be used with the /USER qualifier.  When used
   will display to a qualified user the SYS$LOGIN directory specification
   of the username supplied with the /USER qualifier.  A qualified user is
   one who has BYPASS OR SYSPRV privilege and is found in the DS$USR table
   or the SYSTEM account.
