********************************************************************
*M*      LP:TPOQ  SYSTEM WHICH DEFINES TRANSACTION PROCESSING TABLES
********************************************************************
*P*
*P*      NAME:    LP:TPOQ, TP TABLE DEFINITIONS AND EQUATES.
*P*
*P*      PURPOSE: TO PROVIDE AN ASSEMBLY TIME SYSTEM CONTAINING
*P*               TRANSACTION PROCESSING SPECIFIC TABLE ITEM
*P*               DEFINITIONS AND EQUATE VALUES.
*P*
*P*      DESCRIPTION:  THE SYSTEM LP:TPOQ DEFINES VALUES AND LIST
*P*               ITEMS FOR THE TP QUEUE MANAGER AND VARIOUS
*P*               TP PROCESSORS.  THE MODULE DOES NOT STAND ALONE
*P*               AND REQUIRES THAT SYSTEM TP:TPO PRECEDE IT.  LP:TPOQ
*P*               IS A NON-EXECUTABLE MODULE.
*P*
*D*      NAME:    LP:TPOQ, TRANSACTION PROCESSING TABLES AND
*D*               TABLE DEFINITIONS.
*D*
*D*      DESCRIPTION:  THESE TABLE DESCRIPTIONS SHOW THE IN-CORE
*D*               TP TABLE (TTP), THE QUEUE FILE BLOCK FORMATS,
*D*               AND THE QUEUE USER INFORMATION TABLES.
*D*
*
*        INITIALIZE ASSEMBLY PARAMETERS
*
         OPEN     %X%
%X%      SET      S:UFV(I)
         DO       %X%=0
I        SET      0
         FIN
         PAGE
**************************************************
*                                                *
*                       DTQPARAMS                *
*                QUEUE MANAGER MISCELLANEOUS     *
*                   PARAMETER DEFINITIONS        *
*                                                *
**************************************************
         DO       %X%]=0
         ADMODE   (IND)
         ERROR,*    '*** SYSTEM DTQPARAMS***VERSION 00'
QPRIV    EQU      X'C0'             QUEUE PRIVILEGE FOR UNLOCK,LOCK
QDEFNAME BYTE     0                 CRITERION NAME LENGTH
QDEFCRIT ADDR     0,1               VBA OF CRITERION
*
QFLAGS   BYTE     2                 QUEUE FLAG BYTE
QFLAGQ   BIT      0,24              QUEUED BIT
QFLAGD   BIT      0,25              DESTRUCTIVE READOUT OR PROCESSED BIT
QFLAGF   BIT      0,26              FAILED BIT
QFLAGP   BIT      0,27              IN PROGRESS BIT
QGETINDEX FIELD   0,(15,14)         START INDEX FOR GET LIST
QGETMSGSIZE HWORD 1                 'GET'MESSAGE LENGTH
QGETLT   HWORD    10                ENTRY TEXT LENGTH
QGETL    BYTE     23                ENTRY NAME LENGTH
QGETTEXT WORD     6                 ENTRY TEXT
QPUTTXT WORD      14                TEXT DISPLACEMENT FROM ENTRY START
QPUTGETSZ HWORD   1                 TOTAL MSG LENGTH IN BYTES
*
QPUTLGTH WORD     5                 MESSAGE LENGTH WORD
QPUTLT   HWORD    10                TEXT LENGTH
QPUTL    BYTE     23                NAME LENGTH
QPUTENT  ADDR     0,1               VWA, PUT LIST ENTRY
*
QHASH    EQU      1                 # SEGMENTS FOR QUEUE HASH CODE
QPPCHAIN WORD     0                 PHYSICAL PAGE CHAINING WORD
QPPLAU   HWORD    2                 LARGEST UNALLOCATED UNIT
QPPLAUD  HWORD    3                 DISPLACEMENT TO LAU
QPPSPACER WORD    1                 PAGE SPACE CONTROL WD
QPPUNIT  WORD     2                 FIRST SPACE UNIT
QPPUNITA BIT      0,0               UNIT ALLOCATED, 1 MEANS YES
QPPUNITSZ   FIELD 0,(31,9)          # WORDS IN THE SPACE UNIT
QPPUNITCSZ EQU    1                 SIZE OF UNIT CONTROL WD BLOCK
QPPUNIT1 EQU      2                 IST UNIT POSITION IN PHYSICAL
*                                   PAGE
QPPNAV   EQU      508               LARGEST SPACE UNIT
*
*
*            QUEUE ABNORMAL/ERROR SUBCODES
QABN01   EQU      X'01'             ILLEGAL QUEUE REQUEST
QABN02   EQU      X'02'             INT,BRK,EC,ABRT IN QUEUE MGR
QABN03   EQU      X'03'             ERROR FROM GET SPACE
QABN07   EQU      X'07'             QUEUE SATURATED
QABN08   EQU      X'08'             CALLER NOT PRIVILEGED
QABN09   EQU      X'09'             DCB NOT OPEN
QABN0A   EQU      X'0A'             SPACE UNAVAILABLE
QABN10   EQU      X'10'             BAD MEMORY ADDRESS
QABN11   EQU      X'11'             QUEUE LOCKED
QABN12   EQU      X'12'             PHYSICAL PAGE SPACE UNAVAILABLE
QABN13   EQU      X'13'             ERROR IN QUEUEING LIST
QABN14   EQU      X'14'             ENTRY NOT FOUND
QABN15   EQU      X'15'             I/O ERROR DURING UNLOCK
QABN16   EQU      X'16'             I/O ERROR FOR OTHERS
QABN17   EQU      X'17'             QUEUE BUSY
QABN20   EQU      X'20'             NONEXISTENT LISTID
*
*            FPT,ABNORMAL,SCREECH CODES
QUNLOCK  EQU      X'06'             UNLOCK
QDEFINE  EQU      X'07'             DEFINELIST
QPUT     EQU      X'08'             PUT
QGET     EQU      X'09'             GET
QSTATS   EQU      X'0A'             STATS
QPURGE   EQU      X'0B'             PURGE
QLOCK    EQU      X'0C'             LOCK
QFPTSET  EQU      X'07'             START FPT CODE LS UNLOCK
QFPTMAX  EQU      5                 #-1 OF QUEUE FPT'S LS UNLOCK
*
*
QABNCODE EQU      X'BC'             ABNORMAL CODE
QSCREECH EQU      X'34'             SCREECH CODE
*        MASKS FOR FPT PROCESSING
QDCBADD  FIELD    0,(31,17)         17-BIT ADDRESS MASK
QECBADD  FIELD    0,(31,17)
QPAGES   FIELD    0,(31,16)         RIGHT HALFWORD MASK
QKEYSZ   FIELD    0,(31,6)          6-BITS, RIGHT-JUSTIFIED
QINXBLKS FIELD    0,(31,17)
Q#STORE  FIELD    0,(31,8)          1 BYTE, RIGHT-JUSTIFIED
QLISTADD FIELD    0,(31,17)
QLISTSZ  FIELD    0,(31,16)
QLISTID  FIELD    0,(31,16)         2 BYTES, RIGHT-JUSTIFIED
QBFRADD  FIELD    0,(31,17)
QBFRSZ   FIELD    0,(31,16)
QWAIT    BIT      0,27              F1
QBACKUP  BIT      0,26              F2
QNEW     BIT      0,25              F3
QRECOV   BIT      0,24              F4
QCOUNT   BIT      0,26              F2
QHIGH    BIT      0,26              F2
QPAUSE   BIT      0,23              F5
*           QUEUE CAL EXIT CONDITION CODES
QCCYES   EQU      0                 NORMAL RETURN
QCCNO    EQU      8                 ABNORMAL RETURN
QCCNO#ECB EQU     4                 DELAY,ECB WAIT MEANINGFUL
QECBCODE1 EQU     X'01'             ECB COMPLETION CODES
QECBCODE2 EQU     X'02'
QECBCODEF EQU     X'0F'
QMIN1    EQU      4                 MINIMUM NO. Q PAGES IF ALLOCATION
*                                   MAP FITS ENTIRELY IN BLOCK 1
QMIN2    EQU      5                 MINIMUM NO. Q PAGES IF ALLOCATION
*                                   MAP STARTS IN A SEPARATE BLOCK
QKEY     EQU      3                 # WDS FILLER FOR QUEUE INDEX ENTRY
QCRITERIONMAX EQU 31                MAX BYTE SIZE CRITERION
QBLK1MAP EQU      50                1ST AVAILABLE WORD IN BLOCK 1
QBLK1INX EQU      253               BIAS FOR ICB IN BLOCK 1
QBLK1AVAIL EQU    512-((2*QBLK1MAP)+22)  # HWS AVAILABLE IN BLOCK 1
QALLHDRSZ EQU     4                 ALLOCATION MAP HEADER SIZE
QBLK1MIN  EQU     8                 MINIMUM HWS TO START MAP IN BLK 1
QBLKALL  EQU      1                 BLOCK # MAP START SEPARATE FROM
*                                   BLOCK 1
QBLKALLNAV EQU    1012              # HWS AVAIL IN A BLOCK FOR MAP ENTRIES
QWRITEF  BIT      1,0               QUEUE BLOCK WRITE FLAG POSITION
QBLOCK   ADDR     1,1               BLOCK # WORD IN QUEUE BLOCKS
QCHAIN   ADDR     0,1               CHAIN WORD, QUEUE BLOCKS
QDATANID EQU      8                 ********ANALYZE*****
QDATANAV EQU      254               MAX DWS IN DATA BLOCK
QDATACONTROL EQU  1                 # CONTROL DWS FOR DATA BLOCK ENTRY
QDATAENTB WORD    2                 *****ANALYZE
QNRT     EQU      3                 #I/O RETRIES
QBLKSZ   EQU      512               QUEUE BLOCK SIZE
QWRITE   EQU      1                 WRITE FUNCTION CODE
QREAD    EQU      0                 READ FUNCTION CODE
QWRITEIF EQU      X'10'             WRITE OP,WRITE REQUIRED FLAG ON
QINXBSZ  EQU      501               AVAIL WORDS IN AN INDEX BLOCK
QICBENTS EQU      256               # OF ENTRIES IN ICB.  ALLOWS FOR
*                                   APPROX. 256*(501/5) = 25600 UNIQUE
*                                   KEYS
QINXCSZ  EQU      3                 # KEY CONTROL WORDS, INDEX BLOCK
QDATACSZ EQU      9                 # CONTROL BYTES+1, DATA BLOCK
QDATAENTST EQU    2                 START OF ENTRIES IN DATA BLOCK
QDATAENTSTD EQU   1
QRTYPE   EQU      0                 QUEUE RESOURCE TYPES, AVAILABILITY
QRTYPE1  EQU      1                 CORE
QRTYPE2  EQU      2                 DISK SPACE
QRTYPE3  EQU      3                 UNLOCK OCCURRENCE
QRTYPE4  EQU      4                 PUT OCCURRENCE
QMSGCSZ  EQU      6                 #WDS PUT/GET MSG PRECEDING LENGTH WD
QSTATSBEG EQU     4                 START DISPLACEMENT QUEUE STATS DATA
QSTATSSZ EQU      14                # QUEUE STATS WORDS
QSATINC  EQU      250000            SAT INCREMENT IN HUNDRED THOUSANDS
         FIN
         PAGE
