From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,88d4785effd682bf,start X-Google-Attributes: gidf7344,public X-Google-Thread: 1164f8,88d4785effd682bf,start X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-12-09 08:06:05 PST Xref: gmd.de comp.os.vms:36699 comp.sys.dec:12305 Newsgroups: comp.os.vms,comp.sys.dec Path: gmd.de!xlink.net!howland.reston.ans.net!cs.utexas.edu!uunet!hearst.acc.Virginia.EDU!murdoch!js9s From: js9s@fermi.clas.Virginia.EDU (Jiangeng Sun) Subject: exported binary files from VMS Message-ID: Sender: usenet@murdoch.acc.Virginia.EDU Reply-To: js9s@fermi.clas.Virginia.EDU (Jiangeng Sun) Organization: University of Virginia Date: Wed, 8 Dec 1993 16:48:30 GMT Hi, I got many respose since I posted artical about exporting the binary files via UCX nfs from VMS to Ultrix and having a hard time reading the stm_lf files . Thanks very much . Following make a summary. 1. dragon@nscvax.princeton.edu and several others doubt it could be done at all, because the default segmented format is too different from stm_lf. Well, I don't know how RMS does it, I use convert/input=seg_to_stm.fdl seg.dat stm.dat and VMS spent 20 minutes to transform the 800000 block binary data whithout any complain, and result is OK because I use C to read the stm.dat and everything in there is fine except I have to kick out the record mark myself. 2. devarajan@smaug.enet.dec.com wrote > > VAX-Fortran defaults to SEQUENTIAL file organization with VARIABLE > record type. Here in your open statement since you have not specified record > type clause, it defaulted to VARIABLE length. But your file record type is > STM_LF. So you just need to add record type clause in your open statement and > it should work. You do not need to have user open. You may probably want to > consult your VAX Fortran Language reference manual (chap. Auxiliary i/o > statements, section : record type). I tried this , and it did not help. The problem is , I use integer *4 nwords integer*2 ievent(100000) read(50, iostat =istat) nwords, ( ievent(i), i = 1, nwords) If I use C to look at the record, The fist two bytes gives me "^C\n", which is clearly the record mark, and next four bytes gives me a inte ger*4 64, and so on. However, the VMS fortran did not seem to recognize the recode mark, and use the fist four bytes "^C\n^@\0" to give me a humongouse integer*4 nwords, that's why I got error 67 which many informed me to indicate I tried to read too long record. I have no idea how this happen, and made some fruitless tries to get around it. 3. after all the pain to kick out the record marks in the binary files in VMS exported dirctories, I found VMS NFS is SLOWWWWWW, about 8 times slower than the small client-server program I wrote. May be I have to tune the UCX NFS parameters, but I just cant see a 8 fold increase possible. Finally I decided to settle down on the client-server program, so I don't have to change the binaryfile on the VMS to stream_lf, and save the pain in managing the NFS directories. The client is very portable and can be run very remotely. This may be the only good and portable solution to begin with. thanks for the attention j.g.