*M*      PCL      EXECUTIVE ROUTINE OF PCL PROCESSOR
VERSION  EQU      2                 1=BPM,2=UTS
R0       EQU      0
R1       EQU      1
R2       EQU      2
R3       EQU      3
R4       EQU      4
R5       EQU      5
R6       EQU      6
R7       EQU      7
SR1      EQU      8
SR2      EQU      9
SR3      EQU      10
SR4      EQU      11
D1       EQU       12
D2       EQU      13
D3       EQU      14
D4       EQU      15
         TITLE    'PCL'
         SYSTEM   SIG7
*
*P*      NAME:    PCL
*P*
*P*      PURPOSE: PCL PROVIDES FOR PROCESSING OF USER COMMANDS WHICH
*P*               DIRECT INFORMATION MOVEMENT BETWEEN INPUT AND OUTPUT
*P*               DEVICES.  THE EXECUTIVE ROUTINE IS THE MAIN DRIVING
*P*               ROUTINE FOR THE PCL SUBSYSTEM.
*P*
*
*DO*
*P*
* INPUT
*        ARGBUF   ARGUMENT BUFFER
*        NCHAR    LENGTH OF CURRENT ARGUMENT
*        TERM     TERMINATOR OF CURRENT ARGUMENT
*        D2       MAXIMUM ERROR SEVERITY
*        PCL CONTRL COMMANDS FROM TTYS OR CR
*       R0        ZERO REGISTER
* OUTPUT
*        D1       CURRENT ACTION CODE
*        PREVACT  PREVIOUS ACTION COD%
*        CMDBUF   CONTROL COMMAND BUFFER
*        CMBX     -CMDBUF- INDEX OF FIRST ARGUMENT
*        MAXCMBX  MAXIMUM -CMDBUF- INDEX
*        DIAGADD  INITIALIZED DIAGNOSTIC ADDRESS
*        CALL TO APPROPRIATE COMMAND PROCESSOR
*
*
*FIN*
*                 **********
*                 *  DEFS  *
*                 **********
         DEF      PCL               MAIN ENTRY POINT
         DEF      TRANSACT
         DEF      CMDBUF,CMBX,MAXCMBX
         DEF      ARGBUFF,NCHAR,TERM
         DEF      ARGTBL,DEVICE,FILE,CODE,MODE,SEQUENCE,SELECT
         DEF      DVLARG,TOSWT
         DEF      PRTBUF
         DEF      ERRFLAG
         DEF      DCBS              DCB FLAGS
         DEF      IOABORTS          ERRORS THAT TERMINATE COPYALL/STD
         DEF      PRTERR            PRINT ERRORS
         DEF      IOBUF             DISP OF RDWRT BUFFER
         DEF      NPAGE             # EXTRA PAGES FOR RDWRT
         DEF      OPNFPT            DISP OF SPACE FOR BLDCB FPT
         DEF      OPNXFPT           SPACE FOR OPENNXT
         DEF      STDBUF            COPYSTD CMD BUFFER
         DEF      1BUF              READ1 BUFFER
         DEF      OUTBLK            OUTPUT BLOCKING VALUES FOR RDWRT
         DEF      BLKIN             INPUT BLK SPECIFICATIONS
         DEF      LISTPOS           FOR NAMES HORIZ COPYALL/STD
         DEF      TOARG,RDFPT,WRTFPT,FPARAM
         DEF      ARGBUF4
         DEF      TOVER
         DEF      PRNTBUF,RECNUM
         DEF      TLABEL,SYNFLAG
         DEF      ATTRB
         DEF      TLBLSIZE
         DEF      CARDSEQ           SEQUENCE # SAVE
         DEF      TABSET
         DEF      RSSAVE
         DEF      COPYSTDF          ZERO=NO COPYSTD, >0=COPYING STD FILE,
*,*                                 <0=COPYING FROM LIST IN STD FILE.
         DEF      LINENO
         DEF      SFARG             PLACE TO SAVE STD FILE ARGS
         DEF      EATTRB            FLAGS FOR EXTENDED ATTR LIST
         DEF      COPYSK            COPYALL SELECT FLAGS (BY ORG)
         DEF      CCTAB             BIT TABLE OF PRINTABLE CHARS
         DEF      RDTBL,WRTBL
         DEF      EXTBL,UNTBL
         DEF      LTSTCMBX          PTR TO START OF CURRENT ARG
         DEF      SUPERR            SUPRESS ERRORS FLAG
         DEF      INCRPT
         DEF      OUTCRPT           OUTPUT ENCRYPTION SEED
         REF      CLRARG
         REF      HEX2BIN
         DEF      ERROR
         REF      HEX2BCD
         DEF      INSER             CURRENT INPUT SERIAL#
         DEF      OUTSER            CURRENT OUTPUT SERIAL#
         DEF      DEL%CT
         DEF      BOG
         DEF      FROMFILE,TOFILE,REVIEW,DELETEF
         DEF      SCRATCH
         DEF      GRANCNT
         DEF      SEQNUM
         DEF      COPYPHY
         DEF      LISTCMBX,LISTTERM
         DEF      ANSBLK
         DEF      BLKBUFF
         DEF      BLKSIZE
         DEF      UNBADR
         DEF      EXPIRE
         DEF      IN%ARG,OUT%ARG
         DEF      DEV%SAV1     SIDR# PRE7-0744
*
         REF      GETARG
         REF      COPYTO
         REF      FIXARG
         REF      CLOSEI,CLOSEO     CLOSE DCBS
         REF      TEXTARG           CHECK LENGTH OF PSWD,ACCT
         REF      LCCHARS
         REF      COPYALL
         REF      M:SI,M:UC,M:LO
         REF      M:C               TO IGNORE BATCH !PCL
         REF      F:STD             TO KEEP CLOSED
         REF      J:JIT
         REF      DELETEAL,DELETE,LIST
         REF,1    JB:STEPCC
         REF      J:CCBUF
         REF      REW,SPF,SPE,WEOF
         REF      INTARG
         REF      REVRP             BREAK HERE IS BUMP RETURN
         REF      FILTRAN           GET NAME FOR RANGE STUFF
         REF      M:DO
         REF      M:LL
         REF      JB:CCARS          BYTE COUNT OF J:CCBUF
*
*
         DEF      PATCH             PROCEDURE PATCH AREA
         PAGE
PCL      CSECT    1
PLSECT   CSECT    1                 PLIST AREA
         USECT    PCL
         LI,R7    STACK0            GET A DUMY STACK
         STW,SR1  TLABEL            SAVE WHETHER LINKED TO
         LI,R1    #DCBS             OPEN ALL THE DCBS
DCB0     LW,R2    DCBNS,R1
         LC       J:JIT             IF BATCH, NO M:UC
         CI,R2    M:UC
         BCS,11   %+3               ONLINE OR NOT M:UC
         LI,R2    M:LO              USE LO IF BATCH
         STW,R2   DCBNS,R1
         BE       %+3               NEVER TRY OPEN TO M:UC
         CAL1,1   SETABN0           CLEAR ABN IN CASE OPEN
         CAL1,1   OPNDCB
         BDR,R1   DCB0
         BAL,R6   LPCHK             LAST OPENED IS M:LL
         MTW,1    DCBS              =LP, CLEAR FLAG
         LI,R2    M:LO              CHECK LO TOO
         CAL1,1   SETABN0
         CAL1,1   OPNDCB            OPEN IT
         BAL,R6   LPCHK
         STH,R1   DCBS              =LP, CLEAR ITS FLAG
         LI,R4    4                 NOW SET CCS
