Unformatted data transfer..
Subhankar Ray
suray at cs.tamu.edu
Wed Oct 17 03:32:58 AEST 1990
Hello Everyone,
Here is a test program, where I was generating a file on YMP, named
ibm( good for IBM) and then I moved it to IBM (under
MVS/os) using binary ftp. But when I was trying to make an
unformatted read on IBM, it was
giving end of record ( or end of file depending on the recfm and lrecl
modified by IEBGENER). Am I missing something ?
Subhankar Ray
********************************** test program **************************
program unformat
real a(100)
real aibm(100)
real cray(100)
parameter (length=100)
open (unit=10,file='cray',
1 form='unformatted')
open (unit=11,file='ibm',
1 form='unformatted')
c Initializing the array with some known values
do 100 i=1,100
a(i)= i
100 continue
write(10)a
c from cray to ibm conversion ******************
iret = cray2ibm(2,length,aibm,0,a,1)
if (iret.lt.0) write(*,*)'error'
write(11)aibm
c from IBM to Cray **********************
iret = ibm2cray(2,length,aibm,0,cray,1)
if (iret.lt.0) write(*,*)'error'
write(*,*)cray(100)
stop
end
More information about the Comp.unix.cray
mailing list