FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 1   

DRIVER.FTN   	/TR:BLOCKS/WR


        C

        C

        C

        C

        C

        C

        C	FILE COMPARE UTILITY

        C

        C

        C

        C

        C

        C

        C	COPYRIGHT (C) 1976

        C	DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

        C

        C	THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

        C	SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

        C	SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

        C	OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

        C	AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

        C	AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

        C	OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

        C

        C	THE INFORMATION IN THIS SOFTWARE  IS  SUBJECT TO CHANGE WITHOUT

        C	NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

        C	EQUIPMENT CORPORATION.

        C

        C	DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

        C	SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

        C	COPYRIGHT (C) 1976

        C	DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

        C

        C

        C

        C	K. MORSE  13-OCT-76

        C

        C

        C

        C

        C

        C

        C	THE FILE COMPARE PROGRAM COMPARES TWO FILES AND OUTPUTS (AS REQUESTED)

        C	THE RECORDS WITHOUT MATCHES.  IT PROMPTS FOR A COMMAND STRING OF

        C	"OUTPUT=INPUT,COMPARE" WITH THE CHARACTERS "DIF>".  THE NUMEROUS

        C	SWITCHES AND OUTPUT VARIATIONS ARE DESCRIBED IN THE FUNCTIONAL

        C	SPECIFICATION.  THIS ROUTINE DRIVES THE PROGRAM.

        C

        C

        C

        C  MODIFICATIONS:

        C

        C NO		DATE		PROGRAMMER		PURPOSE

        C --		----		----------		-------

        C

        C

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 2   

DRIVER.FTN   	/TR:BLOCKS/WR


         

        C

        C

        C

        C

        C

        C  VARIABLES:

        C

        C	BARFIL--INDICATOR FOR WHICH FILES TO OUTPUT IN CHANGE-BAR FORMAT

        C	CLSLNG--LENGTH OF ASCII STRING "CLOSE"

        C	CLSTYP--ASCII ARRAY SPECIFYING THE WORD  "CLOSE"

        C	CLUN--LOGICAL UNIT NUMBER FOR OPENING COMPARE FILE CHANNEL

        C	CNMLNG--LENGTH OF THE COMPARE FILE SPECIFICATION

        C	COMREC--BUFFER FOR COMPARE-FILE RECORD I/O

        C	COMTYP--ASCII ARRAY SPECIFYING FILE TYPE "COMPARE"

        C	COPIES--NUMBER OF COPIES TO SPOOL

        C	CSTAT--STATUS OF TYPE OF CLOSE FOR COMPARE FILE CHANNEL

        C	CTYLNG--LENGTH OF THE STRING SPECIFYING THE FILE TYPE "COMPARE"

        C	CTYPE--TYPE OF OPEN FOR COMPARE FILE (0=INPUT, 1=OUTPUT)

        C	ERRTYP--ARRAY OF ERROR CODES

        C	IERR1--ERROR INDICATOR BETWEEN FORTRAN ROUTINES, <1 = ERROR

        C	IERR2--ERROR INDICATOR FOR MACRO ROUTINES, <1 = ERROR

        C	IFIRST--RECORD NUMBER OF THE FIRST RECORD LENGTH HELD IN IHOLD

        C	IKIND--INDICATOR FOR TYPE OF OUTPUT TO BE PRODUCED

        C	ILUN--LOGICAL UNIT NUMBER FOR OPENING INPUT FILE CHANNEL

        C	INMLNG--LENGTH OF THE INPUT FILE SPECIFICATION

        C	INOUT--INDICATOR WHETHER FILE RECORDS ARE TO BE EDITTED FOR

        C	       INPUT OR OUTPUT

        C	INPNAM--ASCII INPUT FILE SPECIFICATION

        C	INPTYP--ASCII ARRAY SPECIFYING FILE TYPE "INPUT"

        C	IOATT--FUNCTION CODE FOR QIO TO ATTACH TERMINAL

        C	IRECSZ--MAXIMUM RECORD SIZE FOR FILES

        C	ISTAT--STATUS OF TYPE OF CLOSE FOR INPUT FILE CHANNEL

        C	ISWTCH--VALUE OF SWITCHES SPECIFIED WITH INPUT FILE SPECIFICATION

        C	ITTY--INDICATOR IF OUTPUT FILE IS TO A TELETYPE

        C	ITYLNG--LENGTH OF THE STRING SPECIFYING THE FILE TYPE "INPUT"

        C	ITYPE--TYPE OF OPEN FOR INPUT FILE (0=INPUT, 1=OUTPUT)

        C	LAST--RECORD NUMBER OF THE LAST RECORD LENGTH HELD IN IHOLD

        C	LENCOM--LENGTH OF COMPARE-FILE RECORD JUST READ

        C	LENINP--LENGTH OF INPUT-FILE RECORD JUST READ

        C	LINNUM--INDICATOR FOR LINENUMBERS ON CHANGE-BAR OUTPUT,

        C	        1 = PRODUCE NUMBERS, 0 = NO NUMBERS

        C	LINSIZ--NUMBER OF CHARACTERS PER OUTPUT LINE

        C	MAPNAM--NAME OF TEMPORARY FILE USED TO STORE MAPPING VALUES

        C	MAPTYP--ASCII IDENTIFIER FOR MAP FILE ERROR MESSAGES

        C	MLUN--CHANNEL FOR MAP FILE

        C	MNMLNG--LENGTH OF MAP FILE NAME

        C	MSTAT--INDICATOR FOR TYPE OF CLOSE TO PERFORM

        C	MTYLNG--LENGTH OF ASCII STRING CALLED MAPTYP

        C	MTYPE--INDICATOR FOR TYPE OF OPEN TO PERFORM

        C	NOBYTE--SUBROUTINE PARAMETER INDICATING NO BYTE VALUE PASSED HERE

        C	NOINTG--SUBROUTINE PARAMETER INDICATING NO INTEGER VALUE PASSED HERE

        C	NSWVAL--TABLE OF VALUES SET FOR EACH SWITCH IN SWTABL

        C	OLUN--LOGICAL UNIT NUMBER FOR OPENING OUTPUT FILE CHANNEL

        C	ONMLNG--LENGTH OF THE OUTPUT FILE SPECIFICATION

        C	OPNLNG--LENGTH OF ASCII STRING "OPEN"

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 3   

