- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: a question about getting files from VMS to Win...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2005 02:01 PM
09-06-2005 02:01 PM
these files are in VMS
file.log;3
file.log;2
file.log;1
i want to get these 3 files into my Windows directory.
i write a BAT file to "ftp" to the VMS server and "mget" those files.
but... it will only get the newest file(file.log;3)
how to get all the files and make them different name in Windows?
what would you do in this situation?
thanks!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2005 03:27 PM
09-06-2005 03:27 PM
SolutionYou can not do it with the mget command.
The get takes an input filename and output filename as argument, but then you need to know what is coming.
Do you have any control over the application that creates these files?
I would recommend solving this on the vms side with a (batch) you to rename them before the transfer.
You might get away with a simple version number in the name part of the file name, but i would consider adding a date and/time stamp while at it.
Sample rename script
$blank = ""
$version = 0
$name = f$parse (p1,,,"NAME","syntax_only")
$type = f$parse (p1,,,"TYPE","syntax_only")
$if name.eqs.blank.or.type.eqs.blank then exit
$new_name = name + "_"
$out_loop:
$file = f$search(new_name+"*"+type)
$if file.eqs.blank then goto in_loop
$x = f$parse (file,,,"NAME","syntax_only") - new_name
$if 'x.gt.'version then version = 'x
$goto out_loop
$in_loop:
$file = f$search(name+type+";-0")
$if file.eqs.blank then exit
$version = version + 1
$rename/log 'file 'new_name''version''type'
$goto in_loop
same thing in Perl is not too pretty:
($name,$type)=split(/\./,@ARGV[0]);
while (glob($name."_*.".$type)) {
if (/^${name}_(\d+)/) {$version = $1 if ($1 > $version) };
}
$x++;
while ($x--) {
while (glob(@ARGV[0].";-0")){
$x++;
print "== $_\n";
$version++;
$new = $name ."_".$version.".".$type;
print "$_ -> $new\n";
rename $_, $new;
}
}
fwiw,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2005 03:39 PM
09-06-2005 03:39 PM
Re: a question about getting files from VMS to Windows
Doing a quick poke around the net, apparently the SCP2 protocol that comes with SSH (not the SCP1) supports versioning. Some clients for this, such as Process SW's support versions with a /vms qualifier on the command. (albeit on a VMS box)
You may want to poke around some of the SCP/SFTP clients for windows to see if they support this. (I use winscp, but that system isn't net connected at the moment, so cannot check easily... )
q
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2005 06:46 PM
09-06-2005 06:46 PM
Re: a question about getting files from VMS to Windows
FTP> mget file.log;*
or
FTP> get file.log;1
FTP> get file.log;2
FTP> get file.log;3
or use a product like WS-FTP (see www.ipswitch.com), this can handle VMS files including multiple versions. I found it has some problems with ODS-5 filespecs but in newer versions that I currently use, these issues may have been solved. For ODS-2 disks however, it's fine.
Another approach I often use is to ZIP the files on VMS (see freeware CD if www.info-zip.org), zip the file BINARY to Windows and unzip there. The files must now be opened using Wordpad or Word, Notepad cannot handle them properly.
Willem
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2005 08:13 PM
09-06-2005 08:13 PM
Re: a question about getting files from VMS to Windows
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2005 07:35 PM
09-07-2005 07:35 PM
Re: a question about getting files from VMS to Windows
Run a rename procedure to enforce that if needed, certainly do that as a one off conversion process.
Run a tidy-up procedure as often as needed to delete old logs (by date, by name, whatever)
I did one find a VMS system where someone had enforced single versions by simply doing SET FILE/VERSION_LIMIT=1 and SET DIRECTORY/VERSION_LIMIT=1 on every disc, including the system disc. Crazy!
As has already been mentiond - WS-FTP Pro from Ipswitch seems to behave fairly well as a PC FTP client when transferring between VMS systems and PCs. It also has the ability to convert extensions on-the-fly, for example I get it to automatically convert from .COM at the VMS end to .COM_VMS at the PC end.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2005 01:26 AM
09-08-2005 01:26 AM
Re: a question about getting files from VMS to Windows
zip -lw file.zip file.log;*
-l converts LF to CRLF so files read OK on Windows
-w stores VMS file versions
However, I agree that the best is to ensure that the files have unique names in the first place...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2005 12:40 PM
09-08-2005 12:40 PM
Re: a question about getting files from VMS to Windows
i temporarily close this thread, sorry~