
      PROGRAM TESTIT
C
C The following COMMON blocks are used to share information with various
C routines in EZMAPB.  Please note that these are subject to change, so
C be careful about using the program.
C
	PARAMETER (MNAI=8000)
C
        COMMON /MAPCMX/  IATY(MNAI),ISCI(MNAI),IPAR(MNAI)
        INTEGER          IATY,ISCI,IPAR
        SAVE   /MAPCMX/
C
        COMMON /MAPCMY/  NAME(MNAI),FLNS
        CHARACTER*64     NAME,FLNS
        SAVE   /MAPCMY/
C
C Local character variables.
C
        CHARACTER*64  FLNM
        CHARACTER*147 CTM1,CTM2
C
C Get the name of the file to be read.
C
        PRINT * , ' '
        PRINT * , 'Enter the name of the file to be read:'
        READ (*,'(A64)') FLNM
C
        IF (FLNM.EQ.' ') STOP
C
        LFNM=IPOLNB(FLNM)
C
C Load information from the selected dataset.
C
	CALL MDLNRI (FLNM(1:LFNM))
C
C Print the desired list of area names.
C
	DO 102 I=1,MNAI
          IF (IATY(I).NE.0) THEN
            CTM1=NAME(I)
            ITMP=IPAR(I)
            ICNT=0
  101       IF (ITMP.NE.0) THEN
	      LNAM=IPOLNB(NAME(ITMP))
C             IF (NAME(ITMP)(1:LNAM).NE.CTM1(1:LNAM)) THEN
		CTM2=NAME(ITMP)(1:LNAM)//' - '//CTM1
                CTM1=CTM2
C             END IF
              ITMP=IPAR(ITMP)
              ICNT=ICNT+1
	      IF (ICNT.LT.10) GO TO 101
            END IF
            PRINT '(A147,I4,2I2,I5)' , CTM1,I,IATY(I),ISCI(I),IPAR(I)
          END IF
  102   CONTINUE
C
C Done.
C
        STOP
C
      END


      INTEGER FUNCTION IPOLNB (CHRS)
        CHARACTER*(*) CHRS
        DO 101 I=LEN(CHRS),1,-1
          IF (CHRS(I:I).NE.' ') THEN
            IPOLNB=I
            RETURN
          END IF
  101   CONTINUE
        IPOLNB=1
        RETURN
      END
