$ set noon $ verify= f$verify( 0 ) $ on control_y then goto exit_node $! $! NODE [directoryname] $! Version 1.2 $! $! Purpose: $! $! Set the default directory to another directory in the current $! directory tree. Generally, there will be more than one directory $! with the same name, so each is presented in turn to the operator $! to determine if it is the desired one. $! $! Example: NODE TOOLS $! $! Author(s): James J. Fullerton $! Creation Date: 31-JUL-1989 $! Date Last Approved: 4-AUG-1989 $! Revisions (Date, Name, and summary of revision(s)): $! $ how_many= 0 $! $! Determine the name of the root directory. $! $ now_dir= f$directory() $ stop_pos= f$locate( ".", now_dir ) $ if stop_pos .eq. f$length( now_dir ) $ then $ root= f$extract( 1, stop_pos - 2, now_dir ) $ else $ root= f$extract( 1, stop_pos - 1, now_dir ) $ endif $! $! Get the subdirectory name. $! $ where= p1 $ if where .nes. "" then goto check_node $! $get_node: $ read - /end_of_file=exit_node - /prompt="Which node? " - sys$command where $ if where .eqs. "" then goto get_node $ where= f$edit( where, "UPCASE" ) $! $! Check for existence of node. $! $check_node: $ fs= f$search( "[''root'...]''where'.DIR", 1 ) $ if fs .eqs. "" $ then $ if how_many .eq. 0 $ then $ write sys$output "No node by that name." $ else $ write sys$output "No more nodes." $ endif $ goto get_node $ else $ how_many= how_many + 1 $ dir= f$parse( fs,,, "DIRECTORY", ) $ dir= f$extract( 0, f$length( dir ) - 1, dir ) $ dir= dir + "." + where + "]" $ read - /end_of_file=exit_node - /prompt="''dir' [N]? " - sys$command response $ response= f$edit( response, "TRIM,UPCASE" ) $ if response .eqs. "Y" $ then $ call leave $ call arrive 'dir' $ else $ goto check_node $ endif $ endif $! $exit_node: $ verify= f$verify( verify ) $ exit $! $leave: subroutine $ if f$search( "LEAVE.COM" ) .nes. "" $ then $ @leave $ endif $endsubroutine $! $arrive: subroutine $ set default 'p1' $ if f$search( "ARRIVE.COM" ) .nes. "" $ then $ @arrive $ endif $endsubroutine