*DO*
*D*
************************************************************
*                                                          *
*                           TTP                            *
*            TTP TABLE--TRANSACTION PROCESSING             *
*                 RESIDENT CONTROL TABLE                   *
*                                                          *
************************************************************
*FIN*
*D*      WORD                       DEFINITION
*D*
*D*               0   2       6 7 8                         31
*D*              ---------------------------------------------
*D*       0      |   | |     | | |       Q:MAP               |
*D*              ---------------------------------------------
*D*                   |       | |
*D*                   |       | |
*D*      Q:LOCK-------        | |
*D*                           | |
*D*      Q:BACK---------------  |
*D*                             |
*D*      Q:RCV------------------
*D*
*D*               0          8         16         24        31
*D*              ---------------------------------------------
*D*      1       |  Q:CC    |            Q:CFU               |
*D*              ---------------------------------------------
*D*      2       |  Q:NSN   |            Q:SN                |
*D*              ---------------------------------------------
*D*      3       |  Q:MAX   |            Q:INXCONTROL        |
*D*              ---------------------------------------------
*D*      4       |    (Q:DEFH)                               |
*D*              ---------          Q:DEF            ---------
*D*      5       |                                           |
*D*              ---------------------------------------------
*                ---------------------------------------------
*D*      6       |    (Q:GETH)                               |
*D*              ---------          Q:GET            ---------
*D*      7       |                                           |
*D*              ---------------------------------------------
*D*      8       |        Q:LID       |   Q:MIN  |  Q:INXNAV |
*D*              ---------------------------------------------
*D*      9       |          |            Q:QHEAD             |
*D*              ---------------------------------------------
*D*     10       |          |            Q:QTAIL             |
*D*              ---------------------------------------------
*D*     11       |                  Q:INX                    |
*D*              ---------------------------------------------
*D*     12       |                  Q:INXTAIL                |
*D*              ---------------------------------------------
*D*     13       |          |            Q:MPOOL             |
*D*              ---------------------------------------------
*D*     14       |                  Q:TID                    |
*D*              ---------------------------------------------
*D*     15       |  Q:USR   |  Q:SAT  | Q:PAGES  |  Q:OWN    |
*D*              ---------------------------------------------
*D*     16       |                  Q:TPPP                   |
*D*              ---------------------------------------------
*D*     17       |                  Q:TPPPTAIL               |
*D*              ---------------------------------------------
*D*     18       |                  Q:CONT                   |
*D*              ---------------------------------------------
*D*     19       |                  Q:CONTTAIL               |
*D*              ---------------------------------------------
*D*     20       |                  Q:DATA                   |
*D*              ---------------------------------------------
*D*     21       |                  Q:DATATAIL               |
*D*              ---------------------------------------------
*D*     22       |                          Q:PAUSE------->| |
*D*              ---------------------------------------------
*D*     23       |                  Q:SR1                    |
*D*              ---------------------------------------------
         PAGE
*D*******************************************************************
*D*      DESCRIPTION OF TTP TABLE ITEMS
*D*******************************************************************
*D*
*D*  ITEM NAME    WORD    TYPE      DESCRIPTION
*D*
*D*  Q:BACK        0       BIT        BACKUP OPTION REQUESTED DURING
*D*                                   UNLOCK, 1=YES.
*D*
*D*  Q:CC          1       BYTE       I/O COMPLETION CODE FOR QUEUE
*D*                                   READS AND WRITES.  SET BY END-
*D*                                   ACTION.
*D*
*D*  Q:CFU         1       ADDR       REAL ADDRESS OF THE QUEUE FILE
*D*                                   CFU TABLE.
*D*
*D*  Q:CONT       18-19    WORD       CHAIN HEAD AND TAIL, QUEUE
*D*  Q:CONTTAIL                       CONTROL BLOCKS.
*D*
*D*  Q:DATA       20-21    WORD       CHAIN HEAD AND TAIL, QUEUE
*D*  Q:DATATAIL                       DATA BLOCKS.
*D*
*D*  Q:DEF         4       DWORD      CHAIN HEAD AND TAIL, INACTIVE
*D* (Q:DEFH)                          CRITERIA CONTROL ENTRIES
*D*                                   (POINTS TO U:QLIST ENTRY).
*D*
*D*  Q:GET         6       DWORD      CHAIN HEAD AND TAIL, ACTIVE
*D* (Q:GETH)                          CRITERIA CONTROL ENTRIES
*D*                                   (POINTS TO U:QLIST ENTRIES).
*D*
*D*  Q:INXNAV      8       BYTE       MAXIMUM NUMBER OF KEYS IN AN
*D*                                   INDEX BLOCK.
*D*
*D*  Q:INX        11-12    WORD       CHAIN HEAD AND TAIL, QUEUE
*D*  Q:INXTAIL                        INDEX BLOCKS.
*D*
*D*  Q:INXCONTROL  3       ADDR       REAL ADDRESS OF THE INDEX
*D*                                   CONTROL BLOCK.
*D*
*D*  Q:LID         8       HWORD      IDENTIFICATION NUMBER TO BE
*D*                                   ASSIGNED TO THE NEXT 'GET
*D*                                   LIST'.  (THE LIST ID).
*D*
*D*  Q:LOCK        0       BIT        QUEUE STATUS, 1=UNLOCKED.
*D*
*D*  Q:MAP         0       ADDR       REAL ADDRESS OF THE QUEUE
*D*                                   ALLOCATION MAP.
*D*
*D*  Q:MAX         3       BYTE       MAXIMUM NUMBER OF PHYSICAL
*D*                                   PAGES WHICH MAY BE STOLEN
*D*                                   BY THE QUEUE MANAGER FOR
*D*                                   QUEUE PAGES.
*D*
*D*  Q:MIN         8       BYTE       MINIMUM NUMBER OF PHYSICAL
*D*                                   PAGES REQUIRED FOR QUEUE BLOCKS.
*D*
*D*  Q:MPOOL      13       ADDR       MONITOR BUFFER ADDRESS (MPOOL).
*D*
*D*  Q:NSN         2       BYTE       NUMBER OF VOLUMES FOR A QUEUE
*D*                                   FILE ON PRIVATE STORAGE.
*D*
*D*  Q:OWN        15       BYTE       USER NUMBER OF THE QUEUE
*D*                                   OWNER  (THE TPG).
*D*
*D*  Q:PAGES      15       BYTE       CURRENT NUMBER OF PHYSICAL
*D*                                   PAGES ALLOCATED FOR QUEUE
*D*                                   BLOCKS.
*D*
*D*  Q:PAUSE      22       BIT        QUEUE IN LOCK, PAUSE STATUS.
*D*                                   (E.G. JOURNAL VOLUME SWITCH).
*D*                                   1=YES.
*D*
*D*  Q:QHEAD       9       ADDR       REAL ADDRESS OF THE CHAIN
*D*                                   HEADER FOR USERS QUEUED FOR
*D*                                   ACCESS OR SPACE (U:QUES).
*D*
*D*  Q:QTAIL      10       ADDR       REAL ADDRESS OF THE TAIL OF
*D*                                   CHAIN FOR USERS QUEUED FOR
*D*                                   ACCESS OR SPACE (U:QUES).
*D*
*D*  Q:RCV         0       BIT        RECOVERY IN PROGRESS, 1=YES.
*D*
*D*  Q:SAT        15       BYTE       PERCENTAGE OF QUEUE SATURATION
*D*                                   ALLOWED BEFORE ACCEPTING ONLY
*D*                                   HIGH PRIORITY REQUESTS ONLY.
*D*
*D*  Q:SN          2       ADDR       REAL ADDRESS OF THE SERIAL
*D*                                   NUMBERS FOR A QUEUE FILE ON
*D*                                   PRIVATE STORAGE.
*D*
*D*  Q:SR1        23       WORD       VALUE TO BE RETURNED IN SR1 ON
*D*                                   AN ABNORMAL CONDITION
*D*
*D*  Q:TID        14       WORD       HIGHEST TRANSACTION ID ASSIGNED
*D*                                   TO A TP USER.
*D*
*D*  Q:TPPP       16-17    WORD       CHAIN HEAD AND TAIL, QUEUE
*D*  Q:TPPPTAIL                       PHYSICAL PAGES.
*D*
*D*  Q:USR        15       BYTE       USER NUMBER OF THE CURRENT
*D*                                   USER PERFORMING QUEUE OPER-
*D*                                   ATIONS.
*D*
         PAGE
         DO       %X%]=0
         OPEN     X
