Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: ichihara@rarfaxp.riken.go.jp (Takashi Ichihara)
Subject: Exchange "unformatted write" file between VMS and UNIX Fortran
Date: 1 Nov 2000 09:48:37 GMT	[thread overview]
Message-ID: <8tootl$gov$1@riksun.riken.go.jp> (raw)

  Hi folks

  I want to read a file at True64 UNIX, which was written at Open 
VMS/AXP using Fortran "unformatted write" statement.  But the following 
errors occurs during the unformatted read at True64 UNIX, DEC Fortran.

    forrtl: severe (24): end-of-file during read, unit 1, file testi.d
          
    forrtl: severe (67): input statement requires too much data, unit 1, 
    file testi.d    or

  What I did is as follows:

  (1) Write a file using  Fortran "unformatted write" on VMS. (write.f)
      (OpenVMS V6.2-1H3, DIGITAL Fortran 77 X7.1-156, UCX 4.2 ECO 2)

  (2) Binary ftp the file testi.d from Open VMS/AXP to True64 UNIX

  (3) Read the file using Fortran "unformatted read" on True64 UNIX (read.f)
      (OSF1 V4.0 1229 alpha, DIGITAL Fortran 77 V5.2-171-428BH)

   Then the read error occurs with the error messages above. 

   Is there any special method to transfer or convert file written by 
"unformatted write" on Open VMS/AXP Fortran to True64 UNIX System ?  
Thanks for the information.

  Very simple example of the program is as follows:

(write.f)  : execute at Open VMS/AXP 
      integer*4 IX(1024)
      data IX/1024*0/
      IX(1)=1
      IX(1024)=1024
      open(1,file='testi.d',status='new',form='UNFORMATTED')
      write(1) ix
      stop
      end

Binary ftp the file (testi.d) from Open VMS/AXP to True 64 Unix and then 

(read.f) : execute at True64 Unix
      integer*4 IX(1024)
      open(1,file='testi.d',status='old',form='UNFORMATTED')
      read(1) ix
      write(6,*) IX(1),IX(1024)
      stop
      end

Result:  forrtl: severe (24): end-of-file during read, unit 1, file testi.d

		Takashi Ichihara (ichihara @ riken.go.jp)









             reply	other threads:[~2000-11-01  9:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-01  9:48 Takashi Ichihara [this message]
2000-11-01 14:12 ` Exchange "unformatted write" file between VMS and UNIX Fortran hein
2000-11-01 14:48 ` Kenneth Randell
2000-11-02  1:17 ` Takashi Ichihara
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox