home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / os / vms / 13816 < prev    next >
Encoding:
Internet Message Format  |  1992-08-19  |  1.6 KB

  1. Path: sparky!uunet!van-bc!rsoft!agate!ames!decwrl!deccrl!bloom-beacon!eru.mt.luth.se!lunic!sunic!mcsun!uknet!miclon!nreadwin
  2. From: nreadwin@micrognosis.co.uk (Neil Readwin)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: LBN => Filename / FID => Filename ??
  5. Keywords: lbn, fid, indexf.sys
  6. Message-ID: <1992Aug19.110649.26298@micrognosis.co.uk>
  7. Date: 19 Aug 92 11:06:49 GMT
  8. References: <1992Aug17.165506.21539@oracle.pnl.gov>
  9. Sender: news@micrognosis.co.uk (News account)
  10. Organization: Micrognosis, London, UK.
  11. Lines: 25
  12.  
  13. In article <1992Aug17.165506.21539@oracle.pnl.gov>, David Cowley writes:
  14. |> Does anyone have a way to take a logical block number (LBN) and determine
  15. |> which file it's part of? [...] The same goes for the File IDs (e.g.
  16. |> (135,1,0) ) reported by utilities like ANALYZE/DISK.
  17.  
  18. I can't help with LBNs, but FIDs are easier. The following piece of DCL will
  19. dump out the file header. That contains a file name and you can follow back
  20. the 'back link file identification' to get the complete spec.
  21.  
  22. $ write sys$output "Enter device name ..."
  23. $ read sys$command device
  24. $ write sys$output "Enter FID (eg 1235,1,1) ..."
  25. $ read sys$command the_fid
  26. $!
  27. $ the_block = 4*F$GETDVI(device, "CLUSTER") + -
  28.         ((F$GETDVI(device, "MAXFILES") + 4095) / 4096) + -
  29.         (f$element(2, ",", the_fid) / 256) * 65536 + -
  30.         f$element(0, ",", the_fid)
  31. $ dump /file /block=(count=1,start='the_block') 'device':[000000]INDEXF.SYS
  32.  
  33. If you want to get into this stuff then you need "VMS File System Internals"
  34. by Kirby McCoy (EY-F575E-DP, ISBNs 1-55558-056-4 and 0-13-931783-X).
  35. -- 
  36.  Phone: +44 71 528 8282  E-mail: nreadwin@micrognosis.co.uk
  37.  Anything is a cause for sorrow that my mind or body has made
  38.