I have a file in which there is a binary field. This field is S9(4) BINARY. I FTP this file using BINARY option to a UNIX server. When the file has a record with value X'0A' in the binary field, it gets tranfered as X'0D0A'. I think what happens here is X'0A' is line feed in ASCII and the ftp process adds a X'0D' which is a carriage return in front of the line feed before writing the file to unix.
1. What you are saying makes absolutely no sense since Unix doesn't use carriage return / line feed for line terminators -- it uses ONLY a line feed. Windows uses the CR/LF, but not Unix. Furthermore, a binary transfer does ZERO character modification.
2. Are you pulling the file from the mainframe to the Unix server, or are you pushing the file -- if the Unix server is pulling the file, there is an FTP option for mainframe FTP that controls what, if any, line terminators are sent?