I have a legacy script which I am not able to understand.
The script is to transfer 4 files (2 ebcdic format files and 2 pdf files) in unix to mainframes through ftp.>
scp can not append (ssh can, but it is not always an option). You can copy remote file, append it locally and then put it back.
scp
ssh