Article 153426 of comp.os.vms:
Wed, 21 Aug 1996 09:09:51 chris@ccagroup.co.uk
>>and thus got the file-id's of all files accessed. But now I'm stuck with 
>>some where I do not have a name. The only idea I came up with so far is 
>$ dump/file/bl=(co=1,st=1000) disk:[000000]indexf.sys

Hey! This is brilliant. I whipped up a DCL procedure to automate it. Its
slow, but gets the job done. (It prints out each level of the backtrace, so
there is something to watch while waiting. :)

$	name_disk = P1
$	number_file = P2
$!
$	self = f$element ( 0 , ";" , f$environment ( "PROCEDURE" ) )
$	me = f$parse ( self ,,, "NAME" , "SYNTAX_ONLY" )
$	my_PID = f$getjpi ( "" , "PID" )
$!
$	say := write SYS$OUTPUT
$!
$	if name_disk .eqs. "" then inquire name_disk "Enter disk"
$	if name_disk .eqs. "" then exit
$	name_disk = f$parse ( name_disk ,,, "DEVICE" , "NO_CONCEAL" )
$	if name_disk .eqs. ""
$	then	say "Disk name is invalid."
$		exit
$	endif
$!
$	if number_file .eqs. "" then inquire number_file "File number"
$	if number_file .eqs. "" then exit
$	number_file = f$element ( 0 , "," , number_file ) - "("
$!
$	name_file_tmp1 = "SYS$SCRATCH:" + me + "_1_" + my_PID + ".TMP"
$	name_file_tmp2 = "SYS$SCRATCH:" + me + "_2_" + my_PID + ".TMP"
$!
$	name_file_index = name_disk + "[000000]INDEXF.SYS"
$	f2n = "dump /file " + name_file_index + -
		"/block = ( count = 1 , start ="
$!
$	text_found = ""
$ BACKTRACE :
$	number_file_look = number_file
$ L :
$	'f2n' 'number_file_look' ) /out = 'name_file_tmp1'
$	define /user SYS$OUTPUT NL:
$	define /user SYS$ERROR NL:
$	search /exact 'name_file_tmp1' "File identification:" -
		/out = 'name_file_tmp2'
$	if $severity .eqs. "3"
$	then	number_file_look = number_file_look + 1
$		goto L
$	endif
$	gosub check
$	if number_file_check .ge. number_file then goto FOUND
$	number_file_look = number_file_look -
		+ ( number_file - number_file_check )
$	goto L
$ FOUND :
$	if number_file_check .ne. number_file
$	then	say "Error, found: " , number_file_check
$		exit
$	endif
$!
$	search /exact 'name_file_tmp1' "File name:" -
		/out = 'name_file_tmp2'
$	gosub check
$	name_file_found = f$edit ( data_check , "COLLAPSE" )
$	name_file_found = f$element ( 1 , ":" , name_file_found )
$	say "(" , number_file , ",,) " , name_file_found
$	flag_top := false
$	if name_file_found .nes. name_file_found - "000000"
$	then	name_file_found = "["
$		flag_top := true
$	endif
$	if name_file_found .nes. name_file_found - ".DIR"
$	then	name_file_found = "." + f$element ( 0 , "." , name_file_found )
$	else	if .not. flag_top then -
$		name_file_found = "]" + name_file_found
$	endif
$	text_found = name_file_found + text_found
$	search /exact 'name_file_tmp1' "Back link file identification:" -
		/out = 'name_file_tmp2'
$	gosub check
$	number_file = number_file_check
$	if .not. flag_top then goto BACKTRACE
$ FINISH :
$	text_found = text_found - "."
$	say name_disk , text_found
$	delete SYS$SCRATCH:'me'_*.TMP;*
$	exit
--------------------------------------------------------------------------------
$ check :
$	f = me + "_file_check"
$	close /NOlog 'f'
$	open /read 'f' 'name_file_tmp2'
$	read 'f' data_check
$	close 'f'
$	number_file_check = f$element ( 1 , "(" , data_check )
$	if number_file_check .eqs. "(" then return
$	number_file_check = 0'f$element ( 0 , "," , number_file_check )'
$	return


