home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / sys / hp / 12886 < prev    next >
Encoding:
Internet Message Format  |  1992-11-14  |  2.9 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!olivea!charnel!rat!usc!sdd.hp.com!hpscit.sc.hp.com!scd.hp.com!hpscdm!hplextra!otter.hpl.hp.com!hpltoad!hpopd!hpcpbla!mark
  2. From: mark@hpcpbla.bri.hp.com (Mark Simms)
  3. Newsgroups: comp.sys.hp
  4. Subject: Re: multiple tape files on 9144
  5. Message-ID: <9740070@hpcpbla.bri.hp.com>
  6. Date: 13 Nov 92 15:09:01 GMT
  7. References: <JEFF.92Nov12091641@dsndata.uucp>
  8. Organization: HP Computer Peripherals Bristol, UK
  9. Lines: 49
  10.  
  11. >> I have an application that needs to write multiple tape files to cs80
  12. >> cartridge tapes on a 9144 tape drive.
  13.  
  14. It is hard to know what the best solution is without more information
  15. on the problem.  It is possible to write a tape such as you describe
  16. on a 9144 tape drive, but there is little reason to do it.
  17.  
  18. To write the tape would require access to the raw device file for the
  19. 9144.  You would have to issue an ioctl(2) call to place the drive in
  20. immediate report mode.  You would have to write each file using a
  21. transfer size that was a multiple of 1024 bytes except for the last
  22. transfer in the file that would have to be the exact number of
  23. remaining bytes.  After each file you would have to use another
  24. ioctl(2) call to write a file mark.
  25.  
  26. On reading back, you would read multiples of 1024 bytes in each
  27. transfer.  The last transfer in a file would complete with less than
  28. the requested length and a file mark error.
  29.  
  30. You cannot space to marks on a 9144, but this could be simulated by
  31. reading until a mark is detected.  Spacing backwards in this manner
  32. would be exceptionally slow and would put a large amount of stress on
  33. both the media and the mechanism.
  34.  
  35. If you really want to go down this path, have a good look at the ct(7)
  36. manual page and the sys/cs80.h include file.  Remember that the 9144
  37. uses 1024 byte blocks on tape and that any write to tape will write a
  38. whole number of blocks.  If there are too few bytes in a write to fill
  39. a block, the block is written with the number of bytes given.  When
  40. read, only that number of bytes will be returned from that block.  If
  41. a read requests fewer bytes than are in a block, the rest of the block
  42. is skipped and the read starts at the next block.
  43.  
  44. This whole process is undocumented and unsupported.  Again, I have
  45. doubts whether it is worth the effort.  Think strongly about what you
  46. are doing and why.  If you really need to do things this way then
  47. okay.  I would like to know what your reasons are though.
  48.  
  49. Mark Simms
  50.  
  51. ----------------------------------------------------------------------
  52. Opinions expressed are my own and are not intended to be an official
  53. statement by Hewlett-Packard Company
  54. ----------------------------------------------------------------------
  55. Name:         Mark Simms
  56. Profession:   Software Engineer
  57. Organization: Hewlett-Packard Computer Peripherals Division
  58. Unix-mail:    mark@hpcpbla.bri.hp.com
  59. ----------------------------------------------------------------------
  60.