copyright (C) 2001  MSC-RPN COMM  %%%MC2%%%
***s/r checnml
*

      subroutine checnml (un,name,flag) 3
      implicit none
*
      character*(*) name
      integer un,flag
*
*AUTHOR   Michel Desgagne               Oct      1993
*
*REVISION
*
*LANGUAGE   Fortran 77
*
*OBJECT (checnml)
*     Check if namelist "name" is in file "un".
*
*FILES
*
*ARGUMENTS
*
*IMPLICIT
*
*
*MODULES
*
**
      character*60 dummy
*
*----------------------------------------------------------------------
*
 1    continue
      read (un,'(1x,a)',end=2,iostat=flag) dummy
      if (dummy.eq.name) then
         backspace (un)
         goto 2
      else
         goto 1
      endif               
*
*----------------------------------------------------------------------
*
 2    return
      end