DCB1     LD,R2    DCBNS-2,R4        FOR UC=DO,UC=LL,SI=LL AND DO=LL
         LI,SR1   X'2B'             MAKE  COMPARE FPT
         STB,SR1  R2                IN REGS
         CAL1,1   2                 SINCE INDIRECT IS NOT WORK
         OR,R1    SR1
         SCS,R1   -1
         BDR,R4   DCB1
         STS,R1   DCBS
         CAL1,8   FPTGP
         USECT    PLSECT
FPTGP    DATA     X'08000002'       REQUEST 2 PAGES
         USECT    PCL
         BCR,8    BASEREG           GOT TWO, OK
         MTW,1    ERRFLAG           NOT TWO, GIVE UP
         LI,D2    4                 ABORT ON THIS ONE
         BAL,SR4  PRTERR
         B        ENDPCL
OPNDCB   GEN,8,24 X'94',R2
         DATA     0
SETABN0  GEN,8,24 X'86',R2
         DATA     X'40000000',0
LPCHK    LI,R3    3                 FIRST MUST BE DEVICE
         CS,R3    0,R2
         BNE      1,R6              NOPE
         LI,R3    X'4000'
         CW,R3    1,R2
         BAZ      1,R6
         B        0,R6              GOT ONE
*
BASEREG  LW,R7    SR2               DEFINE BASE REGISTER
         LD,0     STACK
         AW,0     7
         STD,0    *7
*
         LI,R2    511
         SD,0     0
         STD,R0   *R7,R2
         BDR,R2   %-2
         USECT    PLSECT
FPTPROMT GEN,8,16,8   X'2C',0,'<'
         USECT    PCL
         LW,R0    R7                STACK ADDR FOR BREAK CONTROL
         CAL1,8   FPTINT
         USECT    PLSECT
FPTINT   GEN,8,7,17      X'0E',0,INT
         USECT    PCL
         LI,R0    0                 RESTORE R0
*
         LC       J:JIT             SET UP BOG
         STCF     BOG               THIS MAY BE RIGHT
         BCR,12   BATCH             BATCH IS NEVER INTERACTIVE
         BCS,4    CKCCBUF           GHOST IS UNLESS LINKED TO
         LI,R3    3                 ONLINE IS ONLY IF SI IS UC
         CS,R3    M:SI              MUST BE DEVICE
         BNE      CKCCBUF           NO, MEBBE LINKED TO
         LW,R3    M:SI+1
         CI,R3    X'6F00'           COC IN 90XX, NO IS 80XX
         BANZ     CKCCBUF
         LCI      12                GOT INTERACTIVE ONLINE USER
         STCF     BOG
CKCCBUF  RES
         LB,R4    JB:CCARS          ONLINE COMMAND LENGTH
         BEZ      PCL3              NOTHING, ENTER NON-TEL MODE
         LI,R3    CMDBUF
         AW,R3    R7                ADDR OF CMDBUF
         LW,R1    R3
         LI,R2    J:CCBUF           ADDRESS OF COMMAND
         SLD,R2   2                 IN BYTES FOR MBS
         STB,R4   R3
         MBS,R2   0                 MVE IT
         MTW,-1   CMDCNT,R7         SET TEL CMD FLAG
         LW,R2    R4
         B        PCL1
*
BATCH    MTW,0    TLABEL            IF LINKED TO, DONT READ M:C
         BNEZ     CKCCBUF
         CAL1,1   OPNC
         CAL1,1   READC
         B        CKCCBUF
OPNC     GEN,8,24 20,M:C
         DATA     X'40000','C '
READC    GEN,8,24 16,M:C
         DATA     X'20000010',TLABEL BUFFER ADDR
*
PCL3     LC       BOG               DO 'PCL HERE' IF INTERACTIVE
         BCR,4    %+2
         CAL1,1   FPTHERE           PRINT 'PCL HERE'
         STW,R0    CMDCNT,R7        CLEAR TEL FLAG
         USECT    PLSECT
FPTHERE  GEN,8,7,17      X'11',0,M:UC
         DATA     X'34000000'
         DATA     %+3
         DATA     13
         DATA     0
         TEXT     'PCL '
         TEXT     'F00'             VERSION
         TEXT     'HERE
'
         USECT    PCL
*
NXCMD    LW,R1    R7                READ NEXT COMMAND
         AI,R1    CMDBUF
         CAL1,1   FPTPROMT
         CAL1,1   FPTCONSL          READ COMMAND
         USECT    PLSECT
FPTCONSL GEN,8,24 16,M:SI
         DATA     X'F4000010'
         DATA     TERMPCL           TERMINATE ON ERROR
         DATA     TERMPCL           TERMINATE ON ABNORMAL
         PZE      *R1
         DATA     140               SIZE
         DATA     0                 NO BYTE DISPLACEMENT
         USECT    PCL
         STW,R0   BREAK             CLEAR BREAK
         LW,R2    M:SI+4
         SLS,R2   -17               GET COUNT
         AI,R2    0                 NO INPUT IS END
         BEZ      TERMPCL
PCL1     RES
         LI,R4    4*CMDBUF-1        POINT TO LAST CHAR
         AW,R4    R2
         LC       *R7,R4
         BCR,14   %+3
         AI,R2    1
         AI,R4    1
         LI,R3    X'15'
         STB,R3   *R7,R4            PUT CR IN LINE FOR ECHO
         LC       BOG               IF ONLINE FROM FILE,
         BCR,8    PCL4              ECHO TO TERMINAL
         BCS,4    PCL4
         MTW,0    CMDCNT,R7         DONT ECHO TEL CMD
         BLZ      PCL4
         CAL1,1   FPTCOMD3          WRITE PROMPT
         LI,SR4   M:UC
         CAL1,1   FPTCOMD           AND COMMAND
PCL4     EQU      %
         LC       J:JIT
         BCS,12   %+4               IF BATCH, CARDS MIGHT HAVE SEQ INFO
         CI,R2    81
         BNE      %+2
         AI,R4    -8
         LB,R3    *R1
         B        %+2
CCTABLP  LB,R3    *R1,R2
         CI,R3    'A'
         BG       CCTABLX
         CI,R3    X'4A'
         BL       CCTABLX
         LI,SR4   1
         SCS,SR4  0,R3
         CLM,R3   LCCHARS
         BCS,9    %+5
         LW,SR4   CCTAB+6
         STS,SR4  CCTAB+4
         LI,SR4   X'3FC'            ADD ALL LOWER CASE
         STS,SR4  CCTAB+5           TOGETHER
         SLS,R3   -5
         STS,SR4  CCTAB,R3
