AIX Fortran and VMS Fortran - Incompatible binary files ??? 
Author Message
 AIX Fortran and VMS Fortran - Incompatible binary files ???

Hello all,

  I'm really hoping someone can help me with this problem I'm having.  

I have some binary data files which were generated using VAX VMS fortran (I'm
not sure of the version).  I want to read those files using AIX fortran.  The
problem seems to be that AIX fortran (version 3.2) and VAX fortran use a
slightly different format for the binary files.  

What I need is a program which will convert the VAX VMS Fortran-generated
binary files to the same format as is used for AIX Fortran-generated binary

I'm certain of the AIX-fortran format; for each write statement there are 4
header bytes and four trailer bytes for each write statement.  So for example
if you write one 4-byte integer to an unformatted file using the following
statement under AIX-Fortran:

        WRITE (10) N

you will get the following byte pattern in the file (and NOTHING else):

        <h1><h2><h3><h4> <n1><n2><n3><n4> <t1><t2><t3><t4>

i.e. a total of 12 bytes, with four header bytes (<h1> to <h4>), four bytes
for the representation of the integer n (<n1> to <n4>), and four trailing
bytes (<t1> to <t4>).  These header and trailer bytes are always added
before and after the data in every write statement, but not of course
between individual data elements.

I do not know exactly what is the VAX VMS format system but I am convinced
that it is different from the AIX system (and I have done some experiments
which support this).

So if anyone can shed some light on this problem, please email me at the

I'm desperate!

Thanks very much



    Experimental Scientist    P.M.B. No.3               Fax. 61 77 725852
    Australian Institute of   Townsville M.C.
      Marine Science          Q.L.D. 4810 Australia
       WWW:   http://www.*-*-*.com/ ://

Mon, 07 Sep 1998 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Reading Binary PC Files with VMS Fortran

2. reading in foreign binary files with VMS fortran

3. Porting Fortran, VMS --> AIX

4. compatibility of binary files between Powerstation fortran and Digital Fortran

5. Reading VMS Binaries in Alpha Fortran

6. VMS LIB$ copying file a file in FORTRAN

7. Fortran 66 on VAX/VMS Fortran v6.5

8. Does Microsoft Fortran 5.0 Compile VMS Fortran Code?

9. VAX VMS Fortran -> Fortran 77 convertor

10. Converting VMS binary files to PC binary

11. VMS Fortran RTL restriction on file names?

12. Fortran file status, vms, versions


Powered by phpBB® Forum Software