      SUBROUTINE PLW.TRAP(TP,NM)
*PIC-LAN
*
*ALL
*PC
*Y
*
*
*
*
      INCLUDE SYS.TYPE.INCLUDE
*
      INCLUDE PL.COMMON
      INCLUDE PL.COMMON.DEFS
      INCLUDE PL.DEFS
      INCLUDE PLIP.COMMON
      INCLUDE PLW.COMMON
*
      OPEN 'TRAP.CTRL' TO TRAP.FD ELSE RETURN
*
      PORT.NO = FIELD(OCONV('','U50BB'),' ',1)
*
      READ C FROM TRAP.FD , 'C*' : PORT.NO ELSE C = ''
      BEGIN CASE
         CASE C = 'DEBUG'
            DEBUG
         CASE C = 'STOP'
            STOP
         CASE C = 'WRITE'
            D = ''
            D<1> = DATE()
            D<2> = TIME()
            D<3> = TP
            D<4> = NM
            WRITE D ON TRAP.FD , 'A*' : PORT.NO
      END CASE
*
      RETURN
   END