CCTABLX  BDR,R2   CCTABLP
         SD,D1    D1                CLEAR ERRORS, CMD
         LB,R3    *R1
         CI,R3    '*'
         BE       PRINTIT1          COMMENT, JUST ECHO
*
         STW,R4   MAXCMBX,R7        SAVE LENGTH
CONTCHK  AI,R4    -1                CHECK FOR CONTINUATION
         CI,R4    4*CMDBUF
         BL       PRINTIT1
         LB,D1    *R7,R4
         CI,D1    ' '               FIND LAST NONBLANK
         BE       CONTCHK
         CI,D1    ';'               IS IT CONTINUATION CHAR
         BNE      CONT2
         AI,R4    -1                DONT MOVE THIS CHAR
CONT2    AI,R4    -4*CMDBUF+1       NUMMER TO MOVE
         STD,R7   R2
         SLD,R2   2
         AW,R3    CONTPTR
         BLZ      CALLGET
         STB,R4   R3
         MBS,R2   4*CMDBUF
         AW,R4    CONTPTR
         CI,R4    CMBX1+1024        ARE WE STILL OK
         BLE      CONT4             YES
         LI,R4    -X'80000'         SET CONTPTR NEGATIVE
CONT4    STW,R4   CONTPTR
CALLGET  RES
         LI,R1    4*CMDBUF          INITIALIZE SCANNER
         STW,R1   CMBX,R7
CALLGETA LI,R1    12                USE FILE TYPE FORMAT
         LW,R5    MAXSEV            SAVE ERROR SEVERITY
         BAL,SR4  GETARG            START LOOKING FOR A PASSWORD IN
         STW,R0   ERRFLAG           IGNORE ERRORS
         LI,D2    0
         STW,R5   MAXSEV
         LW,R1    DOTCNT,R7         IF TWO .S PRECEDE, ITS A PASSWORD
         BDR,R1   GETPW
NOTPW    RES
         LW,R1    CMBX,R7           THE BATCH INPUT
         CW,R1    MAXCMBX,R7        ALL THRU WITH INPUT LINE
         BE       PRINTIT1
         LW,R2    TERM,R7           GET THE PREVIOUS DELIMITER
         CI,R2    '.'               CHECK IF IT'S A  PERIOD
         BNE      STZINSWT          NOPE START AGAIN
         MTW,1    DOTCNT,R7         COUNTEM
         B        CALLGETA          NEXT FIELD
*
GETPW    RES
         LW,R1    NCHAR,R7          GET SIZE OF PASSWORD
         BEZ      NOTPW             SHOULD BE END OF LINE
         LW,R1    CMBX,R7           CALC # TO BLANK
         SW,R1    LTSTCMBX
         AI,R1    -1
         LI,R2    X'40'
         LW,R3    LTSTCMBX          GET DISP. OF PASSWORD IN BUF
         STB,R2   *R7,R3            BLANK OUT PASSWORD 1 BYTE AT A
         AI,R3    1                 TIME
         BDR,R1   %-2
STZINSWT STW,R0   DOTCNT,R7
         B        CALLGETA
PRINTIT1 EQU      %
         LC       BOG               IF ONLINE,
         BCR,8    %+3                  DONT OUTPUT UNLESS
         LC       DCBS              SI AND LL ARE DIFFERENT
         BCS,6    FPTEND            AND LL IS NOT UC
         MTW,0    CMDCNT,R7         IF TEL CMD,
         BLZ      FPTEND            DONT ECHO
         LW,R1    R7                PT R1 TO BUFFER
         AI,R1    CMDBUF
         LW,R2    M:SI+4            GET ACTUAL INPUT(SI) RECORD SIZE
         SLS,R2   -17               AND RIGHT ADJUST IT
         CI,R2    120               IS IT A BINARY CARD
         BE       FPTEND
         LI,SR4   M:LL              OUTPUT TO LL
         CAL1,1   FPTCOMD           PRINT THE BATCH COMMAND
         USECT    PLSECT
FPTCOMD  GEN,8,7,17      X'91',0,SR4
         DATA     X'34000010'
         PZE      *R1
         PZE      *R2               SIZE
         DATA     0                 NO BYTE DISPLACEMENT
         USECT    PCL
         LC       DCBS              IS LL=LO
         BCS,2    FPTEND            YES
         LI,SR4   M:LO
         CAL1,1   FPTCOMD           NO-PRINT COMMAND AGAIN ON M:LO
         USECT    PLSECT
         DO       VERSION=2
FPTCOMD3 GEN,8,24 X'11',M:UC
         DATA     X'34000010'
         DATA     FPTPROMT
         DATA     1
         DATA     3
         FIN
         USECT    PCL
FPTEND   RES
         CI,D1    ';'               ARE WE CONTINUING
         BE       NXCMD             YES
         LI,R1    CMBX1             NO, GO DO IT.
         STW,R1   CMBX,R7
         XW,R1    CONTPTR           SET UP FOR NEXT COMMAND
         STW,R1   MAXCMBX,R7        OK, SET END
         BGZ      %+4
         LI,R1    53                STMT TOO LONG
         BAL,SR4  ERROR
         B        ENDCMD
         BAL,SR4  TRANSACT          TRANSLATE COMMAND ACTION VERB
         CI,D1    0                 TEST FOR ERROR RETURN
         BNE      PCL2              NO-DO THE COMMAND
PCL6     EQU      %
         LI,R1    18                ERROR-ILLEGAL ACTION VERB
         BAL,SR4  ERROR
         B        ENDCMD
PCL2     RES
         LI,R1    #WDSINIT0         CLEAR COMMAND INFORMATION
         STW,R0   INIT0,R1
         BDR,R1   %-1
         LI,R1    ARGTBL+16-2       CLEAR FROM HEADER FLG TO END OF ARGTBL
         BAL,SR4  CLRARG+1
         CAL1,8   RSTBRK            CLEAR BREAK COUNT
         LI,R2    M:LO
         BAL,SR4  CLOSDCB
         CAL1,1   FPTPROMT1         SET . PROMPT
         LW,R1    D1
         EXU      ACTTBL,R1
ENDCMD   BAL,SR4  PRTERR
         BAL,SR4  CLOSEI            MAKE SURE DCBS ARE CLOSED
         BAL,SR4  CLOSEO
         LI,R2    F:STD
         BAL,SR4  CLOSDCB
         STW,R0   DOTCNT,R7         PREPARE FOR NEXT COMMAND
         MTW,1    CMDCNT,R7
         BLEZ     ENDPCL            GO BACK TO TEL
         LC       BOG               CHECK FOR ABORT
         BCS,4    NXCMD
         CI,D2    4
         BL       NXCMD
         B        TERMPCL2
