How to FTP a file from Remote Server to Datastage Server

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajeshknl
Participant
Posts: 22
Joined: Thu Jul 17, 2008 8:09 pm

How to FTP a file from Remote Server to Datastage Server

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rajeshknl
Participant
Posts: 22
Joined: Thu Jul 17, 2008 8:09 pm

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Put the FTP command in a shell script and execute that from DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rajeshknl
Participant
Posts: 22
Joined: Thu Jul 17, 2008 8:09 pm

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply