Home » Infrastructure » Unix » FTP to Mainframes from Unix
icon9.gif  FTP to Mainframes from Unix [message #346116] Sat, 06 September 2008 02:52 Go to next message
gowriprakash
Messages: 1
Registered: September 2008
Junior Member
--------------------------------------------------------------------------------

Hi,

Iam new to unix.I have 3 files to be FTPied to Mainframe from Unix(Sun Solaries Unix). Sample record in one file is as shown below.

123ßRajß123-456ßjackßß
124ßRajeshß123-457ßjacmßß

In the above file the records are seperated by delimitter "ß". When I used the below script to FTP from Unix to mainframe.

cd $DIRECTORY1
echo "open xxxx.xxxx.com \n" > $DIRECTORY2/file1
echo "user user1 password \n" >> $DIRECTORY2/file1
echo "cd /xxx/xxx/ \n" >> $DIRECTORY2/file1
echo "mput * \n" >> $DIRECTORY2/file1
echo "bye " >> $DIRECTORY2/file1
ftp -ivn < $DIRECTORY2/file1>> $file2
rm $DIRECTORY2/file1
ret_code=$?
if [ $ret_code == $vSuccess ]
then
echo "[$prog_name] Successfully removed the file for FTP \n" >> $file2
else
echo "[$prog_name] Failed to remove the script file for FTP \n" >> $file2
fi

It is saying that the hostname, login ID and password and that directory in that host exists but It is saying that FTP operation is failed.

Then I came to know that the destination team recieved files but the file is in the below manner.

123aj23-456ack
124ajesh23-45jacm

The problem is after FTPing delimiter is not visible at their side and one character is missing after delimiter and they r not recieving records in line by line they are getting all records sequentially.

Please let me know how to solve it.
Re: FTP to Mainframes from Unix [message #346118 is a reply to message #346116] Sat, 06 September 2008 03:31 Go to previous message
Michel Cadot
Messages: 68718
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
This question bears no connection with Oracle.
Please find a more appropriate forum.
The topic is locked.

Regards
Michel
Previous Topic: mailx question
Next Topic: Shell Script to Invoke Sql Loader
Goto Forum:
  


Current Time: Mon Dec 02 16:57:34 CST 2024