FORTRAN IV-PLUS V02-51D		02:44:11    22-AUG-78		PAGE 1   

READMP.FTN   	/TR:BLOCKS/WR


        C

        C

        C

        C	READMP -- READ A RECORD OF MAP VALUES

        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

        C

        C	K.D. MORSE	22-NOV-76

        C

        C

        C

        C	THIS ROUTINE READS THE TEMPORARY FILE TO GET A MAPPING TABLE'S

        C	WORTH OF INFORMATION.

        C

        C

FORTRAN IV-PLUS V02-51D		02:44:11    22-AUG-78		PAGE 2   

READMP.FTN   	/TR:BLOCKS/WR


         

        C

        C

        C  VARIABLES:

        C

        C	IERR1--ERROR INDICATOR FROM FORTRAN ROUTINES

        C	IERR2--ERROR INDICATOR FROM MACRO ROUTINES

        C	LOOP--NUMBER OF MAP VALUES IN THE MAP FILE RECORD

        C	MAP--MAPPING TABLE OF COMPARE FILE RECORDS ONTO INPUT FILE

        C		RECORDS, AND INPUT FILE RECORDS ONTO COMPARE FILE RECORDS

        C	MAPEND--RECORD NUMBER OF LAST RECORD THAT CAN BE MAPPED IN

        C		THE MAP TABLE

        C	MAPLNG--LENGTH OF MAP RECORD JUST READ

        C	MAPMRK--POINTERS TO NEXT MAP RECORD TO READ

        C	MAPNAM--NAME OF MAP FILE

        C	MAPTOP--RECORD NUMBER OF THE FIRST RECORD THAT CAN BE MAPPED IN

        C		THE MAP TABLE

        C	MLUN--MAP FILE LUN

        C	MNMLNG--LENGTH OF MAP FILE NAME

        C	MOUT--RECORD BUFFER FOR MAP FILE

        C	MSTAT--INDICATOR FOR TYPE OF CLOSE TO PERFORM

        C	MTYPE--INDICATOR FOR TYPE OF OPEN TO PERFORM

        C

        C

FORTRAN IV-PLUS V02-51D		02:44:11    22-AUG-78		PAGE 3   

READMP.FTN   	/TR:BLOCKS/WR


         

0001    	SUBROUTINE READMP(ISUB)

        C

        C

0002    	COMMON MAP(100,2),NUMLIN,MAPTOP(2),LSTMAP(2),MLUN,

        	1IHOLD(30,2),NINCOR,IFREE(2),IFIRST(2),LAST(2),MAXBUF,

        	2BUFR,ISWTCH,COMCHR,NSWVAL(10),LSTMAT(2),IRECSZ,

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

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

         

0003    	BYTE BUFR(7680,2),COMCHR(16),MAPNAM(12),BARCHR

0004    	INTEGER OLUN,MOUT(101)

         

        C

        C	REPOSITION FILE TO NEXT RECORD TO READ.

        C

0005    	CALL CLSFIL(MLUN,MSTAT,IERR2)

0006    	IF (IERR2 .LE. 0) GOTO 925

0007    	CALL OPNFIL(MAPNAM,MNMLNG,MLUN,MOUT,IRECSZ,MTYPE,IERR2)

0008    	IF (IERR2 .LE. 0) GOTO 924

0009    	CALL PNTREC(MLUN,MAPMRK(1,ISUB),IERR2)

0010    	IF (IERR2 .LE. 0) GOTO 927

0011    	MAPTOP(ISUB)=MAPEND(ISUB)+1

        C

        C	READ A RECORD.

        C

0012    10	CALL GETREC(MLUN,MOUT,IRECSZ,MAPLNG,IERR2)

0013    	IF (IERR2 .LE. 0) GOTO 926

        C

        C	IF VALUES ARE FOR OTHER FILE, GO READ THE NEXT RECORD.

        C

0014    	IF (MOUT(1) .NE. ISUB) GOTO 10

0015    	LOOP=(MAPLNG-1)/2

        C

        C	PUT THE VALUES INTO THE APPROPRIATE MAPPING TABLE.

        C

0016    	DO 15 I=1,LOOP

0017    15	MAP(I,ISUB)=MOUT(I+1)

0018    	MAPEND(ISUB)=MAPTOP(ISUB)+LOOP-1

0019    	CALL MRKREC(MLUN,MAPMRK(1,ISUB),IERR2)

0020    	IF (IERR2 .LE. 0) GOTO 927

0021    	GOTO 100

        C

        C	ERROR CODES ON MAP FILE:

        C

        C		-24 = OPEN ERROR

        C		-25 = CLOSE ERROR

        C		-26 = READ/WRITE ERROR

        C		-27 = MARK/POINT ERROR

        C

0022    924	IERR1=-24

0023    	GOTO 100

0024    925	IERR1=-25

0025    	GOTO 100

0026    926	IERR1=-26

0027    	GOTO 100

FORTRAN IV-PLUS V02-51D		02:44:11    22-AUG-78		PAGE 4   

READMP.FTN   	/TR:BLOCKS/WR


0028    927	IERR1=-27

0029    100	RETURN

0030    	END

FORTRAN IV-PLUS V02-51D		02:44:11    22-AUG-78		PAGE 5   

READMP.FTN   	/TR:BLOCKS/WR


PROGRAM SECTIONS



NUMBER	 NAME	    SIZE		ATTRIBUTES



  1	$CODE1	000466   155		RW,I,CON,LCL

  3	$IDATA	000054    22		RW,D,CON,LCL

  4	$VARS	000320   104		RW,D,CON,LCL

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





ENTRY POINTS



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



 READMP	      1-000000





VARIABLES



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



 BARCHR	L*1   6-037220	 I	I*2   4-000316	 IERR1	I*2   6-037172	 IERR2	I*2   6-037174	 IKIND	I*2   6-037176

 INOUT	I*2   6-037140	 IRECSZ	I*2   6-037116	 ISUB	I*2   F-000002*	 ISWTCH	I*2   6-037044	 LINSIZ	I*2   6-037146

 LOOP	I*2   4-000314	 MAPLNG	I*2   4-000312	 MAXBUF	I*2   6-001042	 MLUN	I*2   6-000632	 MNMLNG	I*2   6-037164

 MPRINT	I*2   6-037216	 MSTAT	I*2   6-037170	 MTYPE	I*2   6-037166	 NINCOR	I*2   6-001024	 NUMLIN	I*2   6-000620

 OLUN	I*2   6-037200





ARRAYS



 NAME   TYPE  ADDRESS	    SIZE 	DIMENSIONS



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

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

 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)

 LAST	I*2   6-001036	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)

 MOUT	I*2   4-000000	000312   101	(101)

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

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





LABELS



 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	 LABEL   ADDRESS 	



 10	 1-000150	 15	    **   	 100	 1-000464	 924	 1-000376	 925	 1-000414

 926	 1-000432	 927	 1-000450

FORTRAN IV-PLUS V02-51D		02:44:11    22-AUG-78		PAGE 6   

READMP.FTN   	/TR:BLOCKS/WR






FUNCTIONS AND SUBROUTINES REFERENCED



 CLSFIL	 GETREC	 MRKREC	 OPNFIL	 PNTREC





TOTAL SPACE ALLOCATED = 040304  8290



NO FPP INSTRUCTIONS GENERATED



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

