Also note that what you posted is not a script but rather the response file (probably leveraged via a 'here document' approach) for the FTP session itself. Any script, such as you'll see when you do the search Paul mentioned, will need to include the actual FTP command itself. Also realize that to leverage 'secure' ftp/scp in an automated fashion, you'll need to (at a very high level) establish RSA keys between the two servers. Found this article on the subject, there's plenty more out there if you want to go the secure (password-less) route.
FWIW, I tended to avoid the use of the FTP stage since it is metadata driven. Command line ftp/scp just sends streams of bytes without much caring what kind of structure they are in.
-craig
"You can never have too many knives" -- Logan Nine Fingers
ftp xxx.yyy.com
connected to xxx.yyy.com
user name
password
ftp >ls
port command successful.
Opening ASCII Mode data connection for transfer
Mailbox ID St APRF SNRF Service Ref #
ABC Y ZZZZ File xxxxxxx
Transfer complete
ftp: 1044 bytes received in 0.04 seconds
Option 2:FTP Unix shell script (Secure ftp connection) ..I am in the process of testing.
@ Chulett
I am testing the ftp/scp commands ,for the usage in Execute command stage in Sequence jobs.
I will update the post if any progress
Thanks for the time taking in replying with your comments
I would suggest you write your script and execute the script using the Execute Command stage, this rather than putting the ftp commands directly in the stage.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Me, I wouldn't bother with the FTP stage for something like this. Get a script working from the DataStage server and use that instead. Which means first making sure you can do it manually from the ETL server command line...
-craig
"You can never have too many knives" -- Logan Nine Fingers
I did not specify any permissions for this file that might be the reason for this error .
While modifying the script and running jobs several iterations till the desired out put ..I welcome here the suggestions for the script modifications and Parameters to specify in execute command stage
Yes... exactly. Get proper permissions on the shell script and (IMHO) get it working from the command line before you stick it in a DataStage job.
And brush up on the concept of here documents so your END_SCRIPT can actually be used. Example 19-6 in the linked site has an ftp example but there are tons more out there in the wild.
-craig
"You can never have too many knives" -- Logan Nine Fingers
Currently, customer is using windows script (mentioned in original) to place the file.The proposed process is to replace it with unix shell script executed by datastage process.
Reason for GET:(testing purpose only)
As part of my testing the ftp connection ,I am trying to read the file (already present) from target server(Production mail box ftp location ) make sure atleast there is a connection exist between unix server and Mail box location .
But the actual requirement is PUT/PLACE in the ftp mail box location