X        SET      S:UFV(QSIM)
         DO       X=0
         SREF     TTP
QSIM     SET      0
         FIN
         CLOSE    X
         ERROR,* '***SYSTEM DTTP***VERSION 00***'
         ADMODE   (DIR,TTP)
Q:LOCK   BIT      0,2               QUEUE LOCK FLAG..0 MEANS YES
Q:PUT    BIT      0,3               PUT DONE DURING Q OP
*                                   DEVICE,NO
Q:DEL    BIT      0,5               DELETE DONE FOR LAST QUEUE REQUEST
Q:BACK   BIT      0,6               BACKUP OPTION ON UNLOCK REQUEST
Q:RCV    BIT      0,7               RECOVERY OF QUEUE ,ETC.
*                                   OWNER ONLY LEGAL CALLER
Q:MAP    ADDR     0,1               PTR TO ALLOCATION MAP
Q:CC     BYTE     4                 I/O COMPLETION CODE
Q:CFU    ADDR     1,1               PTR TO QUEUE CFU TABLE
Q:NSN    BYTE     8                 # SERIAL NUMBERS FOR QUEUE
*                                   FILE ON PRIVATE STORAGE
Q:SN     ADDR     2,1               PTR TO SERIAL NUMBERS FOR QUEUE
*                                   FILE ON PRIVATE STORAGE
Q:MAX    BYTE     12                MAX #, CORE INDEX BLOCKS
Q:INXCONTROL ADDR  3,1              ADDRESS, INDEX CONTROL BLOCK
Q:DEF    DWORD    2                 CHAIN HEAD/TAIL, INACTIVE QLIST
*                                   CONTROL TABLES
Q:DEFH   WORD     4                 Q:DEF HEAD
Q:GET    DWORD    3                 CHAIN HEAD/TAIL, ACTIVE QLIST
*                                   CONTROL TABLES
Q:GETH   WORD     6                 Q:GET HEAD
Q:LID    HWORD    16                GET LIST IDENTIFICATION NUMBER
Q:INXNAV BYTE     35                MAX # KEYS IN INDEX BLOCK
Q:MIN    BYTE     34                MIN #, CORE INDEX BLOCKS
Q:QHEAD  ADDR     9,1               HEAD OF CHAIN, USERS QUEUED FOR
*                                   QUEUE ACCESS OR SPACE
Q:QTAIL  ADDR     10,1              TAIL OF CHAIN, USERS QUEUED FOR
*                                   QUEUE ACCESS OR SPACE
Q:INX    WORD     11                CHAIN HEAD, INDEX BLOCKS
Q:INXTAIL WORD    12                CHAIN TAIL,INDEX BLOCKS
Q:CORE   BYTE     52                NUMBER OF INDEX BLOCKS IN CORE
Q:MPOOL  ADDR     13,1              MONITOR BUFFER ADDRESS
Q:TID    WORD     14                TP IDENTIFICATION CONTROL WORD
Q:TPPP   WORD     16                CHAIN HEAD, QUEUE PHYSICAL PAGES
Q:TPPPTAIL WORD   17                CHAIN TAIL, PHYSICAL PAGES
Q:USR    BYTE     60                USER NUMBER, QUEUE USER
Q:SAT    BYTE     61                % VALUE FOR QUEUE SATURATION FOR
*                                   ACCEPTING HIGH PRIORITY PUTS ONLY
Q:PAGES  BYTE     62                CURRENT NUMBER, PHYSICAL QUEUE PAGES
Q:OWN    BYTE     63                USER NUMBER, QUEUE OWNER
Q:CONT   WORD     18                CHAIN HEAD, CONTROL BLOCKS
Q:CONTTAIL WORD   19                CHAIN TAIL, CONTROL BLOCKS
Q:DATA   WORD     20              CHAIN HEAD, DATA BLOCKS
Q:DATATAIL WORD   21                CHAIN TAIL, DATA BLOCKS
Q:PAUSE  BIT      22,31             LOCK QUEUE IN PAUSE MODE...1 MEANS
Q:SR1    WORD     23                SR1 RETURN VALUE ON ABNORMAL
*                                   YES.  USED AT CVOL BY TPG.
Q:TTPSIZE EQU     25                TABLE SIZE
         FIN
         PAGE
*DO*
*D*
************************************************************
*                                                          *
*                               TQCONT                     *
*                        QUEUE CONTROL BLOCK               *
*                          TABLE DEFINITION                *
*                                                          *
************************************************************
*FIN*
*D*
*D*
*D*      WORD                       DEFINITION
*D*
*D*               0          8         16         24        31
*D*              ---------------------------------------------
*D*       0      |                  CONTCHAIN                |
*D*              ---------------------------------------------
*D*       1      | |         |          CONTBLOCK            |
*D*              ---------------------------------------------
*D*               |
*D*  CONTWRITE----
*D*
*D*              ---------------------------------------------
*D*       2      |                                           |
*D*              ---------------------------------------------
*D*       3      |                CONTGDACHAIN               |
*D*              ---------------------------------------------
*D*       4      |           |         CONTINDEXES           |
*D*              ---------------------------------------------
*D*       5      |                CONTTID                    |
*D*              ---------------------------------------------
*D*       6      |                CONTENTRIES                |
*D*              ---------------------------------------------
*D*       7      |                CONTPROC                   |
*D*              ---------------------------------------------
*
*                ---------------------------------------------
*D*       8      |                CONTFAILED                 |
*D*              ---------------------------------------------
*D*       9      |                CONTMAX                    |
*D*              ---------------------------------------------
*D*      10      |                                           |
*D*              -------          CONTMAXTIME          -------
*D*              |                                           |
*D*              ---------------------------------------------
*D*      12      | CONTUSR  |          CONTNAVGRANS          |
*D*              ---------------------------------------------
*D*      13      | |        |          CONTINXCONT           |
*D*              ---------------------------------------------
*D*               |
*D* CONTCONI------
*D*
*D*              ---------------------------------------------
*D*      14      | |        |          CONTMAPBIAS           |
*D*              ---------------------------------------------
*D*               |
*D* CONTCON-------
*D*
*D*              ---------------------------------------------
*D*      15      | CONTKEYM |          CONTFIRSTGDA          |
*D*              ---------------------------------------------
*D*      16      \                 CONTHTID                  \
*D*              ---------------------------------------------
*D*      17      |                 CONTSAT                   |
*D*              ---------------------------------------------
*D*                           |
*D*           CONTSATB--------
*D*
*D*              ---------------------------------------------
*D*      18      |                 CONTSATINC                |
*D*              ---------------------------------------------
*D*                                   .
*D*                                   .
*D*                                   .
*D*
         PAGE
