Hello bakinsoda and welcome to the forums,
What kind of binary data do you have that is being used on both the mainframe and a unix system? Usually this will either not work or is very
complicated (unless proprietary software is being used).
If the file originates on the mainframe, i'd suggest you re-create the file on the mainframe (or have it re-created) so that there are no binary numbers.
Variable/blocked records are also not handled well on the unix system (unless there is other special code in place). Block descriptor words and record descriptor words are not normal in unix.
I've googled for weeks and haven't found a solution yet.
I'm not surprised