DRIVER.FTN   	/TR:BLOCKS/WR


        C	OPNTYP--ASCII ARRAY SPECIFYING THE WORD "OPEN"

        C	OSTAT--STATUS OF TYPE OF CLOSE FOR OUTPUT FILE CHANNEL

        C	OSWTCH--SWITCHES SPECIFIED WITH OUTPUT FILE SPECIFICATION

        C	OTYLNG--LENGTH OF THE STRING SPECIFYING THE FILE TYPE "OUTPUT"

        C	OTYPE--TYPE OF OPEN FOR OUTPUT FILE (0=INPUT, 1=OUTPUT)

        C	OUTMOD--MODE OF OUTPUT REQUESTED, I.E., ASCII, OCTAL, OR HEXADECIMAL

        C	OUTNAM--OUTPUT FILE SPECIFICATION

        C	OUTTYP--ASCII ARRAY SPECIFYING FILE TYPE "OUTPUT"

        C	PROMPT--PROMPT STRING FOR REQUESTING A COMMAND LINE

        C	RECORD--BUFFER FOR INPUT-FILE RECORD I/O

        C	SWTABL--TABLE DEFINING SWITCHES ALLOWED IN COMMAND LINE

        C

        C

        C

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 4   

DRIVER.FTN   	/TR:BLOCKS/WR


         

0001    	COMMON MAP(100,2),NUMLIN,MAPTOP(2),LSTMAP(2),MLUN,IHOLD(30,2),

        	1NINCOR,IFREE(2),IFIRST(2),LAST(2),MAXBUF,BUFR,ISWTCH,

        	2COMCHR,NSWVAL(10),LSTMAT(2),IRECSZ,MRKPNT(4,2),

        	3INOUT,MAPEND(2),LINSIZ,MAPNAM,MNMLNG,MTYPE,MSTAT

        	4,IERR1,IERR2,IKIND,OLUN,MAPMRK(3,2),MPRINT,BARCHR

        C

        C

0002    	COMMON /INIT/  BARFIL,CDFLNG,CLUN,CNMLNG,COMREC,COMNAM,

        	1COPIES,CSTAT,CTYPE,ILUN,INMLNG,INPNAM,ISTAT,ITTY,ITYPE,

        	2LENCOM,LENINP,MATSIZ,NUMISW,NUMOSW,ONMLNG,OSTAT,OSWTCH,

        	3MAXDIF,LINNUM,

        	4OTYPE,OUTMOD,OUTNAM,PROMPT,RECORD,VERLNG,WINDOW,SWTABL,VERSON

         

