Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

ftp

vms

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.

like image 853
Matt Avatar asked Dec 23 '22 06:12

Matt


2 Answers

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).

like image 143
vmsnomad Avatar answered Feb 14 '23 04:02

vmsnomad


Copying a file to and from your windows desktop every time you want to edit gets old very quickly.

You may be able to implement a much nicer alternative. There is some software under VMS that permits a VMS directory tree to be treated as a "network disk" under windows. Once you've set it up, and set up your windows to recognize the network disk, you can just open the file with a windows text editor without moving it from VMS to windows. You can also browse the directory tree, which appears like a tree of folders.

When you issue a save from your text editor, the saved copy supercedes the previous version over in VMS land. And it mediates correctly between RMS format and embedded newline format. It's a whole lot more convenient than FTP, for this purpose.

After doing a quick Google search, I think the name of the VMS software is PATHWORKS. But I'm not sure.

like image 38
Walter Mitty Avatar answered Feb 14 '23 03:02

Walter Mitty