      SUBROUTINE GETALL(Z,LENGTH,IRREPX,LSTNUM)
C
C THIS ROUTINE RETRIEVES ALL IRREPS OF A SYMMETRY PACKED DISTRIBUTION
C  AND PLACES THEM IN THE VECTOR Z.  LENGTH IS THE TOTAL LENGTH OF THE
C  LIST, LSTNUM IS THE NUMBER OF THE LIST ON THE MOINTS FILE.
C
CEND
      IMPLICIT INTEGER (A-Z)
      DOUBLE PRECISION Z(LENGTH)
      COMMON /SYMINF/ NSTART,NIRREP,IRREPA(255),IRREPB(255),DIRPRD(8,8)
      COMMON /SYMPOP/ IRPDPD(8,22),ISYTYP(2,500),D(18)
C
C  LOOP OVER IRREPS.
C
      IOFF=1
      ILIST=LSTNUM
      DO 10 IRREPR=1,NIRREP
       IRREPL=DIRPRD(IRREPR,IRREPX)
C
C GET NUMBER OF DISTRIBUTIONS AND DISTRIBUTION SIZE.
C
       NUMDIS=IRPDPD(IRREPR,ISYTYP(2,ILIST))
       DISSIZ=IRPDPD(IRREPL,ISYTYP(1,ILIST))
C
C STUFF VECTOR INTO Z.
C
       IF(NUMDIS.EQ.0)GOTO 10
       if (ioff+dissiz*numdis.gt.length+1) then
          print *, '@GETALL: Assertion failed.'
          print *, '         need ',ioff+dissiz*numdis-1,' dbls'
          print *, '         have ',length
          call aces_exit(1)
       end if
       CALL GETLST(Z(IOFF),1,NUMDIS,1,IRREPR,LSTNUM)
       IOFF=IOFF+NUMDIS*DISSIZ
10    CONTINUE
      RETURN
      END
