pjt@yang.cpac.washington.edu (Larry Setlow) (06/21/89)
I have an unlabelled EBCDIC (bleagh) magtape containing one file with blocks of length 17700. RWMT barfs due to the >16K block size, but that's okay, we can use cptape (unsupported) to get the data from the tape onto a disk. But alas! The file on the disk is type nil and refuses to be opened from C with open(fn,O_RDONLY), even though The Manual says it should only care if I want to write to it. So: Anybody know how to 1) get around the 16K block problem with rwmt? 2) change the type of a nil file (ld -a shows "file nil" as the first two fields)? 3) open a stream to read a file of type nil? As you may have gathered, we have no DOMAIN/IX, and are at SR9.7. Any help will earn my Eternal Gratitude (patent pending), and a warm feeling (unless I'm just being stupid, in which case, you will earn a smugly superior feeling). E-mail, please -- don't wake the neighbors. Larry Setlow pjt@yin.cpac.washington.edu
pjt@yin.cpac.washington.edu (Larry Setlow) (06/21/89)
Thanks to everybody who responded. Those who e-mailed should get e-mailedmailed thanks. My best quick option seems to be to use /com/obty, which hid from me as I was RTFMing (I didn't find it, anyway), to change the nil type file to unstruct. Alternatively, I can apparently use the ms_$ calls (which is what I'm guessing the dmpf utility uses) to map the disk image into memory and operate on it from there. This being a one-time thing (Ha!), I will probably use the former method (if anybody cares). Thanks again. Larry Setlow pjt@yin.cpac.washington.edu
weber_w@apollo.COM (Walt Weber) (06/21/89)
In article <PJT.89Jun20121048@yang.cpac.washington.edu> pjt@yang.cpac.washington.edu (Larry Setlow) writes: >So: Anybody know how to >3) open a stream to read a file of type nil? Instead of using open(2), use the apollo-specific calls in the ms_$ family which will permit you to map the file directly to a virtual address. Then, you can treat this as a large buffer and write(2) it out to a different disk file, which can then be opened and manipulated using dd(1) to get ebcdic -> ascii conversion, or whatever. ...walt... -- Walt Weber Apollo Computer (508) 256-6600 x8315 People's Republic of Massachusetts -The views expressed herein are personal, and not binding on ANYONE-