      SUBROUTINE PLW.TRAP(TP,NM)
*PIC-LAN
*
*ALL
*PC
*Y
*
*
*
*
******************************************************************************
******************************************************************************
***                                                                        ***
*** (C) Copyright 1990-2005 Doug Dumitru, All Rights Reserved.             ***
***                                                                        ***
*** This program is licensed under the terms of the GNU General Public     ***
*** License, version 2.0 with attached notices.                            ***
***                                                                        ***
*** The full text can be found in the LICENSE.TXT file in the              ***
*** PLIP.BP database file (the /usr/qmweb/PLIP.BP/PLIP.BP directory).      ***
***                                                                        ***
******************************************************************************
******************************************************************************
*
      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
