      SUBROUTINE NSERCH(CNAM,LOC,CNAMES,INAMES)
C
C     NSERCH IS USED BY SUBROUTINES TRUNAM AND SETNAM ONLY.
C
C ****  LOOKS FOR FIRST ARGUMENT IN NAMES LIST, SENDS BACK
C *****  LOCATION.  IF NO NAME, SENDS LOC = -1.
C
      CHARACTER CNAM*(*),CNAMES*(*)
      DIMENSION CNAMES(*)
      DIMENSION INAMES(-4:*)
C
      KK = INAMES(-4)
      ILEN = LEN(CNAM)
      DO 10 I=1,KK
      IANS = -1
      IF (CNAM(1:ILEN).EQ.CNAMES(I)(1:ILEN)) IANS = 0
      IF (IANS.EQ.0) GO TO 20
C
10    CONTINUE
      LOC = -1
      RETURN
C
20    LOC = I
      RETURN
      END