*D*******************************************************************
*D*      DESCRIPTION OF TQCONT TABLE ITEMS
*D*******************************************************************
*D*
*D*  ITEM NAME    WORD     TYPE     DESCRIPTION
*D*
*D*  CONTBLOCK     1        ADDR      BLOCK NUMBER, THIS BLOCK.
*D*
*D*  CONTCHAIN     0        WORD      IN-CORE CHAINING WORD
*D*
*D*  CONTCON      14        BIT       FLAG WHICH INDICATES THAT THE
*D*                                   ALLOCATION MAP IS IN THIS
*D*                                   BLOCK, 1=YES.
*D*
*D*  CONTCONI     15        BIT       FLAG WHICH INDICATES THAT THE
*D*                                   INDEX CONTROL BLOCK IS IN
*D*                                   THIS BLOCK, 1=YES.
*D*
*D*  CONTENTRIES   6        WORD      NUMBER OF ENTRIES WHICH HAVE
*D*                                   BEEN QUEUED.
*D*
*D*  CONTFAILED    8        WORD      NUMBER OF ENTRIES IN THE QUEUE
*D*                                   IN 'FAILED' STATUS.
*D*
*D*  CONTFIRSTGDA 15        ADDR      BLOCK NUMBER OF THE FIRST BLOCK
*D*                                   REPRESENTED IN THE ALLOCATION
*D*                                   MAP.
*D*
*D*  CONTGDACHAIN  3        WORD      FLINK (FORWARD DISK CHAIN) TO
*D*                                   NEXT QUEUE CONTROL BLOCK.
*D*
*D*  CONTINDEXES   4        ADDR      NUMBER OF INDEX BLOCKS IN THE
*D*                                   QUEUE FILE.
*D*
*D*  CONTINXCONT  13        ADDR      BIAS WITHIN THIS BLOCK TO THE
*D*                                   INDEX CONTROL BLOCK (CONTCONI=1)
*D*                                   OR BLOCK NUMBER OF THE INDEX
*D*                                   CONTROL BLOCK (CONTCONI=0).
*D*
*D*  CONTKEYM     15        BYTE      THE MAXIMUM SIZE OF THE KEYS
*D*                                   IN THE INDEX BLOCK.  KEY MAX
*D*                                 IS IN WORDS.
*D*
*D*  CONTMAPBIAS  14        ADDR      BIAS WITHIN THIS BLOCK TO THE
*D*                                   ALLOCATION MAP (CONTCON=1) OR
*D*                                   BLOCK NUMBER OF THE ALLOCATION
*D*                                   MAP (CONTCON=0).
*D*
*D*  CONTMAX       9        WORD      MAXIMUM NUMBER OF ENTRIES QUEUED
*D*                                   AT ANY PARTICULAR TIME.
*D*
*D*  CONTMAXTIME  10        DWORD     TIME OF DAY ASSOCIATED WITH
*D*                                   CONTMAX.
*D*
*D*  CONTNAVGRANS 12        ADDR      NUMBER OF GRANULES IN THE
*D*                                   QUEUE FILE.
*D*
*D*  CONTPROC      7        WORD      NUMBER OF ENTRIES MARKED IN-
*D*                                   PROGRESS.
*D*
*D*  CONTSAT      17        WORD      CURRENT QUEUE SATURATION LEVEL.
*D*
*D*  CONTSATB     17        BYTE      PERCENT FIELD OF SATURATION.
*D*
*D*  CONTSATINC   18        WORD      SATURATION INCREMENT FOR THIS
*D*                                   QUEUE FILE.
*D*
*D*  CONTTID       5        WORD      HIGHEST TRANSACTION ID QUEUED.
*D*
*D*  CONTHTID     16        WORD      HIGHEST TRANSACTION ID ASSIGNED
*D*                                   WHEN QUEUE LAST LOCKED.
*D*
*D*  CONTUSR      12        BYTE      USER NUMBER OF THE QUEUE OWNER.
*D*
*D*  CONTWRITE     1        BIT       FLAG WHICH INDICATES THAT THE
*D*                                   IN-CORE IMAGE OF THIS BLOCK
*D*                                   MUST BE WRITTEN TO THE QUEUE
*D*                                   FILE.
*D*
         PAGE
         DO       %X%]=0
         ADMODE   (IND)
         ERROR,*   '***SYSTEM DTTCONT***VERSION 00***'
CONTWRITE BIT     1,0               BLOCK WRITE REQUIRED FLAG
CONTMOD  BIT      1,1               BLOCK MODIFIED INDICATOR
CONTCHAIN ADDR    0,1               CORE CHAINING WORD
CONTBLOCK ADDR    1,1               BLOCK #, THIS BLOCK
CONTGDACHAIN ADDR  3,1              FLINK, DISK CHAIN
CONTINDEXES ADDR  4,1               # INDEX BLOCKS
CONTTID  WORD     5                 HIGHEST TID QUEUED
CONTENTRIES WORD  6                 NUMBER OF ENTRIES QUEUED
CONTPROC WORD     7                 NUMBER OF ENTRIES IN PROGRESS
CONTFAILED WORD   8                 NUMBER OF ENTRIES IN FAILED
*                                   STATUS
CONTMAX  WORD     9                 MAXIMUM # ENTRIES QUEUED SINCE
*                                   UNLOCK
CONTMAXTIME WORD  10                TIME OF DAY OF CONTMAX
CONTNAVGRANS ADDR  12,1             NUMBER OF QUEUE GRANULES
CONTUSR  BYTE     48                ID OF QUEUE OWNER
CONTCONI BIT      13,0              ICB IN BLOCK 1 INDICATOR
CONTINXCONT ADDR  13,1              BLOCK #, INDEX CONTROL BLOCK
CONTCON  BIT      14,0              MAP IN BLOCK 1 INDICATOR
CONTMAPBIAS HWORD 29                BIAS WITHIN BLOCK TO ALLOCATION
*                                   MAP
CONTMAP  ADDR     14,1              BLOCK NUMBER OF THE ALLOCATION MAP
CONTKEYM BYTE     60                MAXIMUM KEY SIZE FOR NAME FIELD IN
*                                   INDEX BLOCKS
CONTFIRSTGDA ADDR  15,1             BLOCK #, FIRST ENTRY IN THE
*                                   ALLOCATION MAP
CONTHTID WORD     16                HIGHEST TID ASSIGNED AT LOCK TIME
CONTSAT  WORD     17                CURRENT SATURATION LEVEL
CONTSATB BYTE     69                % FIELD OF SAT
CONTSATINC WORD   18                SATURATION INC. FOR QUEUE FILE
         FIN
         PAGE
*
*DO*
*D*
***********************************************************
*                                                         *
*                             TQALL                       *
*                     QUEUE ALLOCATION MAP                *
*                        TABLE DEFINITION                 *
*                                                         *
***********************************************************
*FIN*
*D*
*D*      WORD                       DEFINITION
*D*
*D*                0          8          16         24        31
*D*               ----------------------------------------------
*D*       0       |                 ALLCHAIN                   |
*D*               ----------------------------------------------
*D*       1       | |         |           ALLBLOCK             |
*D*               ----------------------------------------------
*D*                |
*D*    ALLWRITE----
*D*
*D*               ----------------------------------------------
*D*       2       |           |           ALLBLINK             |
*D*               ----------------------------------------------
*D*       3       |           |           ALLFLINK             |
*D*               ----------------------------------------------
*D*       4       |                      |      ALLBLOCKNAV    |
*D*               ----------------------------------------------
*D*       5       |      ALLMAP          |                     |
*D*               ----------------------------------------------
*D*                                      .
*D*                                      .
*D*                                      .
*D*
*D*                ALLMAP BEGINS A HALFWORD PARALLEL TABLE
*D*                CONSISTING OF THE FOLLOWING ENTRIES:
*D*
*D*               0 1 2 3               15
*D*               ------------------------
*D*               | |  | |  ALLNAV       |
*D*               ------------------------
*D*                   | |
*D*   ALLT (2 BITS)---  |
*D*                     |
*D*   ALLA (1 BIT)------
*D*
         PAGE
*D******************************************************************
*D*      DESCRIPTION OF TQALL TABLE ITEMS
*D******************************************************************
*D*
*D*  ITEM NAME    WORD      TYPE    DESCRIPTION
*D*
*D*  ALLA          5(FF)     BIT      BLOCK ALLOCATED FLAG, 1=YES.
*D*
*D*  ALLBLINK      2         ADDR     BLOCK NUMBER (BLINK) OF
*D*                                   PREVIOUS ALLOCATION BLOCK.
*D*
*D*  ALLBLOCK      1         ADDR     BLOCK NUMBER, THIS BLOCK.
*D*
*D*  ALLBLOCKNAV   4         HWORD    NUMBER OF HALFWORDS AVAILABLE
*D*                                   FOR ALLOCATION (IN THIS BLOCK).
*D*
*D*  ALLCHAIN      0         WORD     IN-CORE CHAINING WORD.
*D*
*D*  ALLFLINK      3         ADDR     BLOCK NUMBER (FLINK) OF
*D*                                   FORWARD ALLOCATION BLOCK.
*D*
*D*  ALLMAP        5         HWORD    BEGINNING OF THE HALFWORD
*D*                                   ALLOCATION TABLE.
*D*
*D*  ALLNAV        5(FF)     BYTE     THE NUMBER OF DOUBLEWORDS
*D*                                   WITHIN THE CORRESPONDING DATA
*D*                                   BLOCK WHICH CONTAIN ENTRY TEXT
*D*                                   DATA.  THE NUMBER OF ACTIVE
*D*                                   KEYS WITHIN THE CORRESPONDING
*D*                                   INDEX BLOCK.
*D*
*D*  ALLT          5(FF)     BITS     BLOCK TYPE, 0=INDEX BLOCK
*D*                                               1=DATA BLOCK.
*D*
*D*  ALLWRITE      1         BIT      FLAG WHICH INDICATES THAT
*D*                                   THE IN-CORE IMAGE OF THIS BLOCK
*D*                                   MUST BE WRITTEN TO THE QUEUE
*D*                                   FILE.
*D*
*D*
         DO       %X%]=0
         ADMODE   (IND)
         ERROR,*    '***SYSTEM DTQALL***VERSION 00***'
ALLWRITE BIT      1,0               BLOCK WRITE REQUIRED INDICATOR
ALLMOD   BIT      1,1               BLOCK MODIFIED
ALLCHAIN ADDR     0,1               CORE CHAINING WORD
ALLBLOCK ADDR     1,1               BLOCK #, THIS BLOCK
ALLBLINK ADDR     2,1               BLOCK #, BACKWARD LINK
ALLFLINK ADDR     3,1               BLOCK #, FORWARD LINK
ALLBLOCKNAV HWORD 9                 # AVAILABLE HWS
ALLA     BIT      5,3               BLOCK SUB N ALLOCATED FLAG:
*                                   1 MEANS BLOCK ALLOCATED
ALLT     FIELD    5,(2,2)           BLOCK TYPE :
*                                   0 = INDEX BLOCK
*                                   1 = DATA BLOCK
ALLTA    BYTE     20                BYTE CONTAINING ALLA AND T
ALLNAV   FIELD    5,(15,12)         NUMBER OF AVAILABLE UNITS IN THE
*                                   BLOCK...IF BLOCK TYPE=DATA, UNITS
*                                           ARE DOUBLEWORDS
*                                           IF BLOCK TYPE=INDEX, UNITS
*                                            ARE KEY SLOTS
*
*                                             BLOCK INFORMATION STARTS
*                                             WITH DATA FOR BLOCK (1)
ALLAM    BIT      5,19              MASK FOR 'A' IN RHW
ALLTM    FIELD    5,(18,2)          DITTO FOR 'T'
ALLMAP   HWORD    10                NAME FOR HALFWORD CONTAINING
*                                   ALLA,ALLT,ALLNAV
         FIN
         PAGE
