      SUBROUTINE RGTBL(NVH,NVL,WK1,NV,TBL,IRAND)
C
C
      DOUBLE PRECISION WK1(NVH,18),
     >                 TBL(NV ,18)
C
      INTEGER          IRAND(NVH)
C
C

C     ***********
      CALL VDRAND( NVL, WK1(1,1) )
C     ***********
C
C
      DO 10 IVL = 1,NVL

      ITMP = INT(  DBLE(NV) * WK1(IVL,1) ) + 1

      IF( ITMP .GT. NV .OR. ITMP .LT. 1 ) THEN
          PRINT *,'ERROR IN RGTBL'
          PRINT *,'LATTICE POINT: ',IVL
          PRINT *,'RANDOM NUMBER: ',WK1(IVL,1)
          PRINT *,'INTEGER INDEX: ',ITMP
          STOP
      ENDIF

      IRAND(IVL) = ITMP

   10 CONTINUE


C     ***********
      CALL GATHER(NVH,NVL,WK1,NV,TBL,IRAND,0)
C     ***********


      END
