Page 1 of 1

Using ftp stage

Posted: Mon Oct 23, 2006 2:08 pm
by sdfasih
Hi,
How to configure FTP Stage to transfer file form unix box to a shared drive(for example T:\).
thanx.

Posted: Mon Oct 23, 2006 4:59 pm
by kris007
You cannot transfer a file using a ftp stage. You can read a file on a remote server using ftp stage and then you can use a sequential file as your output stage. If that is how you would like to do, then all you have to do is enter all the relevant properties in the ftp stage? What have you tried and what is the problem you are facing?

Posted: Mon Oct 23, 2006 5:01 pm
by ray.wurlod
While it's true that you can't use an FTP stage for this (the data flow streams into or out of an FTP stage) you could create a shell script to execute the FTP command, and invoke that from DataStage - either from an Execute Command activity in a job sequence or from a before/after subroutine in a job or from a routine using DSExecute().

Posted: Mon Oct 23, 2006 5:20 pm
by chulett
You can't transfer a file with the FTP stage? Isn't that what FTP stands for? :shock: :wink:

As long as the 'from UNIX box' box means the DataStage server box, then you certainly can. Use a Sequential File stage to deliver the data to the FTP stage and point it at the remote server.

Perhaps all this negativity comes from assuming the need to transfer a file from system A to system B with DataStage running on system C?

Posted: Mon Oct 23, 2006 6:42 pm
by kumar_s
I guess sdfasih is refering Windows as share drive (T:\).

Posted: Tue Oct 24, 2006 9:18 am
by ray.wurlod
chulett wrote:You can't transfer a file with the FTP stage? Isn't that what FTP stands for? :shock: :wink:
No, it stands for file transfer PROTOCOL, and transfers the CONTENTS of the file. The FTP stage receives/sends this data stream without touching down to disk.

Posted: Wed Oct 25, 2006 1:44 pm
by newtier
Our workplace should be "dignified and meaningful first, efficient second".
--Ernst Schumacher

(Hmm...Interesting choice for your signature)

Please do not get hung up on semantics. As Craig noted, yes you CAN accomplish transferring a file with the FTP stage. As Ray points out, the FTP stage is designed "too smart" for many FTP situations, as the design actually opens and reads the source file and moves the data record by record (not the entire file in one move).

We have submitted an enhancement request for the FTP stage to support the "simple" FTP option to just move the file.

The current design fits well with the architecture of DataStage jobs, as jobs process data "record by record".

And yes, you can simply write a script to issue the FTP command and either schedule it outside of DataStage, or call it as a before or after job routine.

But some people prefer to keep as much of the work "inside the tool" as possible to simplify their architecture. Depends on your "site standards".