!+ Subroutine to set pointers to locations of entries in an archive.
!
! Method:
!	The pointer to the first record of the entry is set and
!	the pointer to the last record used is incremented to
!	allow sufficient space for the data.
!
! Current Owner of Code: J. M. Edwards
!
! History:
!	Version		Date			Comment
!	1.0		12-04-95		First Version under RCS
!						(J. M. Edwards)
!
! Description of Code:
!   FORTRAN 77  with extensions listed in documentation.
!
!- ---------------------------------------------------------------------
      SUBROUTINE ARRANGE_ARCHIVE(I1_POINTER, N_PER_ARCH_RECORD
     &   , LAST_RECORD, N_TRANS, N_TRANS_RECORD
     &   )
!
!
!
      IMPLICIT NONE
!
!
!     DUMMY ARGUMENTS.
      INTEGER	!, INTENT(IN)
     &     N_TRANS
!             NUMBER OF TRANSMISSIONS
     &   , N_PER_ARCH_RECORD
!             NUMBER OF VALUES PER RECORD
      INTEGER	!, INTENT(INOUT)
     &     LAST_RECORD
!             LAST RECORD OF FILE SO FAR
      INTEGER	!, INTENT(OUT)
     &     I1_POINTER
!             POINTER TO 1ST RECORD OF NEW BLOCK
     &   , N_TRANS_RECORD
!             NUMBER OF TRANSMISSION RECORDS
!
!
!
      I1_POINTER=LAST_RECORD+1
      N_TRANS_RECORD=N_TRANS/N_PER_ARCH_RECORD
!     ADD AN EXTRA RECORD FOR THE LAST VALUES IF THE DATA DO NOT FIT
!     EXACTLY INTO THE RECORD SIZE CHOSEN.
      IF (N_TRANS.GT.N_TRANS_RECORD*N_PER_ARCH_RECORD) THEN
         N_TRANS_RECORD=N_TRANS_RECORD+1
      ENDIF
      LAST_RECORD=LAST_RECORD+N_TRANS_RECORD
!
!
!
      RETURN
      END
