Delete file after FTP
Moderators: chulett, rschirm, roy
Delete file after FTP
Hi,
I have a job which pulls data from unix box using DataSatge ftp stage, and on sucessful run I need to delete source file.
Source file is on different Unix box and my DataStage server is on different Unix box.
Any thoughts........
Thanks
Mitta
I have a job which pulls data from unix box using DataSatge ftp stage, and on sucessful run I need to delete source file.
Source file is on different Unix box and my DataStage server is on different Unix box.
Any thoughts........
Thanks
Mitta
Re: Delete file after FTP
One of the reasons I never use ftp stage but always shell out to get the file via an OS script. What you want to do is not in the ftp file stage.
Ogmios
Ogmios
In theory there's no difference between theory and practice. In practice there is.
-
- Premium Member
- Posts: 108
- Joined: Sat Feb 05, 2005 6:52 pm
- Location: US
-
- Premium Member
- Posts: 108
- Joined: Sat Feb 05, 2005 6:52 pm
- Location: US
-
- Premium Member
- Posts: 108
- Joined: Sat Feb 05, 2005 6:52 pm
- Location: US
Possibly, depending on permissions and such. Give it a shot and see.srimitta wrote:Can I use command rm <file name> in 'Telnet After', will this serve my purpose.
Make sure you've got all of the Telnet Prompts setup correctly in the stage so it can logon properly after the ftp is complete.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi Chulett,
In stage > Properties I have given userid and pwd
'Telnet Prompt1' <User Id>
'Telnet Prompt2' <Password>
In Output > Properties I have givn
rm test
DS job ran sucessfully but it wrote warning to log
unable to execute Telnet command 'Telnet After Command'/b]
I think Iam missing some other inputs in FTP stage....Any input........
Thanks
Mitta
In stage > Properties I have given userid and pwd
'Telnet Prompt1' <User Id>
'Telnet Prompt2' <Password>
In Output > Properties I have givn
rm test
DS job ran sucessfully but it wrote warning to log
unable to execute Telnet command 'Telnet After Command'/b]
I think Iam missing some other inputs in FTP stage....Any input........
Thanks
Mitta
Coldfusion? Not sure what that would have to do with anything.
If you aren't sure what's going on, change the Link Tracing Level property from its default of zero to something else so it can tell you what the problem is. With your cursor in the field, click on Property Help to see what values can go there.
Then run the job again and hopefully enough information will be in the log such that you can figure out what your issue is.
If you aren't sure what's going on, change the Link Tracing Level property from its default of zero to something else so it can tell you what the problem is. With your cursor in the field, click on Property Help to see what values can go there.
Then run the job again and hopefully enough information will be in the log such that you can figure out what your issue is.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi All,
Even I am trying the same approach. I am ftping a file from one server to another server and when the ftp completes, want to delete the old file present. So I am using ftp stage and the ftp is happening perfectly but the removal of file is not happening. Its giving the error Bytes returned from 'tnet_recv() : 0 . But as per the trace log, its able to connect to the telnet socket. After that its giving "Looking for Telnet prompt number 1" and then after 1 min, it gives the above warning and aborts. Please suggest what to do.
Even I am trying the same approach. I am ftping a file from one server to another server and when the ftp completes, want to delete the old file present. So I am using ftp stage and the ftp is happening perfectly but the removal of file is not happening. Its giving the error Bytes returned from 'tnet_recv() : 0 . But as per the trace log, its able to connect to the telnet socket. After that its giving "Looking for Telnet prompt number 1" and then after 1 min, it gives the above warning and aborts. Please suggest what to do.
Aim high