× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I have written code to retrieve data from VMS. What I do is retrieve a list of
filesfrom the remote system and build a list of files to retrieve. The files
on the VMS system are not identical file names as you show, but they differ by
only three characters, in addition to the file version number (portion
following the semicolon character). So, I retrieve the files to generated file
names. In the case of the files you show, the GET command I would use would
look like this:

GET ODATA345239.DAT;2538 QTEMP/R2538

For one thing you can't have filename longer than 10 characters. I also do not
think that a period is valid, but I am not near a system to verify that.

Hope this helps.

John McKee

Quoting Jonathan Mason <jonathan.mason@xxxxxxxxxxxxxxxx>:

Hi List

I am currently supporting some software that runs on the System i that
retrieves data from
an FTP server for processing. The basic process connects to the FTP
server and obtains a
directory listing and then a suite of RPG programs generates scripts
that retrieve and
rename data files from the FTP server and is all fairly straight
forward.

The problem is that occasionally the FTP log shows a "425 Can't build
data connection'
error followed by a second message of "425 duplicate name". I'm a
little confused by this
because the "get" statement in the script uses the "(replace" parameter
which I would
expect to cater for any duplicates. Apart from this, the files are all
retrieved into
QTEMP and are given a unique number in the script.

On the FTP server side the directory listing shows the file name as
being unique. The
following extract of the FTP log shows the relevant part of the
directory listing:

.00 0Output redirected to a file.
.00 0Input read from specified override file.
.00 0Connecting to remote host xxx.xxx.xxx.xxx using port 21.
.00 0220 ftp.domain.com FTP Server (Version 5.4) Ready.
.00 0Enter login ID (userid):
.00 0331 Username USERID requires a Password
.00 0230 User logged in.
.00 0VMS OpenVMS V7.3 on node ftp.domain.com.
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0> dir DATA345*.DAT*
.00 0200 PORT command successful.
.00 0150 Opening data connection for DATA345*.DAT*
(172.17.236.55,31921)
.00 0Directory DISK$WHOLESALE3:[DATA]
...
.00 0DATA345239.DAT;2538
.00 0 33/64 31-OCT-2007
03:03:23 [DATA,USERID] (RWED,RWED,RE,)
.00 0DATA345239.DAT;2537
.00 0 25/64 31-OCT-2007
00:32:36 [DATA,USERID] (RWED,RWED,RE,)
.00 0DATA345239.DAT;2536
.00 0 27/64 30-OCT-2007
21:30:11 [DATA,USERID] (RWED,RWED,RE,)
.00 0DATA345239.DAT;2535
.00 0 29/64 30-OCT-2007
17:32:40 [DATA,USERID] (RWED,RWED,RE,)
.00 0DATA345239.DAT;2534
.00 0 28/64 30-OCT-2007
13:10:14 [DATA,USERID] (RWED,RWED,RE,)
.00 0DATA345239.DAT;2533
.00 0 4/64 30-OCT-2007
09:41:13 [DATA,USERID] (RWED,RWED,RE,)
...
.00 0Total of 772 files, 93446/127552 blocks
.00 0226 LIST Directory transfer complete.
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0> QUIT
.00 0221 Goodbye.

While the extract of the error shows:

.00 0Output redirected to a file.
.00 0Input read from specified override file.
.00 0Connecting to remote host xxx.xxx.xxx.xxx using port 21.
.00 0220 ftp.domain.com FTP Server (Version 5.4) Ready.
.00 0Enter login ID (userid):
.00 0331 Username USERID requires a Password
.00 0230 User logged in.
.00 0VMS OpenVMS V7.3 on node ftp.domain.com.
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0> get 'DATA345239.DAT;2535' QTEMP/DT10422679.CDRREC
(replace
.00 0200 PORT command successful.
.00 0425-Can't build data connection for 192.168.0.1,21066
.00 0425 duplicate name
.00 0Enter an FTP subcommand.
.00 0> renam 'DATA345239.DAT;2535' 'DATA345239.SAV;2535'
.00 0350 File DISK$WHOLESALE3:[DATA]DATA345239.DAT;2535 will
be renamed.
.00 0250 File DISK$WHOLESALE3:[DATA]DATA345239.DAT;2535
renamed to DISK$WHOLESALE3:[DATA]DATA345239.SAV;2535
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0>
.00 0Enter an FTP subcommand.
.00 0> QUIT
.00 0221 Goodbye.


Any ideas would be gratefully received.

Thanks in advance

Jonathan


_______________________________________________________
This message was sent using NOCC v1.14 webmail software
_______________________________________________________




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.