      PROGRAM XHCPVD
C
C     EXERCISE PROGRAM FOR SUBROUTINE HCPVD
C
C     B. KNAPP, 1998-05-19, 1999-05-12, 2001-04-24 (i*4)
C
C
C     RCS DATA
C     
C     $Header$
C     
C     $Log$
C
C
      IMPLICIT NONE
C
C     CONSTANTS
      INTEGER*4 ICD
      PARAMETER (ICD=4)
      REAL*8 PREC
      PARAMETER (PREC=0.0)
C
      INTEGER*4 P, J, IERR
      REAL*8 T, JD, JDE, Z(6)
C
C     EXTERNAL PROCEDURES, FUNCTIONS
      REAL*8 UT2TD
      EXTERNAL UT2TD, HCPVD
C
 1    CONTINUE
      WRITE(*,'(/A$)') ' JD? '
      READ(*,*) JD
      JDE = UT2TD(JD)
      T = (JDE-2451545.D0)/365250.D0
C
 2    WRITE(*,'( A$)') ' Body (1,...,9, for Mercury,...,Pluto)? '
      READ(*,*) P
      IF ( P .LT. 1 .OR. 8 .LT. P ) GOTO 2
C
      CALL HCPVD(P,T,Z,IERR)
C
C     PRINT RESULTS
      WRITE(*,*)
      WRITE(*,*) 'IERR=',IERR
      WRITE(*,*)
      DO J=1,6
         WRITE(*,'(1P,E24.16)') Z(J)
      ENDDO
C
      GOTO 1
      END
