How can I copy a file from VMS to Windows and back again?

Matt picture Matt · Jan 27, 2010 · Viewed 14.5k times · Source

I am trying to copy C source files from a vms alpha to a windows machine to allow easier editing of the code. (VMS editor is just a text editor and it would be nice to have syntax highlighting etc)

I can copy this across using Exceed FTP and this handles the issue of duplicate filenames with version suffix that vms has:

  • File.c;1
  • File.c;2
  • Flle.c;3

But when I open a file I've transferred, all the line breaks have been lost and the entire file is just one line.

Can anyone recommend a solution to this or offer any hints?

Thanks in advance

ps. I need to be able to copy the files back to vms and still maintain format.

Answer

vmsnomad picture vmsnomad · Feb 5, 2010

It may be off interest by now, but in case you still wonder about "one-line" text files after FTP transfer.

The short answer: force the FTP transfer mode to ASCII (or text) in your FTP client. This will make sure that the C-files you transferring (in fac all files) are treated as text, otherwise they're assumed to be binary, so you get a byte-stream.

Long answer: There're 2 FTP transfer modes: ASCII/text and binary/image. The default is sometimes clent or server-specific.

Many clients have Auto-mode that interprets the file extension to set the proper transfer mode (.TXT,.CSV etc..)

When you access the VMS server via FTP client, too often the [Win-based] client is not VMS friendy, so it does not parse the file-list properly. Thus it gets confused by version number appended to the "usual" file-name: filename.ext;ver ==> file.c;1

So instead of seeing .C (and assuming text), it sees .C;1 and thinks it's binary.

I use Filezilla FTP client to/from VMS and so far it does it properly (though version-support is not as I'd sometimes like).