4      SUBROUTINE GLVECI(LAB,KPOS,KEY,NVAL,IVAL,LVAL)C0C_TITLE:  Get vector of integer PDS label valuesCC_ARGS:C      CHARACTER*(*) LAB		![I] Character string containing PDS label5      INTEGER*4     KPOS	![I] Last-used byte of labelE      CHARACTER*(*) KEY		![I] Keyword to be found (with vector value)C      INTEGER*4     NVAL	![I] Element to return; return all if zero:      INTEGER*4     IVAL(1)	![O] Returned vector of valuesI      INTEGER*4     LVAL	![O] Return code: gt 0 Number of values returned,				!    -1 key not found  -2 invalid stringFC_DESCR:  Search for keyword in character string containing PDS label.HC	  Return vector of integer values, or alternately, individual element.FC	  Label assumed to be in PDS form (Reference:  ______).  Elements ofCC	  vector must be integers separated by spaces, tabs or commas andC	  enclosed in parentheses.GC_LIMITS:  Vector restricted to 1024 characters, including parentheses.BC	   Return of single element (NVAL not zero) not yet implemented.CC_CALLS:  GTKVAL, INTCHC(C_KEYS:  PDS, FILE_LABEL, STRING_PARSINGC=C_HIST:  87aug14  R. Mehlman (RMX) UCLA/IGPP ORIGINAL VERSIONC	 87oct26  RMX  DocumentationCC_ENDC      CHARACTER*1024 VAL      CHARACTER*1 TAB      BYTE ITAB /9/C      TAB=CHAR(ITAB)A      CALL GTKVAL(LAB,KPOS,KEY,VAL,LVAL)		     ! get value string2      IF (LVAL.LE.0) GO TO 70				     ! no string?O      IF (VAL(1:1).NE.'('.OR.VAL(LVAL:LVAL).NE.')') GO TO 71 ! improper vector?	      K=2	      N=0+ 10   N=N+1					! increment element counter7 20   IF (VAL(K:K).NE.' '.AND.VAL(K:K).NE.TAB) GO TO 30*      K=K+1					! skip extra blanks & tabs      GO TO 20A 30   KCOMMA=INDEX(VAL(K:LVAL-1),',')		! element: find terminator=      KSPACE=INDEX(VAL(K:LVAL-1),' ')		!  comma, space or tab%      KTAB  =INDEX(VAL(K:LVAL-1),TAB)!      IF (KCOMMA.EQ.0) KCOMMA=999!      IF (KSPACE.EQ.0) KSPACE=999      IF (KTAB.EQ.0) KTAB=999>      KNEXT=MIN0(KCOMMA,KSPACE,KTAB)+K		! just past terminator2      KLAST=MIN0(KNEXT-2,LVAL-1)		! end of element7      IVAL(N)=INTCH(VAL(K:KLAST))		! convert to integer       K=KNEXT					! set for next      IF (K.LT.LVAL) GO TO 10      LVAL=N 70   RETURN	C  ERRORS
 71   LVAL=-2      RETURN	      END