FPTPROMT1 GEN,8,24 X'2C','.'
*
ACTTBL   EQU      %-1
         B        PCL6              TO - ERROR
         BAL,SR4  COPY1             COPY, -ALL, -STD
         BAL,SR4  DEL1              DELETE, -ALL
         B        TERMPCL           END
         BAL,SR4  LIST
         BAL,SR4  REW               REMOVE
         BAL,SR4  REW               REW
         BAL,SR4  SPF               SPF
         BAL,SR4  SPE               SPE
         BAL,SR4  WEOF              WEOF
         B        PCL6              ON - ERROR
         B        PCL6              OVER - ERROR
         BAL,SR4  TABS              TABS
         BAL,SR4  REVIEW0           REVIEW
         B        PCL3              PCL, ENTER NON-TEL MODE
         NOP                        NULL COMMAND
         BAL,SR4  SPF               SPR
         B        PCL6              INTO - ERROR
         BAL,SR4  ERONOFF           ERROR
         CAL1,9   6                 PRINT
         BAL,SR4  REW               MOUNT
*
COPY1    LW,R1    ARGBUFF+1,R7      TEST FOR COPYALL COMMAND
         CW,R1    =C'YALL'
         BE       COPYALL
         CW,R1    =C'YSTD'          TEST FOR COPYSTD
         BNE      COPYTO
         MTW,1    COPYSTDF,R7       SET COPYSTD FLAG
         B        COPYALL
*
DEL1     LW,R1    ARGBUFF+1,R7
         CW,R1    =C'ETEA'          DELETE
         BNE      DELETE
         LW,R1    ARGBUFF+2,R7
         AND,R1   =X'FFFFFF00'
         CW,R1    =X'D3D34000'   CHECK IF REALLY DELETEALL.
         BNE      PCL6         NOT DELETEALL
         B        DELETEAL
REVIEW0  LC       BOG               IF NOT INTERACTIVE, JUST LIST
         BCR,8    LIST              NO REVIEW IN GHOST
         BCR,4    LIST
         MTW,1    DELETEF
         MTW,1    FROMFILE
         B        LIST
*
TERMPCL2 EQU      %
         CAL1,1   FPTABORT          PRINT ABORT MESSAGE
         STW,D2   MAXSEV            MAKE SURE WE ABORT
         B        ENDPCL
TERMPCL  EQU      %
         LCF      J:JIT
         BCS,12   ENDPCL            BRANCH IF ONLINE OR GHOST
         LB,R2    TXTRMPCL          MESSAGE SIZE
         CAL1,1   FPTRMPCL          PRINT 'PCL PROCESSING TERMINATE'
         USECT    PLSECT
FPTRMPCL GEN,8,7,17     X'11',0,M:LO
         DATA     X'34000000'
         DATA     TXTRMPCL
         PZE      *R2
         DATA     1
TXTRMPCL TEXTC    'PCL PROCESSING TERMINATED'
FPTABORT GEN,8,24 17,M:LO
         DATA     X'34000000'
         DATA     TXTABORT
         DATA     9
         DATA     0
TXTABORT TEXT     'PCL ABORT'
         DATA     X'E3150000'
         USECT    PCL
ENDPCL   EQU      %
         LI,R2    M:LO
         BAL,SR4  CLOSDCB           CLOSE M:LO
         LI,R2    M:LL
         BAL,SR4  CLOSDCB           CLOSE M:LL
         LI,R2    M:DO
         BAL,SR4  CLOSDCB           CLOSE M:DO
         LC       J:JIT
         BCR,12   %+2               JUST EXIT IF ONLINE
         CAL1,9   1
         LW,D2    MAXSEV            SET STEP CCS FROM MAX SEVLEV
         LI,R1    JB:STEPCC         DONT LOWER
         CB,D2    0,R1              STEP CC
         BLE      %-4               JUST EXIT
         SLS,D2   8
         AI,D2    X'10001'
         CI,D2    X'10301'
         BLE      %+2
         AI,D2    1                 ABORT IF SEV 4
         BL       %+2
         AI,D2    1                 ERROR IF SEV 3 OR 4
         CAL1,9   *D2
*
CLOSDCB  LW,R1    0,R2              CLOSE DCB WHOSE ADR IS IN R2
         CW,R1    =X'00200000'
         BAZ      *SR4              NOT OPEN - EXIT
         CAL1,1   CLOSFPT
         USECT    PLSECT
CLOSFPT  GEN,8,24 X'95',R2
         DATA     X'80000000'
         DATA     2                 SAVE
         USECT    PCL
         B        *SR4              EXIT
         PAGE
REVIEW   PSW,SR4  *R7
         MTW,1    FROMFILE          INITIALIZE FOR NULL FIELD
         MTW,1    TOFILE
         LW,R1    TERM,R7
         CI,R1    ','
         BE       REV8              NULL FROM FIELD
         CI,R1    X'15'
         BE       REV6              END OF COMMAND
         LI,SR4   %+3
GETARG12 RES
         LI,R1    12                GET FILE NAME
         B        GETARG
         MTW,0    NCHAR,R7
         BEZ      REV9              NULL FROM FIELD
         LCI      4
         LM,R1    ARGBUFF,R7        MOVE FILE NAME
         STM,R1   FROMFILE
         LM,R1    ARGBUFF+4,R7
         STM,R1   FROMFILE+4
REV9     LW,R1    TERM,R7
         CI,R1    '.'               IF ACCOUNT FOLLOWS, PUT IN ARGTBL
         BNE      REV1
         MTW,0    FILE,R7           UNLESS ALREADY THERE
         BNEZ     REV5
         MTW,2    FILE,R7
         LW,R1    CMBX,R7           START AT DOT (NO NAME)
         AI,R1    -1
         STW,R1   FILE+1,R7
         BAL,SR4  GETARG12          GET ACCOUNT
         LW,R1    =X'5000108'       CHECK ARG LENGTH
         CI,R4    '.'               NULL PERMITTED IF PASSWORD FOLLOWS
         BNE      REV15
         AI,R1    -X'100'
         BAL,SR4  TEXTARG
         MTW,1    FILE,R7           INDICATE PASSWORD
         BAL,SR4  GETARG12          GET IT
         LW,R1    =X'6000108'
REV15    BAL,SR4  TEXTARG
REV1     LW,R1    TERM,R7
         CI,R1    ','               IS 'TO' FIELD PRESENT
         BNE      REV6              NO
REV8     BAL,SR4  GETARG12
         CI,D2    1
         BG       REV3              ERROR
         MTW,0    NCHAR,R7
         BEZ      REV5              NULL TO FIELD
         LCI      4
         LM,R1    ARGBUFF,R7        MOVE FILE NAME
         STM,R1   TOFILE
         LM,R1    ARGBUFF+4,R7
         STM,R1   TOFILE+4
         LB,R2    FROMFILE
         BEZ      REVA              NULL FROM FIELD
         MTW,0    COPYPHY           WAS PHY OPTION USED
         BNEZ     REVA              YES - NOT SORT ORDER
         LI,R3    1
REV7     LB,R4    FROMFILE,R3       TEST IF 'FROM' GR THAN 'TO'
         CB,R4    TOFILE,R3
         BL       REVA              OK
         BG       REV5              YES - ERROR
         AI,R3    1
         BDR,R2   REV7
REVA     EQU      %
         LW,R1    TERM,R7           GET DELIMITER
REV6     MTW,0    COPYSK
         BEZ      REV4              ONLY COPYALL PERMITS BLANK
         CI,R1    ' '
         BE       REV3
         CI,R1    '('               AND LPAREN
         BE       REV3