*DO*
*D*
**********************************************************
*                                                        *
*                             TQICB                      *
*                    QUEUE INDEX CONTROL BLOCK           *
*                        TABLE DEFINITION                *
*                                                        *
**********************************************************
*FIN*
*D*
*D*
*D*      WORD                       DEFINITION
*D*
*D*                0         8         16         24        31
*D*               --------------------------------------------
*D*       0       |          |         ICBCHAIN              |
*D*               --------------------------------------------
*D*       1       | |        |         ICBBLOCK              |
*D*               --------------------------------------------
*D*                |
*D*  ICBWRITE------
*D*
*D*               --------------------------------------------
*D*       2       |          |         ICBHASH(1)            |
*D*               --------------------------------------------
*D*                                      .
*D*                                      .
*D*                                      .
*D*               --------------------------------------------
*D*       N       |          |         ICBHASH(N)            |
*D*               --------------------------------------------
*D*
*D*
         PAGE
*D*******************************************************************
*D*      DESCRIPTION OF TQICB TABLE ITEMS
*D*******************************************************************
*D*
*D*  ITEM NAME    WORD      TYPE    DESCRIPTION
*D*
*D*  ICBBLOCK      1         ADDR     BLOCK NUMBER, THIS BLOCK.
*D*
*D*  ICBCHAIN      0         ADDR     IN-CORE CHAINING WORD.
*D*
*D*  ICBHASH       2(FF)     ADDR     BLOCK NUMBER IN THE INDEX BLOCK
*D*                                   CHAIN CONTAINING KEYS FOR
*D*                                   ENTRIES WHOSE FIRST NAME
*D*                                   SEGMENT HASHES TO THIS WORD
*D*                                   IN THE ICB BLOCK.
*D*
*D*  ICBWRITE      1         BIT      FLAG WHICH INDICATES THAT THE
*D*                                   IN-CORE IMAGE OF THIS BLOCK
*D*                                   MUST BE WRITTEN TO THE QUEUE
*D*                                   FILE.
*D*
*D*
         DO       %X%]=0
         ERROR,*     '***SYSTEM DTQICB***VERSION 00***'
         ADMODE   (IND)
ICBWRITE BIT      1,0               WRITE REQUIRED FLAG
ICBMOD   BIT      1,1               BLOCK MODIFIED
ICBCHAIN ADDR     0,1               CORE CHAINING WORD
ICBBLOCK ADDR     1,1               BLOCK #, THIS BLOCK
ICBHASH  ADDR     2,1               HASH CODE SUB N...PTR TO
*                                   AN INDEX BLOCK BY BLOCK #
         FIN
         PAGE
*
*DO*
*D*
***********************************************************
*                                                         *
*                               TQINDEX                   *
*                      QUEUE INDEX BLOCK TABLE            *
*                              DEFINITION                 *
*                                                         *
***********************************************************
*FIN*
*D*
*D*
*D*      WORD                       DEFINITION
*D*
*D*                0          8         16        24        31
*D*               --------------------------------------------
*D*       0       |           |        INDEXCHAIN            |
*D*               --------------------------------------------
*D*       1       | |         |        INDEXBLOCK            |
*D*               --------------------------------------------
*D*                |
*D*  INDEXWRITE----
*D*
*D*               --------------------------------------------
*D*       2       |           |        INDEXBLINK            |
*D*               --------------------------------------------
*D*       3       |           |        INDEXFLINK            |
*D*               --------------------------------------------
*D*       4       |    INDEXKEYS        |                    |
*D*               --------------------------------------------
*D*       5       |                  RESERVED                |
*D*               --------------------------------------------
*D*                                     .
*D*                                     .
*D*                                     .
*D*               --------------------------------------------
*D*       9       |                  RESERVED                |
*D*               --------------------------------------------
*D*      10       |           |        INDEXHTXT(R)          |
*D*               --------------------------------------------
*D*                                     |
*D*                 INDEXSLOT-----------
*D*
*D*               --------------------------------------------
*D*      11       |           |        INDEXTTXT(R)          |
*D*               --------------------------------------------
*D*      12       |                   | | |  INDEXCOUNT(R)   |
*D*               --------------------------------------------
*D*                                    | |
*D*                 INDEXBYPASSR-------  |
*D*                                      |
*D*                 INDEXF(R)------------
*D*
*D*               --------------------------------------------
*D*      13       |                INDEXNAME(R)              |
*D*               --------------------------------------------
*D*                     |           |    .
*D*  INDEXNAMESZ(R)-----            |    .
*D*                                 |    .
*D*  INDEXTYPER---------------------     .
*D*                                      .
*D*              (WORDS 10 THROUGH 12+KEYMAX REPEAT FOR EACH KEY)
*D*
*D*
         PAGE
*D******************************************************************
*D*      DESCRIPTION OF TQINDEX TABLE ITEMS
*D******************************************************************
*D*
*D*  ITEM NAME    WORD      TYPE    DESCRIPTION
*D*
*D*  INDEXBLINK    2         ADDR     BLOCK NUMBER, PREVIOUS INDEX
*D*                                   BLOCK.
*D*
*D*  INDEXBLOCK    1         ADDR     BLOCK NUMBER, THIS BLOCK.
*D*
*D*  INDEXCHAIN    0         ADDR     IN-CORE CHAINING WORD.
*D*
*D*  INDEXFLINK    3         ADDR     BLOCK NUMBER, FORWARD INDEX
*D*                                   BLOCK.
*D*
*D*  INDEXKEYS     4         HWORD    THE NUMBER OF ENTRIES WITHIN
*D*                                   THE BLOCK CONTAINING ACTIVE
*D*                                   KEYS.
*D*
*D*  INDEXSLOT    10         WORD     THE OFFSET TO THE FIRST KEY
*D*                                   IN THIS BLOCK.
*D*
*D*  INDEXWRITE    1         BIT      FLAG WHICH INDICATES THAT THE
*D*                                   IN-CORE IMAGE OF THIS BLOCK
*D*                                   MUST BE WRITTEN TO THE QUEUE
*D*                                   FILE.
*D*
*D*
*D*
*D*      THE FOLLOWING ITEMS ARE DEFINED IN TWO WAYS--THE NAME
*D*      ENDING IN 'R' DEFINES THE ITEM RELATIVE TO THE BEGINNING
*D*      OF THE ENTRY.  THE NAME WITHOUT THE 'R' DEFINES THE
*D*      FIRST ENTRY IN THE INDEX BLOCK.
*D*
*D*
*D*  INDEXBYPASSR  2         BIT      SPECIAL BYPASS FLAG WHICH
*D*                                   INDICATES THAT NO GETS WILL BE
*D*                                   HONORED FOR THIS TRANSACTION
*D*                                   NAME UNTIL THE BYPASS IS RE-
*D*                                   MOVED.
*D*
*D*  INDEXCOUNT(R) 2         BITS     THE NUMBER OF ENTRIES QUEUED
*D*                         (17-31)   FOR THIS KEY.
*D*
*D*  INDEXF(R)     2         BIT      STATUS OF THIS KEY, 1=ACTIVE
*D*                                                       0=EMPTY.
*D*
*D*  INDEXHTXT(R)  1         ADDR     BLOCK NUMBER OF THE FIRST ENTRY
*D*                                   QUEUED FOR THIS KEY.
*D*
*D*  INDEXNAME(R)  3         WORD     TEXTC OF KEY (FIRST NAME
*D*                                   SEGMENT).  NOTE:  THE SIZE OF
*D*                                   THIS ITEM IS DEFINED IN CONTKEYM
*D*                                   (I. E. KEYMAX).
*D*
*D*  INDEXNAMESZ(R) 3        BYTE     THE NUMBER OF BYTES IN THE
*D*                                   KEY (FIRST NAME SEGMENT).
*D*
*D*  INDEXTTXT(R)  1         ADDR     BLOCK NUMBER OF THE LAST ENTRY
*D*                                   QUEUED FOR THIS KEY.
*D*
*D*  INDEXTYPER    3         BYTE     THE FIRST CHARACTER OF THE
*D*                                   KEY.  THIS INDICATES THE TYPE
*D*                                   OF TRANSACTION OR REPORT
*D*                                   QUEUED.
*D*
*D*
         PAGE
         DO       %X%]=0
         ERROR,*    '***SYSTEM DTTINDEX***VERSION 00***'
         ADMODE   (IND)
