Trailing-Edge
-
PDP-10 Archives
-
-
There are no other files named in the archive.
C TITLE S R T S H L
C SORT UTILITY PROGRAM (2 PACKS)
C MAXIMUM NSPR=26
COMMON IPAR(10),IFRMAT(3,19)
NPACK=NANSWR('NUMBER OF PACKS TO BE USED IN SORT?')
TYPE 203
203 FORMAT(1X,'INPUT PACK NAME CONTAINING MASTER FILE'/)
ACCEPT 204,IPACK1
204 FORMAT(A5)
TYPE 205
205 FORMAT(1X,'INPUT PACK NAME ON WHICH TO PUT TEMPORARY FILE'/)
ACCEPT 204,IPACK2
TYPE 105
105 FORMAT(1X,'INPUT MASTER FILE ,TEMPORARY FILE , FILE TO STORE
1 RESULTS, IN FORMAT(3A5)'/)
ACCEPT 201,ISORT,IESTB,ISTORE
201 FORMAT(3A5)
TYPE 100
100 FORMAT(1X,'INPUT THE NUMBER OF WORDS TO SORT ON'/)
ACCEPT 101,NW
101 FORMAT(I)
DO 1 I=1,NW
TYPE 102
102 FORMAT(1X,'INPUT W0RD NUMBER,DIGIT OR CHARACTER(FROM RIGHT)'/)
TYPE 103
103 FORMAT(1X,'TO START SORT ON, NUMBER OF DIGITS TO SORT'/)
ACCEPT 202,IW,NDIG,NPAS
202 FORMAT(3I)
NK=IW/10+1
IW=IW-10*(NK-1)
TYPE 104
104 FORMAT(1X,'INPUT 2 IF WORD IS INTEGER,3 IF ALPHA'/)
ACCEPT 200,MODE
200 FORMAT(I)
IF((NPAS-2*(NPAS/2).EQ.0))GO TO 2
MODE=1
GO TO 3
2 IF(MODE.EQ.2)NPAS=NPAS/2
3 CONTINUE
TYPE 600,IPACK1,IPACK2,ISORT,IESTB,ISTORE,IW,NPAS,NDIG,NK,MODE
600 FORMAT(1X,5A6,5I3/)
CALL RLSORT(NPACK,IPACK1,ISORT,IPACK2,IESTB,ISTORE,IW,NPAS,NDIG,
1NK,MODE)
1 CONTINUE
IF(IESTB.EQ.ISTORE) GO TO 4
CALL SLCTF(0,IESTB)
CALL DELETF
4 CALL EXIT
END