REV4     CI,R1    X'15'
         BNE      REV2              BAD TERMINATOR
REV3     PLW,SR4  *R7
         B        *SR4
REV5     LI,R1    8                 FILE RANGE SPECIFICATION INVALID
         PLW,SR4  *R7
         B        ERROR
REV2     LI,R1    17
         B        REV5+1
         PAGE
ERONOFF  RES
         PSW,SR4  *R7
         LW,R2    TERM,R7           MUST BE BLANK
         CI,R2    ' '
         BNE      REV2
         LI,R1    6                 ALL DELIMITERS
         BAL,SR4  GETARG
         LW,R2    ARGBUFF,R7
         STB,R0   R2                CLEAR COUNT
         CW,R2    TCSAVE            IS IT SAVE
         BE       %+3               YUP
         SW,R2    TCREL             OR REL
         BNE      %+3               NO,..EH
         STW,R2   SUPERR
         B        REVA
         LI,R1    ARGBUF4+1         CONVERT INPUT
         LW,R2    NCHAR,R7
         BAL,SR4  HEX2BIN
         AI,R4    0
         BNEZ     REV2
         MTB,0    R3                IS IT PROPER VALUE
         BNEZ     REV2              NO
         MTB,-1   R3                SET NO PLACE CODE
         STW,R3   ERRFLAG+1
         MTW,1    ERRFLAG
         BAL,SR4  PRTERR0
         B        REVA
TCREL    DATA     'REL'
TCSAVE   DATA     'SAV'
         PAGE
TABS     LCI      7
         PSM,R5   *R7
         LI,R5    TABSET
         AW,R5    R7                ADDRESS OF TAB TABLE
         LI,R6    0
         LI,R1    3
         STW,R6   *R5,R1            ZERO TABLE
         BDR,R1   %-1
         STW,R6   0,R5
TABS2    CI,R6    16                MORE THAN 16 TABS SPECIFIED
         BE       TABSERR2          YES
         LI,R1    6
         BAL,SR4  GETARG            GET NEXT VALUE
         LI,R1    0                 MIN VALUE
         LI,R2    255               MAX VALUE
         BAL,SR4  INTARG            CONVERT TO BINARY
         AI,R2    0
         BNE      TABSERR           CONVERSION OR RANGE ERROR
         STB,R1   *R5,R6            ENTER TAB VALUE IN TABLE
         AI,R6    1                 INCREMENT TAB COUNT
         LW,R1    TERM,R7
         CI,R1    ','
         BE       TABS2             ANOTHER VALUE
         CI,R1    X'15'
         BE       TABSEND           END OF COMMAND
         LI,R1    17                DELIMITER OUT OF SYNTAX
         BAL,SR4  ERROR
TABSEND  STW,R5   TABSET+4,R7       SET ADDRESS OF TAB TABLE
         LCI      7
         PLM,R5   *R7
         B        *SR4
TABSERR  LI,R1    45                INVALID TAB SPECIFICATION
         B        TABSEND-1
TABSERR2 LI,R1    51                MORE THAN 16 VALUES ON TABS CMD
         B        TABSEND-1
         PAGE
TRANSACT PSW,SR4  *R7
*
         LI,R1    6                 USE ALL DELIMITERS
         BAL,SR4  GETARG            GET ACTION VERB
*
         INT,R2   ARGBUFF,R7
         BCS,15   %+3
         CI,R2    X'1E7'            X COMMAND = END
         BE       TERMPCL
         LI,R1    ARGBUF4           FORCE LENGTH TO 3 CHARACTERS
         LI,R2    1
         CB,R2    *R7,R1            TEST IF ONE CHAR CMD
         BNE      %+3               NO
         LW,R1    =X'12000000'+CMDTBLX
         B        ACTION3+1
         LI,R2    3
         STB,R2   *R7,R1
*
ACTION3  LW,R1    =X'12000000'+CMDTBL   EDIT ACTION VERB
         BAL,SR4  FIXARG
         CI,R1    11                -ON- THE ACTION VERB
         BNE      %+2               NO
         LI,R1    1                 YES-SET-TO-
         STW,R1   D1                SAVE ACTION CODE
          PLW,SR4 *R7
         B        *SR4
*
         TITLE    'PRTERR'
*P*      NAME:    PRTERR
*P*
*P*      PURPOSE: TO PRINT THE ERROR MESSAGES CORRESPONDING TO THE
*P*               ERROR CODES PROCESSED BY THE ERROR ROUTINE.  PRTERR IS
*P*               CALLED AFTER PROCESSING IS COMPLETED, OR HAS BEEN
*P*               TERMINATED, FOR EACH COMMAND.  IT IS CALLED IF THE
*P*               MAXIMUM ERROR SEVERITY LEVEL EXCEEDS ONE.
*P*
*DO*
*P*
*P*
*
* INPUT
*        ERRFLAG  ERROR FLAG BUFFER
*        D2       MAXIMUM ERROR SEVERITY
* OUTPUT
*        PRINTED ERROR CODES AND MAXIMUM SEVERITY CODE ON LO DEVICE
*
*
*FIN*
*
PRTERR   RES
*
PRTERR0  LCI      7                 SAVE REGISTERS
         PSM,R5   *R7
         LI,D3    M:UC
         LC       BOG
         BCS,12   PERR1             BATCH IF ONLINE OR GHOST
         LI,D3    M:DO              NO-ERROR OUTPUT ON M:DO
*
         LC       DCBS              IS DO = LL OR LO
         BCS,9    PERR1             YES, NO NEED TO OUTPUT COMMAND
         LI,R1    CONTINUE          NO-MUST OUTPUT COMMAND TO DO
         MTB,1    D3                SET DUAL OUTPUT FLAG
         AW,R1    R7
         CAL1,1   FPTCOMDP
         USECT    PLSECT
FPTCOMDP GEN,8,7,17      X'11',0,M:DO
         DO1      VERSION=1
         DATA     X'34000010'
         DO1      VERSION=2
         DATA     X'30000010'
         PZE      *R1               BUFFER
         DATA     80                SIZE
         DO1      VERSION=1
         DATA     0
         USECT    PRTERR
PERR1    EQU      %
M:MSG    DSECT    2
         DATA     1,0
         GEN,8,24 10,TLABEL+1
         GEN,15,17 80,ABNPCLER
         DATA     ABNPCLER,0,M:MSG+22
         DATA     0,0,0,M:MSGK
         DO1      11
         DATA     0
         DATA     X'1000202'
         TEXTC    'ERRMSG'
         DATA X'02010202'
         TEXT     ':SYS    '
M:MSGK   RES      8
         USECT    PRTERR
         PAGE
         LW,R2    ERRFLAG           ANY ERRORS TO PRINT
         BEZ      RETURN            NO
         LI,SR4   -1                LOGICAL SORT
         ANLZ,SR2 %+2               LAST ENTRY ADDRESS
PRT01    LW,R1    R2
         LW,SR3   ERRFLAG,R2
         B        %+4
         CS,SR3   ERRFLAG,R1
         BG       %+2
         XW,SR3   ERRFLAG,R1
         BDR,R1   %-3
         STW,SR3  ERRFLAG,R2
         BDR,R2   PRT01
         LI,R3    65                FIRST BLANK THER BUTTER
         LI,R2    '  '
         STH,R2   TLABEL,R3
         BDR,R3   %-1
         LI,R2    '%'