0003    	INTEGER CNMLNG,ONMLNG,OTYLNG,CTYLNG,CDFLNG

0004    	INTEGER OSWTCH,CSWTCH,PROLNG,CLUN,OLUN,OSTAT,CSTAT,OPNLNG,CLSLNG

0005    	INTEGER CTYPE,OTYPE,VERLNG

0006    	INTEGER WINDOW

0007    	INTEGER LINWID(2),ERRTYP(9),BARFIL

0008    	INTEGER COPIES

        C

        C

0009    	BYTE BUFR(7680,2),COMCHR(16)

0010    	BYTE BARCHR,OUTMOD(3)

0011    	BYTE RECORD(512),COMREC(512)

0012    	BYTE OUTNAM(42),INPNAM(42),COMNAM(42),MAPNAM(12)

0013    	BYTE OUTTYP(6),INPTYP(5),OPNTYP(4),CLSTYP(5),COMTYP(7),MAPTYP(14)

0014    	BYTE VERSON(5),NOBYTE

0015    	BYTE PROMPT(5),SWTABL(75)

        C

        C

0016    	DATA MAPTYP/'T','E','M','P','O','R','A','R','Y',' ','D','A','T','A'/

0017    	DATA MTYLNG/14/

0018    	DATA OUTTYP/'O','U','T','P','U','T'/,OTYLNG/6/

0019    	DATA INPTYP/'I','N','P','U','T'/,ITYLNG/5/

0020    	DATA COMTYP/'C','O','M','P','A','R','E'/CTYLNG/7/

0021    	DATA OPNTYP/'O','P','E','N'/,OPNLNG/4/

0022    	DATA CLSTYP/'C','L','O','S','E'/,CLSLNG/5/

0023    	DATA ERRTYP/-1,-2,-3,-4,-5,-6,-7,-8,-9/

0024    	DATA IOATT/O1400/

        C

        C

        C	FILE COMPARE FORMATS

        C

        C

