Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: hein@eps.zko.dec.c*m
Subject: Re: Exchange "unformatted write" file between VMS and UNIX Fortran
Date: 1 Nov 2000 10:12 -0400	[thread overview]
Message-ID: <1NOV200010122951@miasys> (raw)
In-Reply-To: 8tootl$gov$1@riksun.riken.go.jp

In article <8tootl$gov$1@riksun.riken.go.jp>, ichihara@rarfaxp.riken.go.jp (Takashi Ichihara) writes...

>  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.

Unfortunatly the Unix systems I have access to, currently do not have 
Fortran installed. So I can only help by outlining wht i would have done.

Anyway, on VMS the fortran program will generate a 'variable length'
record file with maximum record size 2044 where each file record is
a part (segment) of the application data record. To implement this,
there is a header value for each segment (= rms record) which indicates
whether this segment is the first (1), middle (0), last(2) or only(3) one 
needed to build an application record. Use DUMP/RECORD to verify.

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

That means you have send the record length 'overhead' words (in the
test case values 2044, 2044 and 14 over to Unix. DOes it know what
to do with that? Use DUMP/BLOC to verify. On Unix use some flavor of 'od'

>  (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)

Here I'd suggest you run the file creation program on Unix and dump (od)
the resulting file to understand the implemenation. Actually, in reality
i would probably do a binary transfer to VMS and DUMP it there.

Once you know how the Unix file should look like, I am sure you can find
a way on VMS to create it just so. Maybe all it takes is FTP in text mode
(I doubt it, considering the binary data). Maybe it takes a $CONVERT to
STREAM_LF (again, unlikely if there is binary data, but maybe). 

The FOrtran documentation on Unix should also explain what data is expected.

hth,
	Hein



  reply	other threads:[~2000-11-01 14:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-01  9:48 Exchange "unformatted write" file between VMS and UNIX Fortran Takashi Ichihara
2000-11-01 14:12 ` hein [this message]
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