PRT2     LB,R1    *SR2
         BEZ      PRT1
         AI,R1    1
         STB,R2   TLABEL+1,R1
         CI,R1    256
         BE       %+4
         CW,R3    R1
         BG       %+2
         LW,R3    R1
         BDR,SR2  PRT2
PRT1     LI,R5    2                 BTD FOR NON-UC
         AI,R3    0                 IF NOTHING TO PUT
         BEZ      PRTERR1           DONT
         CI,D3    M:UC
         BNE      PRT3
         AI,R3    1
         LI,R2    X'15'             WRITE CR ALSO
         STB,R2   TLABEL+1,R3
         LI,R5    1
PRT3     CAL1,1   FPTMESS
         MTB,0    D3                DO WE NEED LL TOO
         BEZ      %+4
         LI,D3    M:LL
         CAL1,1   FPTMESS
         LI,D3    M:DO+X'80000'
PRTERR1  AI,SR2   1                 TO NEXT MESSAGE KEY
         LI,R3    3
         STB,R3   *SR2              SET BYTE COUNT
         CAL1,1   FPTERORD          READ ERROR MESSAGE
         USECT    PLSECT
FPTERORD GEN,8,7,17      X'10',0,M:MSG
         DATA     X'C8000010'
         DATA     ABNPCLER
         DATA     ABNPCLER          ABNORMAL FOR PCL ERROR CODE
         PZE      *SR2
         USECT    PRTERR
         LW,R3    M:MSG+13
PRTERR2  CI,D3    M:UC              REMOVE CR IF NOT UC
         BE       %+2
         AI,R3    -1                NO-REMOVE NL GOING PRINTER
         LI,R5    0                 BTD 0
PRTERR4  CAL1,1   FPTMESS           PRINT PCL ERROR MESSAGE
         USECT    PLSECT
FPTMESS  GEN,8,7,17      X'91',0,D3
         DATA     X'34000010'
         PZE      TLABEL+1
         PZE      *R3
         PZE      *R5
CLSMSG   GEN,8,24 21,M:MSG
         DATA     0
         USECT    PRTERR
         MTW,-1   ERRFLAG           COUNT DOWN
         BGZ      PRTERR1
         CAL1,1   CLSMSG            CLOSE DCB
         B        RETURN
ABNPCLER LB,SR3   SR3               IF ALREADY CLOSED, GIVE UP
         CI,SR3   10
         BE       RETURN
         LI,SR3   X'10000'
         AND,SR3  *SR2
         LCI      5
         LM,R1    TXPCLERR
         BDR,SR3  %+2
         STW,R5   R1
         STM,R1   TLABEL+1          MOVE MESSAGE TO BUFFER
*
         INT,R1   *SR2              GET KEY
         BAL,SR4  HEX2BCD
         LI,2     X'F115'           PCL ERR IS 1XX00, IO IS XXSS
         SCS,R2   -8
         BDR,SR3  %+2
         SCD,R2   8
         SCD,R2   24
         STW,R2   TLABEL+4+1
         STW,R3   TLABEL+5+1
         LI,R3    22                PCL MESSAGE LENGTH
         BDR,SR3  PRTERR2
         BDR,R3   PRTERR2
*
RETURN   LCI      7                 RESTORE REGISTERS
         PLM,R5   *R7
         B        *SR4
*
TXPCLERR TEXT     ' PCL ERROR CODE'
         TEXT     ' I/O'
         DO       VERSION=1
         PAGE
