Article Title	 	: VMS ncdfs debug
Creation Date		: 11/11/94
Message ID		: JGRNSQ
Last Update		: 
Expiration Rules	: unknown
Location		: NCD-Articles/Host_Systems/VMS
=================================================================

The VMS ncdfs can be made to display more debug information
interactively when used like this:


	$ FS :== $NCD_ROOT:[BIN]NCD_FS

	$ FS -debug


It can also be made to send more debug info to a log file when 
it is run detached as a foreign command with parameters.

----------- start cut here ----------------------
$! ncd_root:[bin]ncd_fs_ncdnet_debug.com
$! invoke as "@ncd_root:[bin]ncd_fs_ncdnet_debug install"
$! make sure to include p1 or else it won't run detached as you want it
$! to.
$ if p1 .eqs. "" then goto run_it
$
$ procedure = f$environment("PROCEDURE")
$ device = f$parse(procedure,,,"DEVICE")
$ directory = f$parse(procedure,,,"DIRECTORY")
$ path = device+directory
$ if f$trnlnm("NCD_FS_TRANSPORT").nes."" then deassign/group NCD_FS_TRANSPORT
$ if f$search("ncd_root:[000000]log.dir").eqs."" then -
        create/dir/prot=(s:rew,o:rew,g:re,w:re) ncd_root:[log]
$ assign/nolog/user nla0: sys$output
$ assign/nolog/user nla0: sys$error
$ stop ncd_fs_d
$ run /detach /process_name="NCD_FS_D" /priv=same -
  /input='procedure' -
  /output=ncd_root:[log]ncd_fs_debug.log -
  sys$system:loginout.exe
$ if f$search("ncd_root:[log]ncd_fs_debug.log") .nes. "" then -
                purge/keep=5 ncd_root:[log]ncd_fs_debug.log
$
$ goto end_it
$
$ run_it:
$ fs = "$ncd_root:[bin]ncd_fs"
$ fs -debug
$ end_it:
------------- end cut here ----------------