INDEXWRITE BIT    1,0               BLOCK WRITE REQUIRED FLAG
INDEXMOD BIT      1,1               BLOCK MODIFIED INDICATOR
INDEXREL BIT      1,2               BLOCK RELEASE FLAG
INDEXCHAIN ADDR   0,1               CORE CHAINING WORD
INDEXBLOCK ADDR   1,1               BLOCK #, THIS BLOCK
INDEXKEYS HWORD   8                 NUMBER OF KEYS IN THE BLOCK
*                                   UNUSED
INDEXBLINK ADDR   2,1               BLOCK #, PREVIOUS INDEX BLOCK
INDEXFLINK ADDR   3,1               BLOCK #, FORWARD INDEX BLOCK
INDEXHTXT  ADDR   10,1              TEXT HEAD BLOCK #
INDEXTTXT  ADDR   11,1              TEXT TAIL BLOCK #
INDEXF   BIT      12,16             KEY STATUS..0=EMPTY
INDEXCOUNT FIELD  12,(31,15)        # ENTRIES QUEUED THIS NAME
INDEXNAMESZ BYTE  52                # BYTES IN 1ST NAME SEGMENT
INDEXNAME  WORD   13                ENTRY NAME SUB N
*        THE FOLLOWING DEFINITIONS ARE BASED ON DISPLACEMENT
*        FROM THE START OF AN ENTRY
INDEXSLOT WORD    10
INDEXHTXTR ADDR   0,1               TEXT HEAD BLOCK #
INDEXTTXTR ADDR   1,1               TEXT TAIL BLOCK #
INDEXBYPASSR BIT  2,15              BYPASS FLAG, 1 INDICATES ON.
INDEXFR  BIT      2,16              KEY STATUS..0=EMPTY
INDEXCOUNTR FIELD 2,(31,15)         # ENTRIES QUEUED THIS NAME
INDEXNAMESZR BYTE 12                # BYTES IN 1ST NAME SEGMENT
INDEXNAMER WORD   3                 ENTRY NAME SUB N
INDEXTYPER  BYTE  13
         FIN
         PAGE
*
*DO*
*D*
**************************************************
*                                                *
*                   TQDATA                       *
*             QUEUE DATA BLOCK                   *
*             TABLE DEFINITION                   *
*                                                *
**************************************************
*FIN*
*D*
*D*
*D*      WORD                       DEFINITION
*D*
*D*                0         8         16         24         31
*D*               ---------------------------------------------
*D*       0       |          |          DATACHAIN             |
*D*               ---------------------------------------------
*D*       1       | |        |          DATABLOCK             |
*D*               ---------------------------------------------
*D*                |
*D*  DATAWRITE-----
*D*
*D*               ---------------------------------------------
*D*       2       |          |          DATAINDEX(R)          |
*D*               ---------------------------------------------
*D*                    |
*D*  DATAENTRY#(R)-----
*D*
*D*               ---------------------------------------------
*D*       3       |          |          DATAFLINK(R)          |
*D*               ---------------------------------------------
*D*                    |
*D*  DATASTATUS(R)-----
*D*
*D*               ---------------------------------------------
*D*       4       |          |DATANID(R)|                     |
*D*               ---------------------------------------------
*D*                    |
*D*  DATANAMECNT(R)----
*D*                                    .
*D*                                    .
*D*                                    .
*D*               ---------------------------------------------
*D*               |BYTE COUNT OF TEXTC |
*D*               ---------------------
*D*               |           TEXTC OF THE TEXT FOR           |
*D*               |              THIS TRANSACTION.            |
*D*       N       |                                           |
*D*               ---------------------------------------------
*D*                                    .
*D*                                    .
*D*                                    .
*D*                (WORDS 2 THROUGH N REPEAT FOR EACH DATA ENTRY)
*D*
*D*
*D*
         PAGE
*D*******************************************************************
*D*      DESCRIPTION OF TQDATA TABLE ITEMS
*D*******************************************************************
*D*
*D*  ITEM NAME    WORD      TYPE    DESCRIPTION
*D*
*D*  DATABLOCK     1         ADDR     BLOCK NUMBER, THIS BLOCK.
*D*
*D*  DATACHAIN     0         ADDR     IN-CORE CHAINING WORD.
*D*
*D*  DATAWRITE     1         BIT      FLAG WHICH INDICATES THAT THE
*D*                                   IN-CORE IMAGE OF THIS BLOCK
*D*                                   MUST BE WRITTEN TO THE QUEUE
*D*                                   FILE.
*D*
*D*
*D*      THE FOLLOWING ITEMS ARE DEFINED IN TWO WAYS.  THE NAME
*D*      ENDING IN 'R' DEFINES THE ITEM RELATIVE TO THE BEGINNING
*D*      OF THE ENTRY.  THE NAME WITHOUT THE 'R' DEFINES THE
*D*      FIRST ENTRY IN THE DATA BLOCK.
*D*
*D*
*D*  DATAENTRY#(R) 0         BYTE     THE ENTRY NUMBER OF THE KEY
*D*                                   ASSOCIATED WITH THIS DATA
*D*                                   ENTRY.
*D*
*D*  DATAFLINK(R)  1         ADDR     BLOCK NUMBER OF THE NEXT DATA
*D*                                   ENTRY ASSOCIATED WITH THE SAME
*D*                                   KEY.
*D*
*D*  DATAINDEX(R)  0         ADDR     THE BLOCK NUMBER OF THE INDEX
*D*                                   BLOCK CONTAINING THE KEY FOR
*D*                                   THIS ENTRY.
*D*
*D*  DATANAMECNT(R) 2        BYTE     THE NUMBER OF BYTES IN THE
*D*                                   DATA NAME SEGMENTS.
*D*
*D*  DATANID(R)    2         BYTE     THE ENTRY NAME OF THIS
*D*                                   TRANSACTION LESS THE FIRST
*D*                                   NAME SEGMENT (WHICH BECAME THE
*D*                                   KEY).  THIS NAME INCLUDES THE
*D*                                   TRANSACTION ID.
*D*
*D*  DATASTATUS(R) 1         BYTE     THE STATUS OF THIS ENTRY.
*D*
*D*                                    BIT     INDICATES
*D*                                    ---     ----------
*D*                                     0      QUEUED
*D*                                     1      RESERVED
*D*                                     2      FAILED
*D*                                     3      IN-PROGRESS
*D*                                     4-7    IGNORED
*D*
*D*
*D*
         PAGE
         DO       %X%]=0
         ADMODE   (IND)
         ERROR,*    '***SYSTEM DTQDATA***VERSION 00***'
DATAWRITE BIT     1,0               BLOCK WRITE REQUIRED INDICATOR
DATAMOD  BIT      1,1               BLOCK MODIFIED
DATAREL  BIT      1,2               BLOCK RELEASE
DATACHAIN ADDR    0,1               CORE CHAINING WORD
DATABLOCK ADDR    1,1               BLOCK #, THIS BLOCK
DATAENTRY# BYTE   8                 INDEX BLOCK ENTRY NUMBER
DATAINDEX ADDR    2,1               BLOCK #, INDEX BLOCK CONTAINING
*                                   KEY FOR THE ENTRY
DATASTATUS BYTE   12                ENTRY STATUS BYTE
DATAFLINK ADDR    3,1               BLOCK #, FORWARD TEXT THIS NAME
DATAENT  DWORD    1                 NAME FOR TEXT CONTROL ITEMS:
*                                   DATAENTRY#,DATAINDEX,DATASTATUS,
*                                   DATAFLINK
DATANAMECNT BYTE  16                BYTE POSITION OF NID COUNT
DATANID  BYTE     17                BYTE POSITION OF 1ST NID CHARACTER
DATATEXT DWORD    2                 ENTRY TEXT STRING..TEXTC
*        THE FOLLOWING DEFINITIONS ARE BASED ON DISPLACEMENT
*        FROM THE START OF AN ENTRY
DATAENTRY#R BYTE  0                 INDEX BLOCK ENTRY NUMBER
DATAINDEXR ADDR   0,1               BLOCK #, INDEX BLOCK CONTAINING
*                                   KEY FOR THE ENTRY
DATASTATUSR BYTE  4                 ENTRY STATUS BYTE
DATAFLINKR ADDR   1,1               BLOCK #, FORWARD TEXT THIS NAME
DATAENTR DWORD    0                 NAME FOR TEXT CONTROL ITEMS:
*                                   DATAENTRY#,DATAINDEX,DATASTATUS,
*                                   DATAFLINK
DATANAMECNTR BYTE 8                 BYTE POSITION OF NID COUNT
DATANIDR BYTE     9                 BYTE POSITION OF 1ST NID CHARACTER
DATATEXTR DWORD   1                 ENTRY TEXT STRING..TEXTC
         FIN
         PAGE
*DO*
*D*
**************************************************
*                                                *
*                      TQLIST                    *
*           CRITERIA LIST CONTROL TABLE          *
*                    DEFINITION                  *
*                                                *
**************************************************
*FIN*
*D*      WORD                       DEFINITION
*D*
*D*                0 1 2     8         16         24         31
*D*               ---------------------------------------------
*D*       0       \      QLIST BASE            CHAIN WORD     \
*D*               ---------------------------------------------
*D*       1       \# WORDS AVAIL IN BLK \  DISP TO AVAIL WORD \
*D*               ---------------------------------------------
*D*       2       \ \                             \           \
*D*               ---------------------------------------------
*D* 1 = ALLOC.----\
*D* # OF WORDS IN ENTRY---------------------------\
*D*
*D* QLIST ENTRIES
*D* FOLLOW
*D*               ---------------------------------------------
*D*       0       |                QLCHAIN                    |
*D*               ---------------------------------------------
*D*       1       |          |          QLECB                 |
*D*               ---------------------------------------------
*D*       2       |     QLID           |                      |
*D*               ---------------------------------------------
*D*       3       | | | |    |          QLGETLIST             |
*D*               ---------------------------------------------
*D*  QLLCP-----------\ \
*D*  QLWAIT------------\ \
*D*
*D*               ---------------------------------------------
*D*       4       |     QLINX(1)       |     QLINXV(1)        |
*D*               ---------------------------------------------
*D*       5       |     QLINX(2)       |     QLINXV(2)        |
*D*               ---------------------------------------------
*D*       6       |  QLNCP   |          QLINXEXT              |
*D*               ---------------------------------------------
*D*       7       |                    |     QLGETLISTSZ      |
*D*               ---------------------------------------------
*
*                 ---------------------------------------------
*D*       8       |   QLUSR  |                                |
*D*               ---------------------------------------------
*D*
*D*
         SPACE    5
