      SUBROUTINE EVENTP(IEB,IEQ,IBRNP,IACZP,IBRN,IACZ)
C
C  COLLECT AND PRINT GAS-VALVE(IBURNN) OR A/C(IACN) EVENTS,
C                    TSTAT(IBRNP OR IACZP) EVENTS,
C                    SUPPLY DAMPER(IBRN OR IACZ) EVENTS,
C                AND BLOWER(IEFAN) EVENTS IN EACH ZONE.
C
CMDK NZN
CMDK NWL
CMDK NZW
CMDK ENCBK1
CMDK IBEV
CMDK INDIC1
CMDK BLKICL
CMDK TIMEB
CMDK TSTB3
CMDK TSTATC
CMDK BLKTM2
CMDK TEMP1
      INTEGER IBRNP1(5),IBRNP2(5),IBRNP(NZN),IACZP(NZN),IBRN(NZN),
     +        IACZ(NZN)
      REAL TIP(5)
      DATA IBRNP1/5*0/,IBRNP2/5*0/,TIP/5*0./

C
      IF(IBPRT.EQ.0.AND.IEVPRT.EQ.0)RETURN
      ITT=IT-1
      DO 10 J=1,NROOMS
      NRM=NRMA(J)
      IF(MODE.EQ.2)THEN
         IEBQ=-IAC
         IBRNP1(NRM)=IACZP(NRM)
         IBRNP2(NRM)=IACZ(NRM)
      ELSE
         IEBQ=IBURNN+1
C                              THERMOSTAT STATES         
         IBRNP1(NRM)=IBRNP(NRM)
C                              DAMPER STATES         
         IBRNP2(NRM)=IBRN(NRM)
         ENDIF
   10 CONTINUE
C
      IF(IBPRT.EQ.1.AND.IEB.EQ.1)THEN
C  WRITE EVENT FILE ON TAPE 51
         WRITE(51,500)TINDEX,JULDAY,ITT,IEBQ,(IBRNP1(I),I=1,5),
     +                (IBRNP2(I),I=1,5),IEFAN
         ENDIF
      IF(IEVPRT.EQ.1.AND.IEQ.EQ.1)THEN
C  WRITE EVENTS AND TI'S TO TAPE TAPE3
         DO 202 J=1,NROOMS
         NRM=NRMA(J)
  202    TIP(NRM)=TI(NRM)
         WRITE(3,501)TIME,IEBQ,(TIP(I),I=1,5),(IBRNP1(I),I=1,5),
     +   (IBRNP2(I),I=1,5),IEFAN,ICOL
         ENDIF
      RETURN
  500 FORMAT(F12.5,I4,I3,3(' 0'),3X,I3,3X,5I2,3X,5I2,3X,I2)
  501 FORMAT(F12.5,I4,2X,5F6.1,3X,5I2,3X,5I2,3X,I2,3X,I2)
      END
