camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Valencia <joseluis04...@gmail.com>
Subject Camel FTP Problem getting latest generation of MVS GDG dataset
Date Fri, 20 May 2011 22:17:24 GMT
Hi all:

I'm wondering if somebody has managed to get the latest generation of
an MVS mainframe dataset with a Camel FTP consumer.

Let's say I want to get 'BN.U.FORL.ERL.CLERT(0)'

It succeeds using Unix ftp. The MVS FTP server interprets the (0)
suffix and sends the current generation (G0002V00) of the dataset:

230 MYUSER is logged on.  Working directory is "MYUSER.".
Remote system type is MVS.
ftp> cd 'BN.U.FORL.ERL'
250 "BN.U.FORL.ERL." is the working directory name prefix.
ftp> ls
200 Port request OK.
125 List started OK
CLERT.G0001V00
CLERT.G0002V00
DAT.G0001V00
DAT.G0002V00
HOR.G0001V00
HOR.G0002V00
LORF.G0001V00
LORF.G0002V00
250 List completed successfully.
124 bytes received in 0.00034 seconds (355.14 Kbytes/s)
ftp>get CLERT(0)
200 Port request OK.
125 Sending data set BN.U.FORL.ERL.CLERT.G0002V00 FIXrecfm 38
250 Transfer completed successfully.
local: CLERT(0) remote: CLERT(0)
12360 bytes received in 0.038 seconds (317.92 Kbytes/s)
ftp>

Enter the Camel version. My route URL is something like this:

ftp://MYUSER@MYHOST.MYDOMAIN.COM/'BN.U.FORL.ERL'?delay=1h&fileName=CLERT%280%29&ftpClientConfig=
%23myFTPClientConfig&maxMessagesPerPoll=1&password=******&pollStrategy=%23myPollingStrategy&throwExcep
tionOnConnectFailed=true

NOTE: CLERT%280%29 actually stands for CLERT(0), meaning the current
generation of the MVS dataset.

Apparently the underlying Apache Commons Net FTPClient is able to list
the files from the absolute path 'BN.U.FORL.ERL', but it then tries to
see if the the value of fileName=CLERT(0) is among those files, which
is not the case, because the current generation is generated
dinamically.

[21:38:01] TRACE Camel (camel-1) thread #0 -
ftp://MYUSER@MYHOST.MYDOMAIN.COM/'BN.U.FORL.ERL'
  FtpOperations listFiles()
[21:38:01] TRACE Camel (camel-1) thread #0 -
ftp://MYUSER@MYHOST.MYDOMAIN.COM/'BN.U.FORL.ERL'
    FtpConsumer Found 4 in directory: 'BN.U.FORL.ERL'
[21:38:01] TRACE Camel (camel-1) thread #0 -
ftp://MYUSER@MYHOST.MYDOMAIN.COM/'BN.U.FORL.ERL'
    FtpConsumer File did not match. Will skip this file:
GenericFile[CLERT.G0002V00]
[21:38:01] TRACE Camel (camel-1) thread #0 -
ftp://MYUSER@MYHOST.MYDOMAIN.COM/'BN.U.FORL.ERL'
    FtpConsumer File did not match. Will skip this file:
GenericFile[DAT.G0002V00]
[21:38:01] TRACE Camel (camel-1) thread #0 -
ftp://MYUSER@MYHOST.MYDOMAIN.COM/'BN.U.FORL.ERL'
    FtpConsumer File did not match. Will skip this file:
GenericFile[HOR.G0002V00]
[21:38:01] TRACE Camel (camel-1) thread #0 -
ftp://MYUSER@MYHOST.MYDOMAIN.COM/'BN.U.FORL.ERL'
   FtpConsumer File did not match. Will skip this file:
GenericFile[LORF.G0002V00]

Is it right to assume that when the fileName attribute is present in
the URL, it will be compared literally against the listed files?
Why is it that that the FTPClient only shows 4 instead of the 8 files
listed with the Unix FTP? Does the LIST command sent by FTPClient only
gets the latest generations from MVS? Camel does not see any of the
G0001V00 files.
Who writes the 'File did not match. Will skip this file' message. I
was unable to find it in FTPConsumer source code referred from the API
docs.
Is there a way or workaround to get CLERT(0) using Camel?

Regards

Mime
View raw message