How do i skip the lines(consists of asterisks,spaces,character) in FORTRAN program?

Hi,

Input file test.doc consists of Astersk*,space,character and integer values in it.
I'm using fortran program to read only integer values from it.
Here i need to skip all the lines where Astersk*,space,character are used.In turn,i need to read only integer values and put it in command prompt.
Please can anyone provides coding for doing this

Input file:
==========
****INPUT FILE STARTS HERE*************
*****DATE                                    122132
*****ENGPS                      002659
*****DTGHK                                    353465
****INPUT FILE ENDS HERE**************


Thanks in advance.

Regards
Prabhu
prabaharanbAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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

Dr. KlahnPrincipal Software EngineerCommented:
The following presumes that there is only one data value per line, and that the FORTRAN compiler has a function IVAL which returns the decimal value-equivalent of a single numeric character.  The program processes the input file, parsing each line as characters.

PROGRAM TEST
CHARACTER INLINE
INTEGER INDEX, IVALUE
DIMENSION INLINE (80)
100 FORMAT (80A1)
101 FORMAT (1X, I8)
OPEN (UNIT=1, NAME="INPUT.FIL", ACCESS="READONLY")
DO WHILE (.NOT. (EOF(1))
  READ (1, 100) INLINE
  IVALUE = 0
  DO 1000 INDEX = 1, 80, 1
    IF ((INLINE(INDEX) .GE. "0") .AND. (INLINE(INDEX) .LE. "9")) THEN
      IVALUE = (IVALUE * 10) + IVAL(INLINE(INDEX))
    END IF
  1000 CONTINUE
  WRITE (5, 101) IVALUE
END DO
CLOSE (UNIT=1)
CALL EXIT
END

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
prabaharanbAuthor Commented:
Thanks for answer
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.