medhi@rsch.wisc.edu (Deep [ankar] Medhi) (07/19/86)
I am trying to run a code written for IBM FORTRAN IV on
vax 780 running unix. There are a few things I don't understand.
For example, there is a line
DEFINE FILE (80,1823,U,KD)
the variable U is not mentioned anywhere else. KD is an
integer*4 variable.
Then , there are READ and WRITE statments, which appear as follows:
READ(9'KD)NTEMP(1),NTEMP(2),ICNAM
WRITE(9'KD)NTEMP(1),NTEMP(2),ICNAM
. Then other ones are
READ(8)(Z(I),I=1,N)
WRITE(8)(Z(I),I=1,N)
Is there anyone out there when can tell me how to fix this
for vax/unix ?
Thanks in advance.
Deepankar Medhi
arpa : medhi@rsch.wisc.edu
UUCP : ...!siesmo!uwvax!medhikurtk@tekgen.UUCP (Kurt Krueger) (07/21/86)
In article <1052@rsch.wisc.edu> medhi@rsch.wisc.edu (Deep [ankar] Medhi) writes: >I am trying to run a code written for IBM FORTRAN IV on >vax 780 running unix. There are a few things I don't understand. >For example, there is a line > > DEFINE FILE (80,1823,U,KD) > >the variable U is not mentioned anywhere else. KD is an >integer*4 variable. Standard way: OPEN(UNIT=80,FILE='name',RECL=1823,FORM='UNFORMATTED',ACCESS='DIRECT') The KD is the 'associated' variable which keeps track of the position of the file (i.e. last random record read/wrote+1) It isn't used in this manner in standard f77. U means undefined record type, again, this has no counterpart in f77 (and shouldn't matter). >Then , there are READ and WRITE statments, which appear as follows: > > READ(9'KD)NTEMP(1),NTEMP(2),ICNAM Standard way: READ(9,REC=KD)NTEMP(1),NTEMP(2),ICNAM Warning: The code may depend on the fact that the IBM implementation will automatically increment KD each time a record is read/written. Enjoy. I haven't had to deal with these things in a long time. Hope I didn't botch any details. DEC used some of these concepts in the RT-11 Fortran IV. If you can't find an IBM manual, try for an old DEC PDP-11 manual. > > WRITE(8)(Z(I),I=1,N) This is a standard unformatted read/write. It is still a part of f77.