How to read input value from file in FORTRAN program?


Hi,
I have written code in FORTRAN language to read values from the input file FILE.txt.
Kindly find the program below:

Program
--------
PROGRAM idl2ftn

    INTEGER i,j
    REAL data(5,3)

  OPEN(UNIT=2, FILE="FILE.txt",FORM="FORMATTED",STATUS="OLD",ACTION="READ")
     READ (2) DATA
      DO 100 j = 1,3
       DO 100 i =1,5
          PRINT *, data
100   CONTINUE
    END

Input file:
-----------
ty FILE.TXT      
0.00000      1.00000      2.00000      3.00000      4.00000
5.00000      6.00000      7.00000      8.00000      9.00000
10.0000      11.0000      12.0000      13.0000      14.0000

When i compiled the code from vms os,it throws error as follows:
%FOR-F-MIXFILACC, mixed file access modes
  unit 1  file USR$DISK:[dev.INPUT]FILE.TXT;1
  user PC 00000000
-FOR-F-UNFIO_FMT, unformatted I/O to unit open for formatted transfers


Please can anyone resolve this issue and provide the solution.
Thanks in advance

Regards,
Prabaharan
prabaharanbAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fridomCEO/ProgrammerCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mish33Commented:
READ (2,*) DATA
0
mish33Commented:
I think 50/50 split would be fair.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming Languages-Other

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.