FTP Connector, do not concatenate

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
Zeek
Participant
Posts: 11
Joined: Tue Jun 21, 2005 6:32 am
Location: Geneva
Contact:

FTP Connector, do not concatenate

Post by Zeek »

Hi All,

I buil a map based on a query using all FTP adaptater parameters.
This map call a MAP_Dialog_Get set as Fille tree type and record type.
This map retrieve all the files located in the FTP server directory.
The problem is that all files are retrieved and concatenated in one file.

I will want all file to be retrieve in a directory not concatenated.
Any idea ?

MAP_DAILY_CLIENT
/*Start the FTP connection to get all files*/
=Run("FTP_Dialog_Get",
" -ID1 '-DBTYPE ODBC -SOURCE DERAM_TLKS "+"' "
+" -IAFTP1 '"+FTP_Connection_Str Column:Row:QRY_Client_FTP
+FTP_User_Name Column:Row:QRY_Client_FTP
+":"
+FTP_Pwd Column:Row:QRY_Client_FTP
+"@"
+FTP_Server Column:Row:QRY_Client_FTP
+"/"+FTP_File_Extension Column:Row:QRY_Client_FTP
+" -AUDIT Audit.log"
+" -TRACE V.log"
+"'"
/*Set the output directory and file name*/
+" -OF1 '"+FTP_Output_Dir Column:Row:QRY_Client_FTP+"Test_FTP "+DATETOTEXT(CURRENTDATETIME())+".txt'")
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

Do 1 ftp per input card.
Alternatively, use the event server and trigger on a file arriving in the ftp folder and process 1 file at a time.
Zeek
Participant
Posts: 11
Joined: Tue Jun 21, 2005 6:32 am
Location: Geneva
Contact:

Post by Zeek »

Hi Jan,

You mean that there is no way to get files without concatenation in one shot ?

Thank you for your reply.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is there some way to get the FTP adapter to issue an MGET command?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Zeek
Participant
Posts: 11
Joined: Tue Jun 21, 2005 6:32 am
Location: Geneva
Contact:

Post by Zeek »

Hi Ray,

No, the syntaxe is -URL FTP User:Pwd@Host /dir/

If you do not specify any files ( only extension *.doc ), all fiels will be retrieved.
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

How would you be able to define multiple files in one card without concatenating the data?
If you want to read multiple files in one go you need multiple cards.
I don't understand why you would need multiple files defined in one card.
If you want an unknown number of input files, you need to use the Event Server with wildcard values specified for the input file name and then pass each file to another map to process.
Hope this helps.
Jan
Zeek
Participant
Posts: 11
Joined: Tue Jun 21, 2005 6:32 am
Location: Geneva
Contact:

Post by Zeek »

Hi Janhess,

Thank you for your reply, but this do not help me.
I only want to do one get (ftp) which will retrieve me more than one file.
The problem is that all files are concatenated into one file ( one card ).
If you have the solution to get more than one file using ftp with the same number of file in my output directory, this will help me.

I am a newbbie, so I discover TX and some solution appear to me to be a nightmare . . . .

Any Way, thx.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Looks like the only solution is one card per file. What does your support provider advise?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply