Page 1 of 1

How to FTP a file from Remote Server to Datastage Server

Posted: Mon Aug 25, 2008 1:07 pm
by rajeshknl
Hi,

I have to FTP source files from remote server to Datastage Server(UNIX). I had a look at FTP stage(Enterprise and Plug in). But looks like they transfer data in file and not the actual file. I need the actual file.

In other topics on the forum i have seen people build routines or shell scripts. Is that the only option?

Any help is appreciated.

Posted: Mon Aug 25, 2008 1:42 pm
by chulett
You transfer the 'actual file' by taking the data read from the FTP Stage and writing it to disk using a Sequential File stage.

Posted: Tue Aug 26, 2008 9:44 pm
by rajeshknl
Chullete i think transfering of file is different from transfering data. By latter i mean reading data from remote file and write to the destination file.


For example if the remote file is zipped how do you read data and recreate the destination zip file.

I am looking for the conventional ftp functionality where you just transfer the file what ever the type it is or the contents of it are.

Posted: Tue Aug 26, 2008 10:37 pm
by ray.wurlod
Put the FTP command in a shell script and execute that from DataStage.

Posted: Tue Aug 26, 2008 10:43 pm
by rajeshknl
Hi Ray

Thanks for the quick reply. Is that the only option left. My requirement is to poll and ftp lot of files. I am looking to achieve this without any/minimal scripting.

I am concerened that if i use command i have to look for completion of the ftp transfer process etc.

Posted: Tue Aug 26, 2008 11:20 pm
by chulett
:!: First mention of zipped files or 'poll and ftp lot of files'. The answers you get are directly affected by the questions you ask and the detail you do (or in this case do not) provide.

The FTP stage is metadata driven, so it only handles single files and only then if you can accomodate the metadata. For just plain old transfers, as noted command line ftp is the answer. You cannot do this without 'any' scripting and to do it correctly you'll need more than minimal scripting. As you noted, there is a concern about completion. Unless you enjoy not knowing when your processes fail or have problems, that does mean some level of scripting to make it robust, or at least as robust as it takes so you can sleep at night.

Of course you may have other options, but they are all variations on this theme. Third party file transfer utilities may be used, if available, as well as scp rather than ftp. You still need to script the darn things and then use DataStage to run the script.

Posted: Tue Aug 26, 2008 11:21 pm
by chulett
rajeshknl wrote:Chullete i think transfering of file is different from transfering data. By latter i mean reading data from remote file and write to the destination file.
Semantics.