&      SUBROUTINE XXSCON (ICON,NCON,IR)GC_TITLE  XXSCON  Apply IRTM sequence constraints to database variables.C_ARGUMENTSA	INTEGER*2 ICON(4,NCON) ![I] Constraint array has ID,MIN,MAX,IPTR2	INTEGER*4 NCON	       ![I] Number of constraints.-	INTEGER*4 IR	       ![I] Return status code.H                               !IR = 0, The sequence passed the geometryM                               !constaints.  IR = -1, No, the sequence failed)	                       !the constraints.C_VAR:      COMMON /XXSCOM/ MSEQ1(29),MQAVE,MGEOM(2,8),MSEQ2(74) 	AC_DESCRIPTION Module XXSCON shall apply IRTM sequence constraintsIC  for codes GT 1000, or automatically to codes corresponding to databaseHC  constraint entries.  This is a first check to determine if a sequenceHC  of data entirely misses the constraints entered by the user.  If thisDC  check is successful the next check performed is by module XXGSET.CHC  Any unsatisfied constraint shall result in a return code to skip the GC  sequence. Any sequence with all-14 quality (MQAVE = 140) is skipped.LC  There are N constraint quadruples in array icon, these are id,min,max,ptrLC  (ptr. not used here).  The valid sequence constraint codes are 1001=ZLNG,KC  1002=ZCOL, 1003=JULIAN DATE, 1004= AVERAGE QUALITY, (degree input is in IC  tenths of degrees, Julian date is in days, average quality in tenths).DC  Database constraint codes are automatically applied to sequences.GC  A return code of 0=TO PROCESS, and a -1 indicates to XGDATA to skip C  the sequence. C_CALLS  LIMIT     COMMON XXSCOMOC_HISTORY  82DEC31  R.Mehlman UCLA AFTER IRPS SEQDCN OF 3/18/81 MINS and MAXES.LC 1/17/83 Automatic comparison of database geometry constraints to sequencesHC Robert L. Gurule, USGS Flagstaff, Modified to NIMS/VIMS documentation C Standards.C_END'      INTEGER*2 MSEQ1,MGEOM,MSEQ2,MQAVE#      INTEGER*2 LSCALE(4) /8,8,1,1/%      INTEGER*2 LOCS(4) /19,20,21,30/6      INTEGER*2 LOCV(17) /0,0,6,8,0,0,4,5,1,2,7,3,5*0/.!-----Skip sequences which are all-14 quality.       IF (MQAVE.EQ.140) GO TO 60      IF (NCON.LE.0) RETURN=!-----Loop on constraints (skip function & time constraints).      DO 50 K=1,NCON        KODE=ICON(1,K)        IF (KODE.LE.1) GO TO 50"        IF (KODE.GT.1000) GO TO 40O!-----Database items: reduce codes to column 1, translate to geomlib locations.=        IF (KODE.GT.17.AND.KODE.LE.83) KODE=MOD(KODE-17,11)+6        L=LOCV(KODE)$!-----Skip non-geometry constraints.        IF (L.LE.0) GO TO 50!-----Geometry item.        LTEST=1<!-----Loop on seq min & max, skip if nonintersecting ranges.      DO 30 J=1,2-        CALL LIMIT(MGEOM(J,L),ICON(2,K),0,LR)!        IF (LR.EQ.LTEST) GO TO 60 30   LTEST=-1!-----End loop on min & max.        go to 50'!-----Single-item sequence constraints. 40     KODE=KODE-1000,        IF (KODE.LE.0.OR.KODE.GT.4) GO TO 50 45    L=LOCS(KODE)7       CALL LIMIT(MSEQ1(L)/LSCALE(KODE),ICON(2,K),0,LR)       IF (LR.NE.0) GO TO 60 50   CONTINUE!-----End loop on constraints!     set to process sequence
 55   IR=0      RETURN!-----Set to skip sequence. 60   IR=-1      RETURN	      END