Page 1 of 1

FTP Connector, do not concatenate

Posted: Mon Jun 27, 2005 2:16 am
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'")

Posted: Tue Jun 28, 2005 2:05 am
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.

Posted: Tue Jun 28, 2005 2:10 am
by Zeek
Hi Jan,

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

Thank you for your reply.

Posted: Tue Jun 28, 2005 7:19 am
by ray.wurlod
Is there some way to get the FTP adapter to issue an MGET command?

Posted: Tue Jun 28, 2005 7:22 am
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.

Posted: Tue Jun 28, 2005 8:45 am
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

Posted: Tue Jun 28, 2005 8:57 am
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.

Posted: Tue Jun 28, 2005 5:55 pm
by ray.wurlod
Looks like the only solution is one card per file. What does your support provider advise?