DTRHELP.HLB  —  Functions  FN$SETDEF  Example
       The following example shows how to change the default directory
       from within your DEC DATATRIEVE process and how to restore the
       old default directory to its original status before exiting DEC
       DATATRIEVE.

       $ SHOW DEFAULT
         DISK:[SMITH]
       DTR> DECLARE OLDDIR PIC X(80).
       DTR> OLDDIR = FN$SHOWDEF
       DTR> PRINT OLDDIR

                             OLDDIR

       [SMITH]
       DTR> FN$SETDEF ("[SMITH.WORK]")
       DTR> PRINT FN$SHOWDEF

                 FN$SHOWDEF

       [SMITH.WORK]
       DTR>
                    .
                    .
                    .
       DTR> FN$SETDEF (OLDDIR)
       DTR> PRINT FN$SHOWDEF

                 FN$SHOWDEF

       [SMITH]
       DTR> EXIT
       $ SHOW DEFAULT
         DISK:[SMITH]
       $
Close Help