01-14-2014 09:57 AM
I have problems when I execute openvms ftp client to a ftp windows server, because it changes the filename.
The file I want to get from windows ftp server is named "file.seq.txt", and when a do a "ftp> get *", the file is downloaded with the name "file_seq.txt".
Anyone knows how to resolve it?
I have OpenVMS 7.3-2 and the ftp in windows is IIS, but it occurs with different versions.
thank you in advance,
Solved! Go to Solution.
01-14-2014 10:39 AM
"file.seq.txt" is not a valid OpenVMS filename, unless your default directory is on an ODS-5 disk and you have extended file name parsing enabled. FTP is trying to create a valid OpenVMS filename by replacing the first '.' with an '_'.
Make sure (SHOW DEVICE/FULL SYS$DISK), that the default directory is set to an ODS-5 disk and try: SET PROC/PARSE=EXTENDED before invoking FTP. The OpenVMS filename might then become "file^.seq.txt"
01-14-2014 01:02 PM
>>> the file is downloaded with the name "file_seq.txt".
It's not obvious whether this is ODS-2 or already ODS-5. If the filename really is in lowercase, it is already ODS-5, otherwise it would be "FILE_SEQ.TXT". But, maybe the poster only wanted to say that the first dot was converted to an underscore. But who knows what he wanted to say. If it is already ODS-5 then the FTP client converts. Then there should be some documentation on the FTP client what to set/enable to leave the dots in the filename.
>>> try: SET PROC/PARSE=EXTENDED
I don't think that this is required, but it doesn't hurt, either.
>>> filename might then become "file^.seq.txt"
No. The filename will be "file.seq.txt" it might be displayed differently, with the escape character '^', but that is only for displaying the filename. In this case the '^' isn't even necessary to access the file. (But if you want to use the displayed filename with the escape character you need to have extended parsing enabled.)
01-15-2014 12:55 AM
thank you for your replies.
That's all right, the problem is that the ftp destination disk is ODS-2. We'll search for a disk ODS-5 to be able to be destination of these files. On the other hand, I don't know if the extra character '^' is a inconvenient for our process, maybe we'll need to change de code of the script that does the ftp to delete this extra character, I think it will not be a problem.
01-17-2014 12:33 AM
$ tcpip show version
HP TCP/IP Services for OpenVMS Alpha Version V5.4
on a AlphaServer DS25 running OpenVMS V7.3-2
My script uses the ftp client to connect a Windows server, download files and delete from the source. Pseudo-code:
1) create temporary directory (vms)
2) download files
ftp 'windows server'
ftp> get *
3) delete files from the windows server
"prepare delete ftp commands listing 'tmp' dir"
ftp 'windows server' with the delete commands before prepared
I've been testing a new tmp directory with a device ODS-5, and it is ok, but with the '^' character added. No problem, we have changed the <prepare delete ftp commands listing 'tmp' dir> code to clean any '^' and it is right for our purpose.
01-17-2014 01:59 AM
Which means you get the file names displayed by a DIR command, by the lexical function F$SEARCH or any other tool which displays the escape character. And you take that output to construct a script for deleting files on the remote side. As said before, the REAL file name on ODS-5 doesn't contain the escape character '^', but DIR and F$SEARCH show it. So you have to remove it when writing the script based on such output. (You probably considered the case when the remote file name contains a '^'. :-)