Are the binary files of software A readable?
Yes they are. You must know the OPEN and the WRITE statements that generated them and probably the compiler that generated the fortran code. It is then simply a matter of providing the OPEN and READ statements that suit what was written. You need to provide the READ statement that suits the WRITE. This should always be documented for other users. I would expect there should be a defined data structure to be used.
Binary and text files are very similar. You just need the appropriate OPEN, READ and WRITE to use them. Binary files are preferred as they retain maximum precision of the numbers being stored. They are more typically used. Text files can be simpler, as you can more easily look at the file (with NOTEPAD) and see what is in the file. I prefer text files, especially if I want to review what information is being transferred, or there will be a time lag between usage.
To open a binary sequential file use: OPEN ( UNIT=11, FILE='temporary_file', STATUS='UNKNOWN', & ACCESS='SEQUENTIAL', FORM='UNFORMATTED', & ACTION='READWRITE', IOSTAT=iostat) To open a sequential text file use: OPEN ( UNIT=11, FILE='temporary_file', STATUS='UNKNOWN', & ACCESS='SEQUENTIAL', FORM='FORMATTED', & ACTION='READWRITE', IOSTAT=iostat) To open a binary direct access file use: OPEN ( UNIT=11, FILE='temporary_file', STATUS='UNKNOWN', & ACCESS='DIRECT', FORM='UNFORMATTED', RECL=1000, & ACTION='READWRITE', IOSTAT=iostat)
The only problem is that files opened as sequential unformatted files also store extra information to identify the amount of information written by each WRITE statement, and this extra information differs between compilers. Direct access unformatted files do not have this problem. All comments about this problem assume that different fortran compilers have been used for program A and program B. Depending on which program you have access to ( A or B ) determines the approach you should take. If I was to approach this problem, I would use ACCESS='TRANSPARENT' and read or write the header and footer in the way the other program expected.
The style of your questions implies you are new to using binary files, although you have implied you have/had access to program A and have written the binary files. The proof of your work is how program B reads what you have written. If you don't have access to program B, you may need to use an approach Ian has recommended and convert the files to a 'record' structure that program B's compiler expects. Test it out !
John