1820592 Members
2033 Online
109626 Solutions
New Discussion юеВ

FTP to AS400 server

 
Tariq Hasan
Occasional Advisor

FTP to AS400 server

Our application team currently run an ftp between an HP server and a Sun server. To verify that the file has not been corrupted by the ftp they run cksum on each box and compare the output. The HP box is to be replaced by an AS400 box.

Unfortunately the cksum command doesn't exist on the AS400, so does anyone out there currently run anything simliar and if so what do you do to check the validity of the file.

PS No we haven't got the AS400 server yet so I can't test it myself and as usual they want it working immediately which is why I'm asking the question.
4 REPLIES 4
Deepak Extross
Honored Contributor

Re: FTP to AS400 server

If you can't get the checksum, the next best bet is the file size.
David Burgess
Esteemed Contributor

Re: FTP to AS400 server

I've never touched an AS400. Until you find an answer how about ftp it back again as a different file name and check sum it and compare it to what you sent. If it gets there and back and is still the same check sum then it is ok.

HTH

Dave.
Mark Greene_1
Honored Contributor

Re: FTP to AS400 server

the closest you may get is the "size" command which will tell you the size of the file one the remote system, which you can then compare to the size of the file on the AS400, accounting for any cr/lf differences on the systems.

HTH
mark
the future will be a lot like now, only later
Shannon Petry
Honored Contributor

Re: FTP to AS400 server

File size wont work either. AS/400 use EBCDIC files, and different methodology for files in whole.

The only way you can do this accurately is to ftp 2 times.

ftp AS/400
put file1.txt
by

ftp AS/400
get file1.txt file2.txt
by

SUM1=`cksum file1.txt`
SUM2=`cksum file2.txt`

if [ $SUM1 = $SUM2 ] ; then
echo "Okay Mate"
else
echo "Not the same"
fi

Good luck
Shannon
Microsoft. When do you want a virus today?