        SUBROUTINE  SVPLOT(SYSFIL,BNDFIL,
     .                     SVX,MINPLT,MAXPLT,ERRCD,ERRMSG)
C
C       FUNCTION:
CF
CF
C       USAGE:
CU
CU
C       INPUTS:
CI
CI
C       OUTPUTS:
CO
CO
C       ALGORITHM:
CA
CA
C       MACHINE DEPENDENCIES:
CM
CM
C       HISTORY:
CH
CH      written by:
CH      date:
CH      current version:
CH      modifications:
CH				added dpcom: 7/16/88 jdb
CH
C       ROUTINES CALLED:
CC
CC
C       COMMON MEMORY USED:
CM
CM      DPCOM -- see dpcommon.f and dpcom.f
CM
C----------------------------------------------------------------------
C       written for:    The CASCADE Project
C                       Oak Ridge National Laboratory
C                       U.S. Department of Energy
C                       contract number DE-AC05-840R21400
C                       subcontract number 37B-07685C S13
C                       organization:   The University of Tennessee
C----------------------------------------------------------------------
C       THIS SOFTWARE IS IN THE PUBLIC DOMAIN
C       NO RESTRICTIONS ON ITS USE ARE IMPLIED
C----------------------------------------------------------------------
C
C
        INCLUDE                 'Parameter.f'
C
        DOUBLE PRECISION        A(SIZE2,SIZE2)
        DOUBLE PRECISION        B(SIZE2,SIZE2)
        DOUBLE PRECISION        C(SIZE2,SIZE2)
        DOUBLE PRECISION        D(SIZE2,SIZE2)
        DOUBLE PRECISION        ZR(SIZE2)
        DOUBLE PRECISION        EVRE(SIZE2)
        DOUBLE PRECISION        EVIM(SIZE2)
        DOUBLE PRECISION        MINPLT
        DOUBLE PRECISION        MAXPLT
C
        DOUBLE COMPLEX          G(SIZE2,SIZE2)
        DOUBLE COMPLEX          AINVB(SIZE2,SIZE2)
        DOUBLE COMPLEX          H(SIZE2,SIZE2)
        DOUBLE COMPLEX          ZC(SIZE2)
C
        CHARACTER*(*)           SVX
        CHARACTER*(*)           SYSFIL
        CHARACTER*(*)           BNDFIL
        CHARACTER*(*)           ERRMSG
C
        INTEGER                 NSTATS
        INTEGER                 NINPS
        INTEGER                 NOUTS
        INTEGER                 ERRCD
        INTEGER                 IPVT(SIZE2)
C
	INCLUDE			'dpcom.f'
C
        CALL INSYS (SYSFIL,
     2    NINPS,NOUTS,NSTATS,SIZE2,SIZE2,SIZE2,A,B,C,D,
     3    ERRCD)
        CLOSE (UNIT=UNIT1)
        IF (ERRCD .NE. 0) THEN
          ERRMSG = 'SVPLOT: Fatal Error from INSYS '//
     1             'accessing '//SYSFIL
          RETURN
        END IF
C
        OPEN (UNIT=UNIT8,STATUS='SCRATCH',ERR=9990)
C
        CALL HFRQPT(SIZE2,NSTATS,NINPS,NOUTS,
     2              A,B,C,D,G,
     2              ZR,EVRE,EVIM,AINVB,H,ZC,
     2              IPVT,NPTPLT,MINPLT,MAXPLT,ERRCD,ERRMSG)
C
        CALL SRSPG (SVX,ERRCD,ERRMSG)
        IF (ERRCD .NE. 0) THEN
          CLOSE(UNIT=UNIT8)
          RETURN
        END IF
C
C--jdb; mod next line to add SVX(bb;aug-86) ; 11-feb-85
C
        CALL PRSP(SYSFIL,BNDFIL,SVX,ERRCD,ERRMSG)
        CLOSE(UNIT=UNIT8)
        RETURN
9990    ERRCD = 10
        ERRMSG = 'SVPLOT: Fatal errory trying to open scratch unit.'
        CLOSE(UNIT=UNIT8)
        RETURN
        END