From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
Newsgroups: comp.os.vms
Subject: Re: Convert MSDOS or UNIX text format to VMS format
Date: 30 Dec 1992 13:34:13 GMT
Organization: HST Wide Field/Planetary Camera
Distribution: world
Reply-To: carl@SOL1.GPS.CALTECH.EDU
NNTP-Posting-Host: sol1.gps.caltech.edu

In article <1992Dec30.085139.3959@cerberus.ulaval.ca>, 2020211@SAPHIR.ULAVAL.CA (Sylvain Chamberland) writes:
>First let me tell you I'm not a programmer, I'm not even studying computers.
>I'm just a biology grad student who has to cope with a VAX account and is
>sourly mourning his former unix account...  ;-)  (no kidding I DO prefer unix
>to VMS!)
>I have seen the recent wave of the "flames" thread, so I will try to be clear
>and precise...  ;-)    (anyway I got a thick skin!)
>
>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.

Sounds like you copied the files using IMAGE or BINARY mode.  You need to copy
text files in ASCII mode.  If that's not the problem, then there's probably a
problem with the files on the host from which you're copying.  If you'd let me
know where you're getting the sources, and which files you're dealing with,
I'll ftp them to here and let you know the results.

>(Please note that I used the VAX C compiler successfully to compile a source
>for a ymodem file transfer protocol...)
>
>I checked the contents of the files with the VMS DUMP command, and the end of a
>line is marked by the character 0A hex (line-feed I guess). I checked a file
>created by EDIT and a line is terminated by 00... so I deduced the problem is
>the character for the end of line.

Sounds like you copied the files in IMAGE format, so you've got something that
looks like a STREAM file but VMS thinks is a fix-length, 512-byte record file.
You could use Joe Meadows' FILE utility (available, I think, from
VMSSERV@FHCVAX.BITNET) to change the record type in the file.

>So I would be very grateful if somebody told me how I could transform these
>files in a format readable by the VAX C compiler...  :)

Try copying them in ASCII mode, if you haven't already done that.  If that
doesn't work, give me the information I requested above, and I'll see what I
can do to help you.

>I tried to see what I could do with commands like CoNVERT, but nothing so far
>has worked. I don't know much about VAX, and I don't have any idea of what 
>the heck is a "FDL"...
>
>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",

AH!  My guess was correct.  FTP the files again, but this time don't use IMAGE
or BINARY mode.

>the analysis told about something like "VBN 8" that had changed to "9"... also,
>there appeared to be no limits to the size of the blocks anymore. But the
>transfered file could be taken by EDIT (and read by the VAX C compiler, "CC"),
>despite the fact that it said that the text format was not standard. I checked
>with DUMP, and the end of a line was identical in both!

EDT isn't completely happy with stream files.  You can ignore its message about
the format being nonstandard.

>(On screen, with TYPE, there are line feeds without carriage returns for the
>original file, while there are carriage returns on screen for the transfered
>file).

Yup.  The original file is fixed-length, 512-byte records with no carriage
control.  You'll see a line feed every time there's an end of line in that
file.  Once you transferred the files back and forth, you had a STREAM file,
and RMS understood that whenever it saw a line feed, that was the end of a
record.

>Anyway, I'm at a complete loss, and I'm WAY out of my league, and would really
>appreciate if somebody could tell me what's going on...   :)

I've described this briefly above.  If you need more details, e-mail me.
--------------------------------------------------------------------------------
Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL

Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
understanding of astronomy is purely at the amateur level (or below).  So
unless what I'm saying is directly related to VAX/VMS, don't hold me or my
organization responsible for it.  If it IS related to VAX/VMS, you can try to
hold me responsible for it, but my organization had nothing to do with it.