*D******************************************************************
*D*      DESCRIPTION OF TQLIST TABLE ITEMS
*D******************************************************************
*D*
*D*  ITEM NAME    WORD      TYPE    DESCRIPTION
*D*
*D*  QLCHAIN       0         WORD     CHAINING WORD TO NEXT U:QLIST
*D*                                   TABLE.
*D*
*D*  QLECB         1         ADDR     VIRTUAL ADDRESS OF THE USER'S
*D*                                   ECB.  THE ECB IS POSTED WHEN
*D*                                   A CRITERIA MATCH IS FOUND
*D*                                   FOLLOWING A 'PUT' OPERATION.
*D*
*D*  QLGETLIST     3         ADDR     VIRTUAL ADDRESS OF THE START
*D*                                   OF THE GET LIST WITHIN THE
*D*                                   USER'S AREA.
*D*
*D*  QLGETLISTSZ   7         HWORD    LENGTH OF THE GET LIST IN
*D*                                   WORDS.
*D*
*D*  QLID          2         HWORD    THE LIST ID RETURNED TO THE
*D*                                   USER UPON A 'DEFINELIST'
*D*                                   OPERATION.  THE LIST ID
*D*                                   IDENTIFIES THE U:QLIST ENTRY
*D*                                   AND IS USED ON SUBSEQUENT
*D*                                   'GET' OPERATIONS.
*D*
*D*  QLINX         4-5       HWORD    THE REAL PAGE NUMBER(S) LOCKED
*D*                                   IN CORE FOR THE GET LISTS.
*D*                                   THE GET LIST AND THE CRITERIA
*D*                                   ARE LOCKED IN CORE WHILE THIS
*D*                                   LIST IS DEFINED.
*D*
*D*  QLINXV        4-5       HWORD    THE VIRTUAL PAGE NUMBER(S)
*D*                                   CORRESPONDING TO THE QLINX
*D*                                   ENTRIES.
*D*
*D*  QLINXEXT      6         ADDR     POINTER TO THE U:QLIST EXTENSION
*D*                                   IF MORE THAN TWO PAGES ARE
*D*                                   REQUIRED TO DEFINE THIS LIST.
*D*                                   (PTR IS AN ADDRESS WITHIN THIS BLK)
*D*
*D*  QLLCP         3         BIT      FLAG WHICH INDICATES THAT PAGES
*D*                                   HAVE BEEN LOCKED FOR THIS USER.
*D*
*D*  QLNCP         6         BYTE     THE NUMBER OF PAGES THAT HAVE
*D*                                   BEEN LOCKED FOR THIS DEFINE-
*D*                                   LIST REQUEST.
*D*
*D*  QLUSR         8         BYTE     THE USER NUMBER ASSOCIATED WITH
*D*                                   THIS LIST.
*D*
*D*  QLWAIT        3         BIT      FLAG INDICATING THAT THE USER
*D*                                   HAS BEEN PUT IN THE WAIT STATE
*D*                                   UNTIL A 'PUT' OCCURS.
*D*
         PAGE
*D*********************************************************
*D*                                                       *
*D*                    TQLIST                             *
*D*          CRITERIA LIST CONTROL TABLE                  *
*D*                   EXTENSION                           *
*D*                                                       *
*D*********************************************************
*D*
*D*      WORD                       DEFINITION
*D*
*D*                0         8         16         24         31
*D*               ---------------------------------------------
*D*       0       \ \                             \           \
*D*               ---------------------------------------------
*D* 1 = ALLOC.----\
*D* # OF WORDS IN ENTRY---------------------------\
*D* U:QLIST EXT.
*D* ENTRIES FOLLOW
*D*               ---------------------------------------------
*D*       0       \                     \    QLINXPEXT        \
*D*               \                     \    QLINXX(1)        \
*D*               ---------------------------------------------
*D*       1       \     QLINXXV(1)      \    QLINXX(2)        \
*D*               ---------------------------------------------
*D*                                     .
*D*                                     .
*D*                                     .
*D*               ---------------------------------------------
*D*       5       \     QLINXXV(5)      \                     \
*D*               ---------------------------------------------
*D*       6       \   QLNCP  \       QLINXEXT                 \
*D*               ---------------------------------------------
*D*       7       \                                           \
*D*               ---------------------------------------------
*D*       8       \                                           \
*D*               ---------------------------------------------
*D*
         PAGE
*D*******************************************************************
*D*      DESCRIPTION OF TQLIST EXTENSION TABLE ITEMS
*D*******************************************************************
*D*
*D*  ITEM NAME    WORD      TYPE    DESCRIPTION
*D*
*D*  QLINXPEXT     0         HWORD    INDEX TO THE FIRST REAL PAGE
*D*                                   POINTED TO IN THIS TABLE.
*D*
*D*  QLINXX        1         HWORD    SAME AS QLINX.
*D*
*D*  QLINXXV       1         HWORD    SAME AS QLINXV.
*D*
*D*  QLNCP         6         BYTE     NUMBER OF PAGES LOCKED VIA
*D*                                   THIS U:QLIST EXTENSION.
*D*
*D*  QLINXEXT      6         ADDR     POINTER TO THE NEXT U:QLIST
*D*                                   EXTENSION.
*D*
*D*
         PAGE
         DO       %X%]=0
         ADMODE   (IND)
         ERROR,*    '***SYSTEM DTQLIST***VERSION 00***'
QLLCP    BIT      3,1               PAGES LOCKED IN CORE THIS USER
*                                   1 MEANS YES
QLCHAIN  ADDR     0,1               CHAINING PTR TO NEXT QLIST
QLINXPEXT HWORD   1                 PAGE NUMBERS FOR QLIST EXTENSION
QLINXX   HWORD    2
QLINXXV  HWORD    3
QLECB    ADDR     1,1               VWA, USER'S ECB
QLIBLOCK ADDR     1,1               INDEX BLOCK #, CRITERION MATCH
*                                   FOR WAIT OPTION
QLTNCP   BYTE     4                 TOTAL # PAGES THIS LISTID
QLID     HWORD    4                 GET LIST ID
QLWAIT   BIT      3,2               USER PLACED IN WAIT STATE FLAG
*                                   1 MEANS YES
QLGETLIST ADDR    3,1               REAL ADDRESS, GET LIST
QLINX    HWORD    8                 LOCKED CORE PAGE NUMBER
QLINXV   HWORD    9                 VIRTUAL CORRESPONDENCE
QLNCP    BYTE     24                NUMBER OF PAGES LOCKED IN CORE
QLINXEXT ADDR     6,1               PTR TO ADDITIONAL QLINXES
QLINDEX  HWORD    14                GET LIST INDEX
QLGETLISTSZ HWORD 15                SIZE OF THE GET LIST
QLUSR    BYTE     32                USER NUMBER
QLINX1SZ EQU      2                 #PAGE NOS. CAN BE CONTAINED IN
*                                   INITIAL QLIST FOR A LIST
QLINX2SZ EQU      5                 #PAGE NOS. CAN BE CONTAINED IN
*                                   QLIST EXTENSION TABLES
QLISTLGTH EQU     9                 TABLE LENGTH
         FIN
         PAGE
*DO*
*D*
**************************************************
*                                                *
*                      TQUES                     *
*            USER QUEUE FOR QUEUE USAGE          *
*                 TABLE DEFINITION               *
*                                                *
**************************************************
*FIN*
*D*
*D*
*D*      WORD                       DEFINITION
*D*
*D*                0         8 9      15 16        24        31
*D*               ---------------------------------------------
*D*       0       |          |          QUESCHAIN             |
*D*               ---------------------------------------------
*D*       1       | QUESUSR  |  |     | |                     |
*D*               ---------------------------------------------
*D*                            |       |
*D*          QUESTYP (2 BITS)--        |
*D*                                    |
*D*          QUESWAIT------------------
*D*
*D*               ---------------------------------------------
*D*       2       |               QUESECB                     |
*D*               ---------------------------------------------
*D*
*D*
         PAGE
*D******************************************************************
*D*      DESCRIPTION OF TQUES TABLE ITEMS
*D******************************************************************
*D*
*D*  ITEM NAME    WORD      TYPE    DESCRIPTION
*D*
*D*  QUESCHAIN     0         ADDR     CHAINING WORD TO THE NEXT
*D*                                   U:QUES TABLE.
*D*
*D*  QUESECB       2         WORD     ADDRESS OF THE ECB IN THE USER'S
*D*                                   AREA WHICH WILL BE POSTED WHEN
*D*                                   THE ITEM BEING SOUGHT BECOMES
*D*                                   AVAILABLE.
*D*
*D*  QUESTYP       1         BITS     THE TYPE OF RESOURCE REQUIRED.
*D*
*D*                                          0=QUEUE AVAILABILITY
*D*                                          1=CORE SPACE
*D*                                          2=DISK SPACE
*D*                                          3=QUEUE UNLOCK
*D*                                          4=QUEUE PUT
*D*
*D*  QUESUSR       1         BYTE     USER NUMBER.
*D*
*D*  QUESWAIT      1         BIT      FLAG INDICATING THAT THE USER
*D*                                   HAS BEEN PUT IN THE WAIT
*D*                                   STATE UNTIL THE RESOURCE BE-
*D*                                   COMES AVAILABLE.
*D*
*D*
*D*
         PAGE
         DO       %X%]=0
         ADMODE   (IND)
         ERROR,*    '***SYSTEM DTQUES***VERSION 00***'
