         SYSTEM   SIG7FDP
         SYSTEM   BPM
*
*        DELETER  DELETE A RECORD FROM A KEYED FILE
*
*                 THE USER'S FILE MUST HAVE BEEN THE SUBJECT OF AN
*                 "OPEN INPUT-OUTPUT" STATEMENT
*                 THE VALUE TO BE USED AS THE MONITOR KEY WILL BE PICKED
*                 UP FROM THE USER'S DATA AREA
*
*      USER SYNTAX:
*        ENTER   DELETER  FILE-NAME, DATA-NAME-1, DATA-NAME-2,
*                         |PROCEDURE-NAME|
*
*                DELETER: THE ENTRY POINT IN THE RUN-TIME ROUTINE
*              FILE-NAME: THE APPROPRIATE FD NAME
*            DATA-NAME-1: CONTAINS THE MONITOR RECORD KEY (DISPLAY)
*            DATA-NAME-2: CONTAINS THE LENGTH OF DATA-NAME-1
*                         (COMPUTATIONAL)
*         PROCEDURE-NAME: TO BE EXECUTED IF THE SPECIFIED KEY IS NOT
*                         FOUND IN THE FILE
*                         THE PARAMETER IS OPTIONAL
*                         IF NO PROCEDURE-NAME IS SPECIFIED, NEXT
*                         SENTENCE WILL BE EXECUTED
*
*        AUTHER   YOW-YUAN ROBERT LIN            MAY, 1970
*
         REF      C:ABA                                                 DELETER
         DEF      DELETER
         OPEN     GOODBYE,SAVE,RETURN
         OPEN     KEYAREA,FPT,FPTA,FPTB,ABNADDR
DELETER  LCI      9
         STM,14   SAVE
         STW,15   RETURN            STORE RETURN ADDR
         AWM,14   RETURN            UPDATE RETURN ADDR
         CI,14    3                                                     DELETER
         BGE      %+4                                                   DELETER
         LI,2     X'9A'                                                 DELETER
         STB,2    10                                                    DELETER
         B        C:ABA                                                 DELETER
         LI,4     0
         LI,5     X'1FFFF'          MASK FOR SELECTIVE
         LS,4     *15               R4 = DCB ADDR
         STS,4    FPT               SET DCB POINTR
         STS,4    FPTA              SET DCB POINTR
         STS,4    FPTB              SET DCB POINTR
         LI,1     X'1FFFF'
         LI,6     X'1FFFF'          GET ERR ADDRESS
         AND,6    3,4               INTO R6
         LI,2     X'7FFFF'          MASK FOR BUTE ADDR
         AI,15    1
         AND,2    *15               R2 = BYTE ADDR OF KEY
         AI,15    1
         AND,5    *15               R5 = KEY LENGTH ADDR
         LW,3     *5                R3 = KEY LENGTH
         CI,3     31                TEST MAX KEY LENGTH
         BLE      %+2
         LI,3     31                = MAX
         STB,3    KEYAREA
         LI,3     BA(KEYAREA)+1
         LB,4     KEYAREA
         STB,4    3                 SET MOVE STRING COUNT
         MBS,2    0
,FPTA    M:SETDCB 0,(ABN,ABNADDR),(ERR,ABNADDR)  SETDCB ABNORAML AND ERR
,FPT     M:DELREC 0,(KEY,KEYAREA)   DLETE A KEY SPECIFIED IN KEYAREA
GOODBYE  RES      0                 ENTRY OF RETURN
,FPTB    M:SETDCB 0,(ABN,*1),(ERR,*6)   RESTORE ERR AND ABA ADDRESSES
         LCI      9
         LM,14    SAVE
         B        *RETURN
ABNADDR  RES      0                 GIVE ERR CONDITION ON ALL ERRORS
         AI,14    -3                COUNT PARM
         BLEZ     GOODBYE           NO PROCNM GO TO NEXT INSTRUCTION
         AI,15    1
         LI,4     X'1FFFF'
         AND,4    *15               R4 = ADDR OF NEXT PROC
         STW,4    RETURN            CHANGE RETURN ADDR TO NEXT PROC
         B        GOODBYE
SAVE     RES      9
KEYAREA  RES      8
RETURN   RES      1
         CLOSE    GOODBYE,SAVE,RETURN
         C