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
sainath
Premium Member
Posts: 138 Joined: Fri Nov 19, 2004 3:57 pm
Post
by sainath » Thu Nov 16, 2006 3:53 pm
Hi
I wrote a following script to move a file to a remote location.i want to move all the files like TD_ORD_SDAO* from local to remote location.
but it is giving error
SH: mput: not found.
`cd #LocalPath#ETL_FINALIZEDPROPOSAL/; echo 'user #UserName# #PasswordName#\n cd #RemotePath#\n mput #RemoteFileName#' | ftp -n #ServerName#`
please share your thoughts
thks
ArndW
Participant
Posts: 16318 Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:
Post
by ArndW » Thu Nov 16, 2006 4:04 pm
my thoughts are that mput is not in your path
sainath
Premium Member
Posts: 138 Joined: Fri Nov 19, 2004 3:57 pm
Post
by sainath » Thu Nov 16, 2006 4:09 pm
Hi
mput is there in my code before REmoteFIleName.
how can i mention to move all the files in local location to remote loation
`cd #LocalPath#ETL_FINALIZEDPROPOSAL/; echo 'user #UserName# #PasswordName#\n cd #RemotePath#\n mput #RemoteFileName#' | ftp -n #ServerName#`
thks
narasimha
Charter Member
Posts: 1236 Joined: Fri Oct 22, 2004 8:59 am
Location: Staten Island, NY
Post
by narasimha » Thu Nov 16, 2006 4:12 pm
Just to make, which os are you on?
Check if you have mput is in your path.
If unix, type this on your prompt and see what response you get
Narasimha Kade
Finding answers is simple, all you need to do is come up with the correct questions.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Nov 16, 2006 4:17 pm
Why would
mput need to be in anyone's path?
It's an
ftp command and needs to be executed
inside your ftp session, not outside of it as you have it now. And that requires a little 'here document' action.
-craig
"You can never have too many knives" -- Logan Nine Fingers
sainath
Premium Member
Posts: 138 Joined: Fri Nov 19, 2004 3:57 pm
Post
by sainath » Thu Nov 16, 2006 4:37 pm
hi
Can you explain it more in detail where i have to modify the fttp script
thks
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Nov 16, 2006 4:46 pm
Google for something like 'here document ftp script' and you should find lots of examples of what is meant by that.
One such example.
-craig
"You can never have too many knives" -- Logan Nine Fingers