C======= MAIN PROGRAM FOR PHOABS ========
      INTEGER NES,NE,S,NW1,EXPI,RPAE,NRES,
     *        IZ(25),U1(25),SPI(25),LLK(12),SSK(12),
     *        K1(12),K0(12),NNLK(25),
     *        I3(25),K(12),LI(25),LK(12),CHAN(12),
     *        IMIN(12),LV(100)
      REAL*8 CLS(12),B1(12),LAMI(25),
     *       XMAXK(12),XK0(12),DELXK(11),LAMI1(25),
     *       LAMK(720),LADK(720),FME(720),FMEA(720),
     *       AL(240),BL(240),DK1(720),
     *       TOTCR1(60),TOTCR2(60),
     *       D3(720),D4(720),D5(720),D6(720),
     *       SM1(720),SM2(720),SMC1(720),SMC2(720),
     *       MB1(720),MB2(720),OMEGA(720),
     *       OMR2(11),OMR3(11),HR(11),
     *       C(1440),Q(1440),DV1(1440),DV2(1440),ARB(17280),
     *       ARB1(17280),ARB2(1440)
       REAL*8 R1(2015), R2(2015),R3(2015),
     *      R4(2015),R5(2015),R6(2015),R7(2015),
     *      R9(2015),R10(2075000),MA(2075000)

      NAMELIST/PABS/NES,IZ,EXPI,LAMI1,CHAN,RPAE,
     *              NRES,HR,OMR2,OMR3,NE,S,NW1
      OPEN(5,FILE='SYS$INPU',STATUS='OLD')
      READ(5,PABS)
      OPEN(6,FILE='SYS$OUTP',STATUS='NEW')
      OPEN(10,FILE='OLD$DB1',STATUS='OLD',FORM='UNFORMATTED')
      OPEN(11,FILE='OLD$DB2',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.1)
     *OPEN(12,FILE='OLD$DB3',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.2)
     *OPEN(13,FILE='OLD$DB4',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.3)
     *OPEN(14,FILE='OLD$DB5',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.4)
     *OPEN(15,FILE='OLD$DB6',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.5)
     *OPEN(16,FILE='OLD$DB7',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.6)
     *OPEN(17,FILE='OLD$DB8',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.7)
     *OPEN(18,FILE='OLD$DB9',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.8)
     *OPEN(19,FILE='OLD$DB10',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.9)
     *OPEN(20,FILE='OLD$DB11',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.10)
     *OPEN(21,FILE='OLD$DB12',STATUS='OLD',FORM='UNFORMATTED')
      IF (NES.GT.11)
     *OPEN(22,FILE='OLD$DB13',STATUS='OLD',FORM='UNFORMATTED')

      IF((NE.GT.2015).OR.
     *  (NW1.GT.60).OR.
     *  (S.GT.25).OR.
     *  (NES.GT.12)) THEN
                WRITE(6, 10)
                WRITE(*, 10)
       END IF
   10 FORMAT('==  CHECK ARRAYS DIMENSIONS!!!===')
      CALL PABSOUT(NES,IZ,EXPI,LAMI1,CHAN,RPAE,
     *       NRES,HR,OMR2,OMR3,NE,S,NW1,
     *       U1,NNLK,SPI,LLK,SSK,K1,K0,
     *       I3,K,LI,LK,LV,CLS,B1,LAMI,IMIN,
     *       D3,D4,D5,D6,XMAXK,XK0,DELXK,
     *       LAMK,LADK,FME,FMEA,
     *       AL,BL,DK1,MA,TOTCR1,TOTCR2,
     *       C,Q,DV1,DV2,ARB,ARB1,ARB2,
     *       SM1,SM2,SMC1,SMC2,MB1,MB2,OMEGA,
     *       R1,R2,R3,R4,R5,R6,R7,R9,R10)
      STOP
      END
