C======= MAIN PROGRAM FOR OSPP2 ========
      INTEGER NES,NE,S,NW1,EXPI,RPAE,NRES,SSS,LLL,
     *        LLLK,IZ(25),U1(25),SPI(25),LLK(10),SSK(10),
     *        K1(8),I3(25),NNLK(25),LI(25),
     *        K(25),LK(25),K0(8),CHAN(8),
     *        IMIN(8),LV(100),IAL(100)
      REAL *8  XMAXK(8),XK0(8),DELXK(8),LAMI1(25),
     *       LAMI(25),CLS(25),AL(100),BL(100),
     *       B1(100),AB(25),
     *       HR(11),OMR2(11),OMR3(11),
     *       LAMK(300),LADK(300),FME(300),FMEA(300),
     *       D3(300),D4(300),D5(300),D6(300),
     *       SM1(300),SM2(300),SMC1(300),SMC2(300),
     *       MB1(300),MB2(300),OMEGA(300),
     *       C(400),Q(400),DV1(400),DV2(400),
     *       ARB(4000),ARB1(4000),ARB2(400),
     *       DK1(300),TOTCR1(25),TOTCR2(25),
     *       R1(2015),R2(2015),R3(2015),
     *       R4(2015),R5(2015),R6(2015),R7(2015),
     *       R9(2015),R8(450000),MA(350000)

       NAMELIST/OPPH2/NES,IZ,EXPI,LAMI1,CHAN,
     *     LLL,SSS,LLLK,LLK,SSK,LV,
     *     CLS,AL,BL,B1,AB,RPAE,NRES,
     *     HR,OMR2,OMR3,NE,S,NW1

       OPEN(5,FILE='SYS$INPU',STATUS='OLD')
       READ(5,OPPH2)
      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((NE.GT.2000).OR.
     *  (NW1.GT.25).OR.
     *  (S.GT.25).OR.
     *  (NES.GT.10)) THEN
        WRITE(6, 10)
        WRITE(*, 10)
      END IF
 10    FORMAT('====  CHECK ARRAYS DIMENSIONS====')
       CALL OSPP2(NES,IZ,EXPI,LAMI1,CHAN,RPAE,NRES,
     *       HR,OMR2,OMR3,NE,S,NW1,
     *       U1,NNLK,SPI,LLK,SSK,LLL,SSS,LLLK,K1,K0,
     *       I3,K,LI,LK,LV,CLS,B1,AB,LAMI,IMIN,
     *       D3,D4,D5,D6,XMAXK,XK0,DELXK,
     *       LAMK,LADK,FME,FMEA,
     *       AL,BL,IAL,DK1,MA,TOTCR1,TOTCR2,
     *       SM1,SM2,SMC1,SMC2,MB1,MB2,OMEGA,
     *       C,Q,DV1,DV2,ARB,ARB1,ARB2,
     *       R1,R2,R3,R4,R5,R6,R7,R9,R8)
      STOP
      END
