Renaming a file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
GSIDSXGrp
Premium Member
Premium Member
Posts: 19
Joined: Tue Jul 31, 2007 2:25 pm

Renaming a file

Post by GSIDSXGrp »

Hi,
I am using FTP stage to FTP a sequential file from server1 to server2. After ftp is complete I want to rename the file at server2.
Is there any way or stage in which I could rename the file?
Regards.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

it can be rename while FTP only.
eg. put file1 file2.
so the file1 in server1 will be transfferred as file2 on server2
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not the only way, but certainly the simplest. As noted, just give it whatever name you like, regardless of the original sequential filename, in the FTP stage.

You can also use the Telnet capabilities of the stage and the 'Telnet After Command' to rename the landed file. Simplest to just drop it with the desired name because just because you have FTP permissions on a server doesn't mean you can telnet there as well.
-craig

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