0025    291	FORMAT(' ',<MIN0(LINSIZ,72)>('*'),/' ',<MIN0(LINSIZ,72)/2-11>

        	1('*'),' FILE COMPARE UTILITY ',<MIN0(LINSIZ,72)/2-11>('*')

        	2,/' ',<MIN0(LINSIZ,72)/2-10>('*'),' DIF -- VERSION 1.0 '

        	3,<MIN0(LINSIZ,72)/2-10>('*'),/' ',<MIN0(LINSIZ,72)>('*')//)

0026    9991	FORMAT(' DIF OUTPUT IN FILE ',<ONMLNG>A1)

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 5   

DRIVER.FTN   	/TR:BLOCKS/WR


         

        C

        C

        C	INITIALIZE ALL PARAMETERS THAT MAY BE USED AS ERROR RETURN CODES.

        C

        C

0027    50	IERR1=1

0028    	CALL SETUP

0029    	GOTO (9500,9510,9530,9520,9540,9800,9810,9820,9550,9555,9550

        	1,9570,9630,9700,9770,9600,9660,9760,9030,9590,9650,9730,9780

        	2,9050,9070,9060,9080),-IERR1

        C

        C

        C	COMPARE THE FILES, CREATING THE MAP FILE.

        C

        C

0030    	CALL COMPAR

0031    	GOTO (9500,9510,9530,9520,9540,9800,9810,9820,9550,9555,9550

        	1,9570,9630,9700,9770,9600,9660,9760,9030,9590,9650,9730,9780

        	2,9050,9070,9060,9080),-IERR1

        C

        C

        C	CHECK FOR TYPE OF OUTPUT DESIRED.

        C

        C

        C	SET INDICATOR TO OUTPUT EDIT FOR FILE RECORDS.

        C

0032    100	INOUT=1

        C

        C	SLP?

        C

0033    	IF ((OSWTCH .AND. NSWVAL(5)) .NE. NSWVAL(5)) GOTO 1050

0034    	IKIND=1

0035    	CALL INIT

0036    	CALL SLP(ILUN,RECORD,LENINP,ISTAT,INPNAM,INMLNG,ITYPE,CLUN,

        	1CSTAT,COMREC,LENCOM,COMNAM,CNMLNG,CTYPE)

0037    	GOTO (9500,9510,9530,9520,9540,9800,9810,9820,9550,9555,9550

        	1,9570,9630,9700,9770,9600,9660,9760,9030,9590,9650,9730,9780

        	2,9050,9070,9060,9080),-IERR1

0038    	INOUT=INOUT+1

        C

        C	CHANGE-BAR?

        C

0039    1050	IF ((ITTY .AND. NSWVAL(1)) .EQ. NSWVAL(1)) CALL QIO(IOATT,5)

0040    	IF (INOUT .LE. 1)WRITE(OLUN,291,ERR=9760)

0041    	IF (BARFIL .EQ. 0) GOTO 1060

0042    	DO 150 I=1,3

0043    	IF (OUTMOD(I) .EQ. 0) GOTO 150

0044    	IKIND=1+LINNUM

0045    	CALL INIT

0046    	IF ((BARFIL .AND. NSWVAL(1)) .EQ. NSWVAL(1))

        	1CALL CNGBAR(ILUN,RECORD,LENINP,ISTAT,INPNAM,INMLNG,ITYPE,OUTMOD(I))

0047    	GOTO (9500,9510,9530,9520,9540,9800,9810,9820,9550,9555,9550

        	1,9570,9630,9700,9770,9600,9660,9760,9030,9590,9650,9730,9780

        	2,9050,9070,9060,9080),-IERR1

0048    	IF ((BARFIL .AND. NSWVAL(1)) .EQ. NSWVAL(1))INOUT=INOUT + 1

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 6   

DRIVER.FTN   	/TR:BLOCKS/WR


0049    	IKIND=1+LINNUM

0050    	CALL INIT

0051    	IF ((BARFIL .AND. NSWVAL(2)) .EQ. NSWVAL(2))

        	1CALL CNGBAR(CLUN,COMREC,LENINP,CSTAT,COMNAM,CNMLNG,CTYPE,OUTMOD(I))

0052    	GOTO (9500,9510,9530,9520,9540,9800,9810,9820,9550,9555,9550

        	1,9570,9630,9700,9770,9600,9660,9760,9030,9590,9650,9730,9780

        	2,9050,9070,9060,9080),-IERR1

0053      	IF ((BARFIL .AND. NSWVAL(2)) .EQ. NSWVAL(2))INOUT=INOUT+1

0054    150	CONTINUE

        C

        C	LIST OF DIFFERENCES?

        C

0055    1060	IF ((OSWTCH .AND. NSWVAL(6)) .NE. NSWVAL(6)) GOTO 1080

0056    	IKIND=3

0057    	DO 1075 I=1,3

0058    	IF (OUTMOD(I) .EQ. 0) GOTO 1075

0059    	CALL INIT

0060    	CALL LSTDIF(ILUN,RECORD,LENINP,ISTAT,INPNAM,INMLNG,ITYPE,CLUN,

        	1CSTAT,COMREC,LENCOM,COMNAM,CNMLNG,CTYPE,OUTMOD(I))

0061    	GOTO (9500,9510,9530,9520,9540,9800,9810,9820,9550,9555,9550

        	1,9570,9630,9700,9770,9600,9660,9760,9030,9590,9650,9730,9780

        	2,9050,9070,9060,9080),-IERR1

0062    	INOUT=INOUT+1

0063    1075	CONTINUE

        C

        C	MERGED DIFFERENCES?

        C

0064    1080	IF ((OSWTCH .AND. NSWVAL(7)) .EQ. NSWVAL(7)) GOTO 1085

0065    	IF (((OSWTCH .AND. NSWVAL(6)) .EQ. NSWVAL(6))

        	1.OR. ((OSWTCH .AND. NSWVAL(5)) .EQ. NSWVAL(5))

        	2.OR. (BARFIL .NE. 0)) GOTO 1090

0066    1085	IKIND=4

0067    	DO 1086 I=1,3

0068    	IF (OUTMOD(I) .EQ. 0) GOTO 1086

0069    	CALL INIT

0070    	CALL MRGDIF(ILUN,RECORD,LENINP,ISTAT,INPNAM,INMLNG,ITYPE,CLUN,

        	1CSTAT,COMREC,LENCOM,COMNAM,CNMLNG,CTYPE,OUTMOD(I))

0071    	GOTO (9500,9510,9530,9520,9540,9800,9810,9820,9550,9555,9550

        	1,9570,9630,9700,9770,9600,9660,9760,9030,9590,9650,9730,9780

        	2,9050,9070,9060,9080),-IERR1

0072    	INOUT=INOUT+1

0073    1086	CONTINUE

        C

        C	DELETE MAP FILE.

        C

0074    1090	MLUN=7

0075    	CALL OPNFIL(MAPNAM,MNMLNG,MLUN,RECORD,IRECSZ,MTYPE,IERR2)

0076    	IF (IERR2 .LE. 0) GOTO 9050

0077    	MSTAT=1

0078    	CALL CLSFIL(MLUN,MSTAT,IERR2)

0079    	IF (IERR2 .LE. 0) GOTO 9070

0080    	GOTO 9997

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 7   

DRIVER.FTN   	/TR:BLOCKS/WR


         

        C

        C

        C	FILE COMPARE ERRORS

        C

        C

        C

        C

        C	MACRO ROUTINE ERRORS

        C

        C

        C

        C	GETCML ERRORS

        C

0081    9500	IF (IERR2.EQ.0) GOTO 10000

0082    	CALL ERRORS(ERRTYP(1),IERR2,PROMPT(2),NOBYTE,NOINTG,NOBYTE,

        	1NOINTG,NOBYTE)

0083    	GOTO 50

        C

        C

        C	SYNTX ERRORS

        C

        C

0084    9510	CALL ERRORS(ERRTYP(2),IERR2,PROMPT(2),RECORD,LENINP,NOBYTE,

        	1NOINTG,NOBYTE)

0085    	GOTO 50

        C

        C

        C	SCANO/SCANI ERRORS

        C

        C

        C	OUTPUT ERROR

        C

0086    9520	CALL ERRORS(ERRTYP(3),IERR2,PROMPT(2),OUTTYP,OTYLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0087    	GOTO 50

        C

        C	INPUT ERROR

        C

0088    9530	CALL ERRORS(ERRTYP(3),IERR2,PROMPT(2),INPTYP,ITYLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0089    	GOTO 50

        C

        C	COMPARE ERROR

        C

0090    9540	CALL ERRORS(ERRTYP(3),IERR2,PROMPT(2),COMTYP,CTYLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0091    	GOTO 50

        C

        C

        C	NSWVAL TABLE ERROR

        C

        C

        C	FOR INPUT FILES

        C

0092    9550	CALL ERRORS(ERRTYP(4),IERR2,PROMPT(2),SWTABL(13),NOINTG,NOBYTE,

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 8   

DRIVER.FTN   	/TR:BLOCKS/WR


          	1NOINTG,NOBYTE)

0093    	GOTO 50

        C

        C	FOR OUTPUT FILES

        C

0094    9555	CALL ERRORS(ERRTYP(4),IERR2,PROMPT(2),SWTABL,NOINTG,NOBYTE,

        	1NOINTG,NOBYTE)

0095    	GOTO 50

        C

        C

        C	OPEN FILE ERRORS

        C

        C

        C

        C	FOR INPUT FILE

        C

0096    9570	CALL ERRORS(ERRTYP(5),IERR2,PROMPT(2),INPTYP,ITYLNG,INPNAM,

        	1INMLNG,RECORD(1))

0097    	GOTO 50

        C

        C	FOR COMPARE FILE

        C

0098    9590	CALL ERRORS(ERRTYP(5),IERR2,PROMPT(2),COMTYP,CTYLNG,COMNAM,

        	1CNMLNG,COMREC(1))

0099    	GOTO 9999

        C

        C	FOR OUTPUT FILE

        C

0100    9600	IF ((ITTY .AND. NSWVAL(1)) .EQ. NSWVAL(1)) IERR2=-7

0101    	CALL ERRORS(ERRTYP(5),IERR2,PROMPT(2),OUTTYP,OTYLNG,OUTNAM,

        	1ONMLNG,RECORD(1))

0102    	GOTO 9998

        C

        C	FOR MAP FILE

        C

0103    9050	CALL ERRORS(ERRTYP(5),IERR2,PROMPT(2),MAPTYP,MTYLNG,MAPNAM,

        	1MNMLNG,RECORD(1))

0104    	GOTO 9996

        C

        C

        C	CLOSE ERRORS

        C

        C

        C

        C	ON INPUT FILE

        C

0105    9630	CALL ERRORS(ERRTYP(6),IERR2,PROMPT(2),INPNAM,INMLNG,NOBYTE,

        	1ISTAT,NOBYTE)

0106    	GOTO 50

        C

        C	ON COMPARE FILE

        C

0107    9650	CALL ERRORS(ERRTYP(6),IERR2,PROMPT(2),COMNAM,CNMLNG,NOBYTE,

        	1CSTAT,NOBYTE)

0108    	GOTO 9999

        C

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 9   

DRIVER.FTN   	/TR:BLOCKS/WR


        C	ON OUTPUT FILE

        C

0109    9660	IF ((ITTY .AND. NSWVAL(1)) .EQ. NSWVAL(1)) IERR2=-7

0110    	CALL ERRORS(ERRTYP(6),IERR2,PROMPT(2),OUTNAM,ONMLNG,NOBYTE

        	1,OSTAT,NOBYTE)

0111    	GOTO 9998

        C

        C	ON MAP FILE

        C

0112    9070	CALL ERRORS(ERRTYP(6),IERR2,PROMPT(2),MAPNAM,MNMLNG,NOBYTE,

        	1MSTAT,NOBYTE)

0113    	GOTO 9996

        C

        C

        C

        C	READ/WRITE ERRORS

        C

        C

        C	ON INPUT FILE

        C

0114    9700	CALL ERRORS(ERRTYP(7),IERR2,PROMPT(2),INPNAM,INMLNG,RECORD,

        	1LENINP,NOBYTE)

0115    	GOTO 9996

        C

        C	ON COMPARE FILE

        C

0116    9730	CALL ERRORS(ERRTYP(7),IERR2,PROMPT(2),COMNAM,CNMLNG,COMREC,

        	1LENCOM,NOBYTE)

0117    	GOTO 9996

        C

        C	ON OUTPUT FILE

        C

0118    9760	CALL ERRORS(ERRTYP(7),IERR2,PROMPT(2),OUTNAM,ONMLNG,RECORD,

        	1LENINP,NOBYTE)

0119    	GOTO 9996

        C

        C	ON MAP FILE

        C

0120    9060	CALL ERRORS(ERRTYP(7),IERR2,PROMPT(2),MAPNAM,MNMLNG,RECORD,

        	1LENINP,NOBYTE)

0121    	GOTO 9996

        C

        C

        C

        C	MARK/POINT ERRORS

        C

        C	FOR INPUT FILE

        C

0122    9770	CALL ERRORS(ERRTYP(8),IERR2,PROMPT(2),INPNAM,INMLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0123    	GOTO 9996

        C

        C	FOR COMPARE FILE

        C

0124    9780	CALL ERRORS(ERRTYP(8),IERR2,PROMPT(2),COMNAM,CNMLNG,NOBYTE,

        	1NOINTG,NOBYTE)

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 10  

DRIVER.FTN   	/TR:BLOCKS/WR


0125    	GOTO 9996

        C

        C	FOR OUTPUT FILE

        C

0126    9030	CALL ERRORS(ERRTYP(8),IERR2,PROMPT(2),OUTNAM,ONMLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0127    	GOTO 9996

        C

        C	FOR MAP FILE

        C

0128    9080	CALL ERRORS(ERRTYP(8),IERR2,PROMPT(2),MAPNAM,MNMLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0129    	GOTO 9996

        C

        C	VERSION ERRORS

        C

0130    9800	CALL ERRORS(ERRTYP(9),IERR2,PROMPT(2),INPNAM,INMLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0131    	GOTO 9996

0132    9810	CALL ERRORS(ERRTYP(9),IERR2,PROMPT(2),COMNAM,CNMLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0133    	GOTO 9996

0134    9820	CALL ERRORS(ERRTYP(9),IERR2,PROMPT(2),OUTNAM,ONMLNG,NOBYTE,

        	1NOINTG,NOBYTE)

0135    	GOTO 9996

        C

        C

        C	CLOSE ALL FILES

        C

0136    9996	OSTAT=1

        C

0137    9997	IF ((ITTY.AND.NSWVAL(1)) .EQ. NSWVAL(1)) GOTO 9995

0138    	IF (((OSWTCH.AND.NSWVAL(2)) .EQ. NSWVAL(2)) .AND. OSTAT.NE.1) 

        	1 OSTAT=2

0139    	IF (OSTAT.EQ.1) CLOSE (UNIT=OLUN,DISPOSE='DELETE',ERR=9660)

0140    	IF (OSTAT.NE.1) CLOSE (UNIT=OLUN,ERR=9660)

0141    	IF (OSTAT.NE.1)WRITE(5,9991)(OUTNAM(I),I=1,ONMLNG)

0142    	IF (OSTAT.NE.2) GOTO 9998

0143    	IF (COPIES.LT.1) COPIES=1

0144    	DO 9993 I=1,COPIES

0145    	OTYPE=0

0146    	CALL OPNFIL(OUTNAM,ONMLNG,OLUN,RECORD,IRECSZ,OTYPE,IERR2)

0147    	OTYPE=1

0148    	IF (IERR2.LE.0) GOTO 9600

0149    	CALL CLSFIL(OLUN,OSTAT,IERR2)

0150    9993	IF (IERR2.LE.0) GOTO 9660

0151    	GOTO 9998

0152    9995	CLOSE (UNIT=2,ERR=9660)

        C

        C	EXECUTE CLOSES ONLY ON ERROR RECOVERY.

        C

0153    9998	IF (OSTAT .NE. 1) GOTO 50

0154    	CALL CLSFIL(CLUN,CSTAT,IERR2)

0155    	IF (IERR2.LE.0) GOTO 9650

0156    9999	CALL CLSFIL(ILUN,ISTAT,IERR2)

0157    	IF (IERR2.LE.0) GOTO 9630

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 11  

DRIVER.FTN   	/TR:BLOCKS/WR


0158    	MSTAT=1

0159    	CALL CLSFIL(MLUN,MSTAT,IERR2)

0160    	GOTO 50

0161    10000	CALL EXIT

0162    	END

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 12  

DRIVER.FTN   	/TR:BLOCKS/WR


PROGRAM SECTIONS



NUMBER	 NAME	    SIZE		ATTRIBUTES



  1	$CODE1	003372   893		RW,I,CON,LCL

  2	$PDATA	000100    32		RW,D,CON,LCL

  3	$IDATA	001462   409		RW,D,CON,LCL

  4	$VARS	000126    43		RW,D,CON,LCL

  5	$TEMPS	000002     1		RW,D,CON,LCL

  6	.$$$$.	037222  8009		RW,D,OVR,GBL

  7	INIT	002410   644		RW,D,OVR,GBL





VARIABLES



 NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS    NAME   TYPE  ADDRESS   



 BARCHR	L*1   6-037220	 BARFIL	I*2   7-000000	 CDFLNG	I*2   7-000002	 CLSLNG	I*2   4-000012	 CLUN	I*2   7-000004

 CNMLNG	I*2   7-000006	 COPIES	I*2   7-001062	 CSTAT	I*2   7-001064	 CSWTCH	I*2   4-000004	 CTYLNG	I*2   4-000002

 CTYPE	I*2   7-001066	 I	I*2   4-000122	 IERR1	I*2   6-037172	 IERR2	I*2   6-037174	 IKIND	I*2   6-037176

 ILUN	I*2   7-001070	 INMLNG	I*2   7-001072	 INOUT	I*2   6-037140	 IOATT	I*2   4-000120	 IRECSZ	I*2   6-037116

 ISTAT	I*2   7-001146	 ISWTCH	I*2   6-037044	 ITTY	I*2   7-001150	 ITYLNG	I*2   4-000116	 ITYPE	I*2   7-001152

 LENCOM	I*2   7-001154	 LENINP	I*2   7-001156	 LINNUM	I*2   7-001176	 LINSIZ	I*2   6-037146	 MATSIZ	I*2   7-001160

 MAXBUF	I*2   6-001042	 MAXDIF	I*2   7-001174	 MLUN	I*2   6-000632	 MNMLNG	I*2   6-037164	 MPRINT	I*2   6-037216

 MSTAT	I*2   6-037170	 MTYLNG	I*2   4-000114	 MTYPE	I*2   6-037166	 NINCOR	I*2   6-001024	 NOBYTE	L*1   4-000113

 NOINTG	I*2   4-000124	 NUMISW	I*2   7-001162	 NUMLIN	I*2   6-000620	 NUMOSW	I*2   7-001164	 OLUN	I*2   6-037200

 ONMLNG	I*2   7-001166	 OPNLNG	I*2   4-000010	 OSTAT	I*2   7-001170	 OSWTCH	I*2   7-001172	 OTYLNG	I*2   4-000000

 OTYPE	I*2   7-001200	 PROLNG	I*2   4-000006	 VERLNG	I*2   7-002264	 WINDOW	I*2   7-002266





ARRAYS



 NAME   TYPE  ADDRESS	    SIZE 	DIMENSIONS



 BUFR	L*1   6-001044	036000  7680	(7680,2)

 CLSTYP	L*1   4-000061	000005     2	(5)

 COMCHR	L*1   6-037046	000020     8	(16)

 COMNAM	L*1   7-001010	000052    21	(42)

 COMREC	L*1   7-000010	001000   256	(512)

 COMTYP	L*1   4-000066	000007     3	(7)

 ERRTYP	I*2   4-000020	000022     9	(9)

 IFIRST	I*2   6-001032	000004     2	(2)

 IFREE	I*2   6-001026	000004     2	(2)

 IHOLD	I*2   6-000634	000170    60	(30,2)

 INPNAM	L*1   7-001074	000052    21	(42)

 INPTYP	L*1   4-000050	000005     2	(5)

 LAST	I*2   6-001036	000004     2	(2)

 LINWID	I*2   4-000014	000004     2	(2)

 LSTMAP	I*2   6-000626	000004     2	(2)

 LSTMAT	I*2   6-037112	000004     2	(2)

 MAP	I*2   6-000000	000620   200	(100,2)

 MAPEND	I*2   6-037142	000004     2	(2)

 MAPMRK	I*2   6-037202	000014     6	(3,2)

 MAPNAM	L*1   6-037150	000014     6	(12)

 MAPTOP	I*2   6-000622	000004     2	(2)

 MAPTYP	L*1   4-000075	000016     7	(14)

FORTRAN IV-PLUS V02-51D		02:38:30    22-AUG-78		PAGE 13  

DRIVER.FTN   	/TR:BLOCKS/WR


 MRKPNT	I*2   6-037120	000020     8	(4,2)

 NSWVAL	I*2   6-037066	000024    10	(10)

 OPNTYP	L*1   4-000055	000004     2	(4)

 OUTMOD	L*1   7-001202	000003     1	(3)

 OUTNAM	L*1   7-001205	000052    21	(42)

 OUTTYP	L*1   4-000042	000006     3	(6)

 PROMPT	L*1   7-001257	000005     2	(5)

 RECORD	L*1   7-001264	001000   256	(512)

 SWTABL	L*1   7-002270	000113    37	(75)

 VERSON	L*1   7-002403	000005     2	(5)





LABELS



 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	



 50	 1-000020	 100	    **   	 150	 1-000644	 291'	 3-000000	 1050	 1-000216

 1060	 1-000666	 1075	 1-001032	 1080	 1-001054	 1085	 1-001160	 1086	 1-001302

 1090	 1-001324	 9030	 1-002260	 9050	 1-001740	 9060	 1-002200	 9070	 1-002100

 9080	 1-002300	 9500	 1-001412	 9510	 1-001446	 9520	 1-001470	 9530	 1-001512

 9540	 1-001534	 9550	 1-001556	 9555	 1-001600	 9570	 1-001622	 9590	 1-001644

 9600	 1-001666	 9630	 1-001762	 9650	 1-002004	 9660	 1-002026	 9700	 1-002120

 9730	 1-002140	 9760	 1-002160	 9770	 1-002220	 9780	 1-002240	 9800	 1-002320

 9810	 1-002340	 9820	 1-002360	 9991'	 3-000160	 9993	    **   	 9995	 1-003002

 9996	 1-002376	 9997	 1-002412	 9998	 1-003020	 9999	 1-003064	 10000	 1-003136





FUNCTIONS AND SUBROUTINES REFERENCED



 CLOS$	 CLSFIL	 CNGBAR	 COMPAR	 ERRORS	 EXIT	 INIT	 LSTDIF	 MRGDIF	 OPNFIL	 QIO	 SETUP	 SLP	 $MIN0





TOTAL SPACE ALLOCATED = 047136 10031



NO FPP INSTRUCTIONS GENERATED



OBJ$:DRIVER,LIS$:DRIVER/-SP=SRC$:DRIVER

