Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!ames!ucbcad!ucbvax!VENUS.YCC.YALE.EDU!leichter From: leichter@VENUS.YCC.YALE.EDU ("Jerry Leichter") Newsgroups: comp.os.vms Subject: re: VMS record type conversion; Cray-to-VAX conversion. questions Message-ID: <8711220128.AA01862@ucbvax.Berkeley.EDU> Date: Sun, 15-Nov-87 23:30:00 EST Article-I.D.: ucbvax.8711220128.AA01862 Posted: Sun Nov 15 23:30:00 1987 Date-Received: Mon, 23-Nov-87 05:46:42 EST Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: "Jerry Leichter" Organization: The ARPA Internet Lines: 44 Are there any problems with changing VAX file attributes from FIXED-LENGTH records to VARIABLE, STREAM or SEGMENTED by playing only with the VAX file header (not reading/writing the file), assuming appropriate control bytes have been placed in the file beforehand ? The internal structure of a STREAM file is identical to that of a FIXED-LENGTH record file - i.e., all the bytes in the file are "just data" - so this will normally present no problems (but see below). If you are careful, you can get away with this for VARIABLE files, too - but be aware that you are doing something unsupported. If you get something wrong, RMS will be quite unforgiving. (Generally, your process will unceremoniously disappear after a non-fatal bugcheck. The only way to get any indication of what happened is to look at the process final completion status. If the top process goes away on you, you'll have to look at the accounting record. Usually, the best way to play around with this sort of stuff is in a spawned subprocess.) Can someone fill me in on SEGMENTED records? Apparently, for very long records, these comprise 'segments' of 2044 bytes each. Each segment begins with 2 control bytes that indicates whether that segment is the first, last, or only of that logical record, or none of the above. What tells RMS how long the last or only (this is often less than max length) segment of a record is ? SEGMENTED records are a construct of the FORTRAN I/O system, ONLY. RMS sees the file as a variable-length record file (with a fixed control field?) and is quite unaware of any special significance the FORTRAN I/O system assigns to the control bytes. Check the FORTRAN documentation for details. I would prefer to use SEGMENTED records since this would entail no changes to my existing VAX Fortran programs. Additionally, there is a limit on the size of a VARIABLE record (8191 longwords = 32764 bytes) which may be surpassed in my application or that of others ... STREAM would seem to be more suitable for my application than VARIABLE since there is no such size limit (correct?). However, I have never used STREAM records (un-VAX-like, :^) ); can they be used for unformatted files and are there any drawbacks in using them for large binary files? VMS STREAM files are record oriented files - they just have a record's length determined by the position of a termination character, rather than a count. I believe they have the same size limitations as other "styles" of files. -- Jerry ------