From: bruce@ais.com (Bruce C. Wright)
Newsgroups: comp.os.vms
Subject: Re: Convert MSDOS or UNIX text format to VMS format
Date: 30 Dec 92 13:10:06 GMT
Organization: Applied Information Systems, Chapel Hill, NC

In article <1992Dec30.085139.3959@cerberus.ulaval.ca>, 2020211@SAPHIR.ULAVAL.CA (Sylvain Chamberland) writes:
> 
> Here's my problem: I don't have any archive utility on my system here so I went
> to get a C source for "zip" by anonymous ftp. The source was written so it could
> be portable, and I got the VMS supplementary files.
> 
> But it appears the source is not in a VMS format, because the VAX EDIT editor
> will not accept any of the *.c or *.h files as files containing many lines. It
> appears to me a whole file is considered as being composed of one or a few
> lines by the editor or the compiler. The VAX C compiler ("CC") won't compile
> the source, it does not seem to recognize the format.
> [...]
> I tried to transfer some files back and forth my IBM PC clone using the ymodem
> protocol I just told about, then compared two versions of the same file with
> the command ANALYZE/RMS_FILE: the original file, and one which went to my
> computer and back. The "record type" had changed from "fixed" to "stream-LF",
> [...]

Carl has already mentioned several things you might be able to do to
get the program to work, and I had suggested some of the same things in
an e-mail message I sent.

But it's clear you don't understand what the VMS record type that we're
talking about is, and I think it might be worthwhile to give a brief
outline of just what it means.

Unlike Unix, VMS (actually RMS, the Record Management Services, which is
the file I/O library that is used for most I/O on VMS) has a concept of
file and record types.  A file can have a type of:

    o	Indexed - an indexed-seqeuential file.  Records are logically
	kept in a specific order depending on `keys' in the record, and
	RMS does the necessary internal bookkeeping to make this both
	reasonably efficient and transparent to the user (in general
	the records will NOT be stored in physically sequential order).

    o	Relative - A type of direct-access file where records are
	retrieved by record number, and which has a concept of a
	`deleted record'.

    o	Sequential - A file which is a collection of records that are
	both logically and physically sequential.  This is the most
	like a Unix file organization.

Record types on VMS include:

    o	Fixed-length records.  All records in the file have the same
	length, which is kept along with the file and record types in
	the file header (sort of like a Unix inode).  There are no
	delimiters or other information `between' records.

    o	Variable-length records.  Records can have a length up to
	some maximum value;  the length for each record is contained
	in a 2-byte word in front of each record.  This is probably
	what you're seeing as the `00' byte between some records in a
	VMS text file -- it's the high order byte of the length word.
	This is the most common format for a VMS text file.

    o	Stream files.  These are files where records are delimited by
	some kind of line delimiter.  The possibilities are STREAM_LF,
	where the line delimiter is a line feed (LF);  STREAM_CR, where
	the line delimiter is a carriage return (CR);  and STREAM_CRLF,
	where the line delimiter is a carriage return/line feed pair
	(CR/LF).  STREAM_LF is nearly identical to the usual Unix text
	file format, and STREAM_CRLF is nearly identical to the usual
	MS-DOS text file format.  Stream files are always sequential.

This gives you the major categories of files, but it is somewhat of a
simplification -- there are several additional options that I've left
out, but this covers the major types.

Bruce C. Wright