* THE FOLLOWING TABLE MATCHES THE UTS ERRMSG FILE
M1       TEXTC    'ARGUMENT GREATER THAN 31 CHARACTERS'
M2       TEXTC    'ILLEGAL DEVICE CODE'
M3       TEXTC    'INVALID REEL NUMBER SPECIFICATION'
M4       TEXTC    'ILLEGAL FILE NAME SPECIFICATION'
M5       TEXTC    'ILLEGAL ACCOUNT NUMBER SPECIFICATION'
M6       TEXTC    'ILLEGAL PASSWORD SPECIFICATION'
M7       TEXTC    'TOO MANY FIELDS IN A FILE ID SPECIFICATION'
M8       TEXTC    'INVALID FILE RANGE SPECIFICATION'
M9       TEXTC    'MORE THAN TEN RS FIELDS FOR AN INPUT DEVICE'
M10      TEXTC    'VOLUME NUMBER BYEOND END OF SNS'
M11      TEXTC    'INVALID DECIMAL NUMBER'
M12      TEXTC    'CS ID-FIELD GREATER THAN FOUR CHARACTERS'
M13      TEXTC    'ERROR ON N OR K VALUE OF CS OPTION'
M14      TEXTC    'IMPROPER TERMINATION WITHIN RS, LN, OR CS OPTION'
M15      TEXTC    ')) MUST TERMINATE RS, LN, OR CS OPTION'
M16      TEXTC    'SPECIAL ARGUMENTS MUST HAVE ) AS TERMINATOR'
M17      TEXTC    'EH?'
M18      TEXTC    'UNDEFINED COMMAND'
M19      TEXTC    'ILLEGAL INPUT DEVICE'
M20      TEXTC    'NO DEFINED OUTPUT DEVICE'
M21      TEXTC    'ILLEGAL OUTPUT DEVICE'
M22      TEXTC    'REEL NUMBER SPECIFICATION NOT VALID'
M23      TEXTC    'FILE SPECIFICATION NOT VALID'
M24      TEXTC    'DATA CODE SPECIFICATION NOT VALID'
M25      TEXTC    'MODE SPECIFICATION NOT VALID'
M26      TEXTC    'SEQUENCE SPECIFICATION NOT VALID'
M27      TEXTC    'RECORD SELECTION SPECIFICATION NOT VALID'
M28      TEXTC    'PK/BIN/7T COMBINATION NOT VALID'
M29      TEXTC    'NULL ARGUMENT (TWO DELIMITERS IN A ROW)'
M30      TEXTC    'IMPROPER TERMINATION OF THE COMMAND'
M31      TEXTC    'ONE REEL NUMBER MUST BE SPECIFIED ON THIS COMMAND'
M32      TEXTC    'TO, INTO, OR OVER NOT SPECIFIED'
M33      TEXTC    'RECORD SIZE EXCEEDS AVAILABLE MEMORY'
M34      TEXTC    'INVALID DEVICE TYPE FOR THIS COMMAND'
M35      TEXTC    'TOO MANY REEL NUMBERS SPECIFIED'
M36      TEXTC    '''TO'' FILE EXISTS'
M37      TEXTC    'INVALID DIRECTION INDICATOR ON ''SPF'' COMMAND'
M38      TEXTC    'INPUT RECORD SIZE LARGER THAN 32767 BYTES'
M39      TEXTC    'INVALID OPTION FOR THIS COMMAND'
M40      TEXTC    'TOO MANY SN,RD,WR,EX,UN SPECIFICATIONS'
M41      TEXTC    'RS SPECIFICATION BEYOND END OF FILE'
M42      TEXTC    'ERROR IN COMPRESSED INPUT'
M43      TEXTC    'PCL NEEDS AT LEAST TWO DATA PAGES TO RUN'
M44      TEXTC    'TOO MANY ERRORS - PROCESS ABORTED'
M45      TEXTC    'INVALID TAB SPECIFICATION'
M46      TEXTC    'OVERFLOW ON EDIT LINE NUMBER'
M47      TEXTC    'ZERO INCREMENT ON CS OR LN OPTION'
M48      TEXTC    'TX OPTION USED WITHOUT TABS COMMAND'
M49      RES
M50      TEXTC    'CONFLICTING OR DUPLICATE OPTION'
M51      TEXTC    'MORE THAN 16 TAB VALUES'
M52      TEXTC    'INVALID HEXADECIMAL NUMBER'
M53      TEXTC    'TOO MANY CHARACTERS IN THE COMMAND'
M54      TEXTC    'INVALID VALUE FOR ANS OPTION'
M55      TEXTC    'TOO MANY BLANKS IN A DELETE COMMAND'
M56      TEXTC    'ERROR WRITING LISTING OUTPUT'
M57      TEXTC    'TAPE DENSITY SPECIFICATION IS IN ERROR'
         FIN
         TITLE    'ERROR'
ERROR    RES      0
*
*P*      NAME:    ERROR
*P*
*P*      PURPOSE: TO REPORT AN ERROR FOR SUBSEQUENT PRINTING BY PRTERR.
*P*               THIS IS DONE BY ENTERING A '%' POINTER INTO THE ERROR
*P*               FLAG BUFFER AND, IF CPV, ENTERING INTO A TABLE THE
*P*               KEY NEEDED TO READ THE DESIRED MESSAGE FROM THE
*P*               SYSTEM ERROR MESSAGE FILE (ERRMSG.:SYS).  IN BPM, THE
*P*               TABLE ENTRY IS AN INDEX INTO AN INTERNAL ERROR
*P*               MESSAGE TABLE.
*P*
*DO*
*P*
*
* INPUT
*        R1       ERROR TO BE FLAGGED
* OUTPUT
*        ERRFLAG  ERROR FLAG BUFFER
*        D2       MAXIMUM ERROR SEVERITY
*                    (1-WARNING, 2-TERM EXEC, 3-TERM EDIT AND EXEC)
*
*
*FIN*
*
         LCI      2
         PSM,R2   *R7
*
ERR1     CB,D2    SEVERE,R1         UPDATE MAX SEVERITY
         BGE      %+2
         LB,D2    SEVERE,R1
         CW,D2    MAXSEV
         BLE      %+2
         STW,D2   MAXSEV
         LW,R2    CMBX,R7
         AI,R2    -CMBX1
         BLEZ     %+3
         CI,R2    X'FFF80'          MUST BE 0-127
         BAZ      %+2               YES
         LI,R2    255
         MI,R1    256               MAKE PCL ERROR MESSAGE KEY
         BNEZ     ERR3              NOT IO ERROR
         LB,R1    SR3               GEN IO KEY
         SLS,R1   8
         AH,R1    SR3
         SLS,R1   -1
         AI,R1    -X'10000'
ERR3     AI,R1    X'10000'
         STB,R2   R1
*
         LW,R2    ERRFLAG
         CI,R2    9                 ROOM FOR ERROR KEY
         BE       RETURN2           NO-CAN NOT REPORT
         STW,R1   ERRFLAG+1,R2
         CW,R1    ERRFLAG,R2        HAVE WE DONE THIS BEFORE
         BE       RETURN2           YES
         BDR,R2   %-2
         MTW,1    ERRFLAG           NO, COUNT IT
         PAGE
RETURN2  SLS,R1   8
         EOR,R1   SAMERR            CHECK FOR 20 SAME ERRORS IN A ROW
         BEZ      ERR44             HAPPENNED, ABORT
         CI,R1    X'FFF00'          IS THIS THE SAME AS LAST ONE
         BAZ      %+4               YES, JUST COUNT DOWN
         EOR,R1   SAMERR            NO, PUT IN NEW ONE
         AI,R1    21                WITH A NEW COUNT
         STW,R1   SAMERR
         MTW,-1   SAMERR
ERR2     LCI      2                 AND EXIT
         PLM,R2   *R7               RESTORE REGISTERS
         B        *SR4              RETURN2
*
ERR44    CI,D2    1                 ONLY ABORT IF MAJOR ERROR
         BLE      ERR2
         CI,R2    9
         BNE      %+2               IF THE STACK IS FULL
         MTW,-1   ERRFLAG           MAKE ROOM FOR THIS ONE
         LI,R1    44                TO ASSURE THIS ONE GET OUT
         B        ERR1
*
*                 I 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1
*                 O 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
*
SEVERE   DATA,1   2,2,2,2,2,2,2,2,3,2,2,2,2,2,3,3
*                 1 1 1 1 2 2 2 2 2 2 2 2 2 2 3 3
*                 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
*
         DATA,1   3,3,2,3,3,2,2,2,2,2,2,2,2,2,1,2
*                 3 3 3 3 3 3 3 3 4 4 4 4
*                 2 3 4 5 6 7 8 9 0 1 2 3
*
         DATA,1   3,2,3,3,3,3,2,2,3,2,2,4
*                 4 4 4 4 4 4 5 5 5 5 5 5
*                 4 5 6 7 8 9 0 1 2 3 4 5
*
         DATA,1   4,3,3,2,2,4,2,2,2,3,3,3
*                 5 5 5 5
*                 6 7 8 9
*
         DATA,1   3,3,4,4
*
AL       CNAME    0
ALD      CNAME    1
         PROC
         DO1      NAME&ALPTR&1
ALPTR    SET      ALPTR+1
LF       EQU      ALPTR
ALPTR    SET      ALPTR+AF
         PEND
ALPTR    SET      3                 ALLOCATE SPACE FOR STK PTR, HEADER FLG
IN%ARG   AL       1
OUT%ARG  AL       1
NPAGE    AL       1
COPYSTDF AL       1
ATTRB    AL       1
SYNFLAG  AL       1
DOTCNT   EQU      SYNFLAG
ARGTBL   AL       36                FULL ARGUMNET TABLE
*
DEVICE   EQU      ARGTBL            ARGUMENT TABLE LAYOUT
FILE     EQU      DEVICE+3
CODE     EQU      FILE+2
MODE     EQU      CODE+1
SEQUENCE EQU      MODE+4
SELECT   EQU      SEQUENCE+5
TOARG    AL       16                OUTPUT SAVE AREA
TOSWT    AL       1
CARDSEQ  AL       2                 SEQUENCE INFO
TABSET   AL       5
EXPIRE   AL       3
CMDCNT   AL       1
ARGBUFF  AL       8                 OUTPUT OF GETARG
CMBX     AL       1
MAXCMBX  AL       1
TERM     AL       1
NCHAR    AL       1
DEL%CT   AL       1
TOVER    AL       1
CMDBUF   AL       8
*        TEMP ITEMS FOR PROCEDURES
RDFPT    AL       7
WRTFPT   AL       8
RECNUM   EQU      RDFPT+6           =BLOCK#
RSSAVE   AL       1
DEV%SAV1 EQU      RDFPT
*
ARGBUF4  EQU      ARGBUFF*4         BYTE EQUIVALENTS
*
TLBLSIZE EQU      40
STDBUF   AL       20                BUFFER FOR STANDARD FILE
CONTINUE AL       256               MAX STMT=1024 CHARS
CMBX1    EQU      CONTINUE*4        START OF BUFFER
IOBUF    EQU      512
FPARAM   EQU      IOBUF+35
OPNFPT   EQU      IOBUF+256
PRTBUF   EQU      IOBUF-40
SEQNUM   EQU      IOBUF-5
LINENO   EQU      IOBUF-3
*
IOABORTS DATA,2   #IOABTS
         DATA,2   X'D00',X'D02',X'1410',X'1422',X'1424',X'1426'
         DATA,2   X'2002',X'2004',X'2006',X'2008'
         DATA,2   X'4900',X'4902',X'4904',X'5500',X'5700'
         DATA,2   X'7508',X'750A',X'750C'
#IOABTS  EQU      HA(%)-HA(IOABORTS)-1
         BOUND    4
*
CMDTBL   DATA     CMDTBL1-%         COMMAND ACTION VERB TABLE
         TEXTC    'TO '
         TEXTC    'COP'
         TEXTC    'DEL'
         TEXTC    'END'
         TEXTC    'LIS'
         TEXTC    'REM'
         TEXTC    'REW'
         TEXTC    'SPF'
         TEXTC    'SPE'
         TEXTC    'WEO'
         TEXTC    'ON '             11
         TEXTC    'OVE'             12
         TEXTC    'TAB'
         TEXTC    'REV'
         TEXTC    'PCL'
         TEXTC    '   '             NULL COMMAND
         TEXTC    'SPR'
         TEXTC    'INT'             INTO - 18
         TEXTC    'ERR'             ERRORS ON/OFF
         TEXTC    'PRI'             PRINT
         TEXTC    'MOU'             MOUNT
CMDTBL1  EQU      %-1
CMDTBLX  DATA     CMDTBLX1-%
         TEXTC    ' '
         TEXTC    'C'
         TEXTC    'D'
         TEXTC    'E'
         TEXTC    'L'
CMDTBLX1 EQU      %-1
         DO1      VERSION=1
J:JIT    DATA     0                 SIMULATE JIT FOR BATCH MODE
*                                   TESTING UNDER BPM
         PAGE
         DO       VERSION=2
INT      EQU      %                 BREAK CONTROL ROUTINE
         CAL1,8   TERMST            GET BREAK COUNT
         LI,R3    X'30000'
         AND,R3   SR1
         LH,R3    R3
         AWM,R3   BREAK
         LI,R3    X'1FFFF'
         AND,R3   0,R1
         CI,R3    REVRP             IF READ1 READ, READ NONE
         BNE      %+2
         MTW,1    0,R1
         CAL1,8   RSTBRK            RESET BREAK COUNT
         CAL1,9   5                 RETURN TO PROGRAM
TERMST   DATA     X'6400000'        GET TERMINAL STATUS
RSTBRK   DATA     X'6200000',X'80000000',3
         FIN
*
BREAK    DSECT    0
         DATA     0                 BREAK CONTROL FLAG
BOG      DATA     0                 BIT 0 SET FOR ONLINE USER
*                                   BIT 1 SET FOR GHOST JOB INITIATED
*                                   FROM OPERATOR'S CONSOLE
*                                   BIT 2 SET FOR BATCH USER
CCTAB    DATA     0,0               BIT TABLE FOR PRINTABILITY, 1F-0, 3F-20
         DATA     X'F801F801'       5F-40
         DATA     X'7C005803'       7F-60
         DATA     0,0               LOWER CASE
         DATA     X'3FE03FE'        C0-DF
         DATA     X'3FF03FC'        E0-FF
ERRFLAG  DATA     0,X'FF012B00'     ERROR CODES (WITH NO CORE IN IT)
STACK0   DATA     %+1,X'300000'     INITIAL STAK (TO PRINT NO CORE MSG)
         RES      6
LTSTCMBX DATA     0                 SAVE OF LATEST CMBX POINTER
SUPERR   DATA     0                 IGNORE MINOR ERRORS FLAG
BLKSIZE  DATA     0                 SIZE OF ANS BLOCK
UNBADR   DATA     0                 POINTER INTO ANS INPUT BLOCK
BLKBUFF  DATA     0                 POINTER INTO ANS OUTPUT BLK
DCBS     DATA     X'FFFFFF'         BIT0=>DO=LL
*        BIT1=>SI=LL,BIT2=>UC=LL,BIT3=>UC=DO
*        BITS4-15=0 OR 1=> LO=LP
*        BITS16-31=0 OR 1 => LL=LP
INIT0    EQU      %-1
SFDEV    RES      2                 COPYSTD SAVE AREA
DELETEF  DATA     0                 REVIEW FLAG
FROMFILE RES      8                 START OF RANGE OF FILES
TOFILE   RES      8                 END OF FILE RANGE
         BOUND    8
RDTBL    RES      0                 RD OPTION COUNT+CMBX
STACKSIZE EQU     PRTBUF-ALPTR
STACK    DATA     ALPTR-1,STACKSIZE**16
WRTBL    RES      2                 WR OPTION COUNT + CMBX
EXTBL    RES      2                 EX COUNT+CMBX
UNTBL    RES      2                 UN COUNT+CMBX
SFARG    RES      0
         BOUND    8
DCBNS    DATA     M:DO,M:LL
         DATA     M:SI,M:LL
         DATA     M:UC,M:LL
         DATA     M:UC,M:DO
#DCBS    EQU      %-DCBNS-1
         ORG      SFARG+16
COPYSK   RES      1                 COPYALL SELECT FLAG
EATTRB   DATA     0                 EA FLAG
LISTCMBX DATA     0                 SAVE CMBX FOR LIST
LISTTERM DATA     0                 SAVE TERM FOR LIST
COPYPHY  DATA     0                 PHY FLAG
GRANCNT  DATA     0                 GRANULE CONT
SAMERR   DATA     0                 REPEAT ERROR COUNT
LISTPOS  DATA     0
#WDSINIT0 EQU     %-INIT0-1
MAXSEV   DATA     0                 SET STEP CCS TO HIGHEST LEVEL
INSER    DATA     0
OUTSER   DATA     0
1BUF     DATA     0
PATCH    RES      100
OPNXFPT  RES      1
DVLARG   RES      16
         BOUND    8
TLABEL   RES      10
PRNTBUF  RES      50
INCRPT   RES      1
OUTCRPT  RES      1
CONTPTR  DATA     CMBX1
ANSBLK   RES      5                 INCLUDES CONCAT,DENSITY
BLKIN    RES      3
OUTBLK   RES      3
SCRATCH  DATA     0,0
         DATA     0,0               AND ITS RECOURCE TYPE
         USECT    PCL
         END      PCL

