C******************** START FILE USPLOC.FOR ; GROUP USPARM ******************
C===============================================================
C&  USPLOC  LOCATE TYPE AND # OF UREAD STRING PARAMETER, GIVEN NAME
C    ARGS:
C    ZNAME:  16 CHAR. LEFT-JUSTIFIED PARAMETER NAME
C    ITYPE:  (OUTPUT) PARAMETER TYPE:
C           =0:  PARAMETER NOT RECOGNIZED
C           =1:  LOCAL PARAMETER (@CURRENT LEVEL)
C           =2:  GLOBAL PARAMETER
C    INUM:   (OUTPUT) PARAMETER INDEX:
C           =0 IF PARAMETER NOT FOUND
C
      SUBROUTINE USPLOC(ZNAME,ITYPE,INUM)
C
      USE USERIO
      CHARACTER*16 ZNAME
C
      CALL USPCAP(ZNAME)
      ITYPE=0
      INUM=0
C
C  CHECK LOCAL PARAMETERS
C
      NP=NPLC(MAX0(NLUNIN,NLUNIO))
      DO 10 J=1,NP
        IF(ZNAME.EQ.PLCNAM(J,MAX0(NLUNIN,NLUNIO))) GO TO 20
 10   CONTINUE
      GO TO 50
C  FOUND
 20   CONTINUE
      ITYPE=1
      INUM=J
      RETURN
C
C  CHECK GLOBAL PARAMETERS
C
 50   CONTINUE
      NP=NPGC
      DO 60 J=1,NP
        IF(ZNAME.EQ.PGLNAM(J)) GO TO 70
 60   CONTINUE
      GO TO 100
C  FOUND
 70   CONTINUE
      ITYPE=2
      INUM=J
      RETURN
C  NOT FOUND
 100  CONTINUE
      RETURN
C
      	END
C******************** END FILE USPLOC.FOR ; GROUP USPARM ******************
