Hi All,
Is it possbile to move files from Host server source to Host server target in datastage execute command stage or before or after subroutine.
i am trying in my project but no luck. below is the code.
mv source server path/*.txt Target server path | sftp -o StrictHostKeyChecking=no User@server.intra
sftp -o StrictHostKeyChecking=no User@server.intra | mv source server path/*.txt Target server path
Move Files from Host server source to Host server Target
Moderators: chulett, rschirm, roy
Why are you piping "mv" and "sftp" together? The former won't move anything between servers and the latter needs more information to work. Use "mv" if you just need to move it to a new directory on the same server, use "sftp" to move it to another server.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Do some study about UNIX pipelining. You don't want the | operator here. As Craig notes, you may not need any operator. But, if you do want to pipeline two commands other operators exist, including ; && ||
Or you could use a DataStage job (not sequence) using an FTP stage.
Or you could use a DataStage job (not sequence) using an FTP stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.