QUESCHAIN ADDR    0,1               CHAINING WORD TO NEXT QUES TABLE
QUESUSR  BYTE     4                 USER NUMBER
QUESTYP  FIELD    1,(9,2)           TYPE OF QUEUE RESOURCE NEEDED:
*                                   00 = QUEUE ACCESS
*                                   01 = CORE SPACE
*                                   10 = DISK SPACE
*                                   11 = QUEUE UNLOCK
QUESWAIT BIT      1,15              USER PLACED IN WAIT FLAG
QUESSIZE HWORD    3                 #CORE WORDS OR DISK DOUBLEWORDS
*                                   NEEDED
QUESECB  ADDR     2,1               ECB VWA FOR RESOURCE AVAILABLE
QUESLGTH EQU      3                 TABLE LENGTH
         PAGE
*****************************************************
*                                                   *
*                   D T Q C P V                     *
*                                                   *
*             CPV TABLES USED BY TP QUEUE           *
*                     MANAGER                       *
*                                                   *
*****************************************************
         ADMODE   (IND)
         ERROR,*   '***SYSTEM DTQCPV***VERSION 00'
*        DCB TABLE REFERENCES
DCB#FCD  BIT      0,10              FILE CLOSED INDICATOR, 0 YES
DCB#ASN  FIELD    0,(31,4)          FILE ASSIGNMENT TYPE
DCB#BUF1 FIELD    9,(31,17)         BLOCKING BUFFER ADDRESS
DCB#PRIV BIT      0,20              PRIVATE FILE INDICATOR, 1 YES
DCB#FILE EQU      1                 DCB ASN FOR FILE
DCB#CFUA ADDR     1,1               CFU ADDRESS
DCB#EXTRND BIT    5,4               RSTORE EXTENSION INDICATOR
DCB#NLR  BYTE     21                RSTORE EXTENSION
DCB#CDA  ADDR     8,1               FIRST BLOCK # FOR OPEN
DCB#RSTORE HWORD  41                # GRANULES ALLOCATED TO THE FILE
         PAGE
********************************************************************
*MISCELLANEOUS PARAMETERS
AVR#DCTX EQU      5                 BYTE POSITION OF DCT INDEX INAVR
         PAGE
*********************************************************************
*
*                       D T C F U
*
*     TABLE DEFINITIONS FOR USER FILE AND COMMON JOURNAL
*                  CURRENT FILE USAGE
*
*********************************************************************
         ADMODE   (IND)
         ERROR,*     'SYSTEM DTCFU***VERSION 00**'
CFU#B    BIT      0,0               BUSY FLAG (1=YES)
CFU#A    BIT      0,1               ACTIVE FLAG (1=YES)
CFU#O    BIT      0,2               LEVEL 1 FLAG (1=YES)
CFU#U    BIT      0,3               CLOSE RELEASE FLAG (1=YES)
CFU#W    BIT      0,6               FILE MOD FLAG (1=YES)
CFU#R    BIT      0,7               FILE HAS BEEN READ (1=YES)
CFU#NOU  FIELD    0,(14,7)          #DCBS ASSIGNED TO THE FILE
CFU#FUN  BYTE     2                 FUNCTION CODE
*                                   0  NULL
*                                   1  IN
*                                   2  OUT
*                                   4  INOUT
*                                   8  OUTIN
*                                   16 COMMON JOURNAL
CFU#FDA  WORD     1                 FILE DISK ADDRESS
CFU#CDAM WORD     5                 NO. OF GRANULES IN FILE
CFU#DCTX BYTE     5                 DCTX FROM CFU#FDA
CFU#CJ   EQU      16                CFU#FUN VALUE FOR COMMON JOURNAL
CFU#SIZE EQU      8                 LENGTH OF CFU BLOCK
CFU#TDA0 BYTE     20                BYTE 0 OF TDA;>0 WHEN JRNL DISABLED
CFU#TDA1 BYTE     21                BYTE 1 OF TDA
CFU#VNO  BYTE     5                 REL VOL # OF PRIMARY ACCT VOL
CFU#PRIV BIT      0,15              FILE IS ON PRIV. VOL WHEN=1
CFU#SREC WORD     6                 BLOCK COUNT OF ANS FORMAT JOURNAL
         PAGE
**********************************************************************
*                         D T P J O U R N A L                          *
*                                                                      *
*                          SYSTEM DTPJOURNAL                           *
*       TRANSACTION PROCESSING JOURNAL RECORD FIELD DESCRIPTIONS       *
*                                                                      *
************************************************************************
              ERROR,*        '*** SYSTEM DTPJOURNAL ** VERSION 00 ***'
              ADMODE         (IND)
***
JFLAGS        BYTE           0                   TRAN OR REPT STATUS
JTYPE         BYTE           1                   RECORD TYPE
JLEN          HWORD          1                   RECORD LEN IN BYTES
JCODE         BYTE           7                   COMPLETION CODE
JSEQ          ZONE           1,(1,3)             SEQUENCE OF EDMS PAGES
JORGTRAN      WORD           1                   ID OF ORIGINATING TRAN
JDATE         WORD           2                   DATE OF RECORD
JTIME         WORD           3                   TIME OF RECORD
JTRANID       WORD           4                   ID OF TRANSACTION
JAREA         BYTE           21                  EDMS AREA OF SYNCHRNZTN
JSYSID        HWORD          11                  CURRENT USER OF EDMS AR
JANAME        WORD           6                   EDMS AREA NAME
JAMODE        BYTE           7                   EDMS OPEN/CLS AREA MODE
JDBACCT       DWORD          7                   ACCT NO OF DATABASE
JPGSTRT       WORD           6                   STRT OF EDMS PAGE IMAGE
JTEXTLEN      HWORD          10                  LENGTH TRAN/REPT TEXT
JNAMELEN      BYTE           23                  LENGTH TRAN/REPT NAME
JTRANAME      WORD           6                   START OF TRAN NAME
JTRANTEXT     WORD           14                  START OF TRAN TEXT
JREPTNAME     WORD           6                   START OF REPORT NAME
JREPTEXT      WORD           14                  START OF REPORT TEXT
JTPMEXU       WORD           14                  TPM EXECUTION TIME
JELAPSED      WORD           15                  TRAN ELAPSED TIME
JCRASHCODE    WORD           1                   CRASH OR END CODE
JQSECTOR      WORD           1                   SECTOR NO. OF Q BLOCK
JQBLOCK       WORD           4                   START OF Q BLOCK
         PAGE
*        FORMAT OF MPOOL FOR QUEUE WORKING STORAGE
QPOOLIBLK WORD    0                 INDEX BLOCK NUMBER
QPOOLDBLK WORD    1                 DATA BLOCK NUMBER
QPOOLIMAP WORD    2                 HW MAP INDEX FOR INDEX BLOCK
QPOOLDMAP WORD    3                 HW MAP INDEX FOR DATA BLOCK
*                                   OR TEXT ENTRY DISPLACEMENT
QPOOLI   WORD     4                 ADDRESS OF THE INDEX BLOCK
QPOOLD   WORD     5                 ADDRESS OF THE DATA BLOCK
QPOOLNIDD WORD    6                 NID DISPLACEMENT
QPOOLNIDC WORD    7                 NID COUNT
QPOOLMD  WORD     8                 ALLOCATIN MAP, DATA BLOCK
QPOOLMI  WORD     9                 ALLOCATION MAP, INDEX BLOCK
QPOOLPUTDW WORD   10                # DWS IN TEXT
QPOOLENT WORD     11                ENTRY #, INDEX BLOCK DISPLACEMENT
QPOOLLST WORD     12                ADDRESS OF THE PUT MESSAGE
QPOOLLTCNT WORD   13                # CHARACTERS IN TEXT BODY
QPOOLLCNT WORD    14                NAME LENGTH
QPOOLIMAGEI WORD  15                KEY IMAGE AREA
QPOOLHTXT WORD    15
QPOOLTTXT WORD    16
QPOOLCOUNT WORD   17                #ENTRIES QUEUED FOR KEY
QPOOLNAME WORD    18
*
QPOOLIMAGED WORD  23                DATA CONTROL WORDS IMAGE AREA
QPOOLBLINKT WORD  33
QPOOLFLINKT WORD  32                FLINK IN TEXT BLOCK FOR DELETE
QPOOLBLINKI WORD 33
QPOOLFLINKI WORD 31
QPOOLBDISP WORD   31
         PAGE
********************************************************************
*
*                 D T P J I T
*
*                 SYSTEM DTPJIT DEFINES CURRENT VALUES
*        USED IN THE JIT FOR TP, BUT DOES NOT REF THE JIT
*        ITEMS.  THIS MUST BE DONE IN THE USER PROGRAM
*
********************************************************************
*
         DO1      TCOR(J:ASSIGN,S:UND)
J:ASSIGN EQU      X'8C14'
*
         ADMODE   (DIR,J:ASSIGN)
*
TP       BIT      0,9
         FIN
         CLOSE    %X%
         END

