Trailing-Edge
-
PDP-10 Archives
-
-
There are no other files named in the archive.
C TITLE L I S T F
C TITLE L I S T F
C PRINTS ID (IR(1)), NAME (IR(I),I=2,6)
C AND VALUES OF SELECTED WORDS OF ALL RECORDS
C IN A FILE.(NUMBER OF WORDS COMPILED TO BE .LE.8)
C THE SELECTED WORDS IN RECORD ARE COMPARED WITH
C INPUT VALUES AS TO WHETHER THEY ARE LT(-1)
C EQ(0) OR GT(1) AND ID AND NAMES
C PRINTED ACCORDINGLY.
DIMENSION IB(260),B(260),IFRMAT(3,20),IR(260),IPAR(10)
DIMENSION INDEX(8),IVALUE(8),IF(8),IPRINT(8)
DIMENSION ITOT(8) ,NT(8)
COMMON IDF,LFR,NAVR,MAXR,NSPR,LSR,LFMT,NCPR,LPTR,C1
COMMON IFRMAT
EQUIVALENCE (IB(1),B(1)),(IPAR(1),IDF),(IB(1),IR(1))
1 TYPE 503
503 FORMAT(1X,'INPUT FILE ID'/)
ACCEPT100,IDFILE
100 FORMAT(A5)
CALL SLECTF (IDFILE)
TYPE 501
501 FORMAT(1X,'INPUT NUMBER OF WORDS TO SELECT ON AND LOGIC'/)
ACCEPT101,N,LOGIC
101 FORMAT(2I)
TYPE 502
502 FORMAT(1X,'INPUT WORD INDEX,COMPARISON VALUE,-1 0 OR 1'/)
ACCEPT102,(INDEX(I),IVALUE(I),IF(I),I=1,N)
102 FORMAT(3I)
ITEM='ITEM'
PRINT200,( ITEM,INDEX(I),I=1,N)
200 FORMAT(35H1 ID NAME ,8(8X,A5, I2))
DO 50 II=1,N
ITOT(II)=0
50 NT(II)=0
LR=NAVR-NSPR
IF(LR.LE.LFR)GO TO 2
DO10LSR=LFR,LR,NSPR
IF(IGETR(IR,N,INDEX,IVALUE,IF,LOGIC))10,10,14
14 DO15I=1,N
K=INDEX(I)
15 IPRINT(I)=IR(K)
DO 51 II=1,N
K=INDEX(II)
NT(II)=NT(II)+1
IF(K.EQ.1)GO TO 51
ITOT(II)=ITOT(II)+IR(K)
51 CONTINUE
11 PRINT103,IR(1),(IR(J),J=2,6),(IPRINT(I),I=1,N)
103 FORMAT(1X,I10,1X,5A5,1X,8I10)
10 CONTINUE
PRINT 500,(NT(II),ITOT(II),II=1,N)
500 FORMAT(///1X,8(I4,I10))
2 CONTINUE
IF(ANSWER('CONTINUE?').EQ.'YES')GO TO 1
13 CALL EXIT
END