Version 7.4.4
 —  User Exits and Hyperexits  —

User Exit 1 (General Processing)

This user exit is given control by Adabas immediately after a command is received by the Adabas nucleus. The command itself has yet to be processed except for the determination of the type of command (simple access, complex access, update).

One of the most common applications of this user exit is to insert a security password and/or a cipher code into the Adabas control block.

The call to the user exit is made using a standard BALR 14,15 assembler instruction. Register 1 contains the address of a parameter list. All registers must be saved when control is received and restored immediately prior to returning control to Adabas.

Notes:

  1. All user exits must return the same program status word (PSW) fields to the calling program that were active when the user exit was called. This applies in particular to the addressing mode (AMODE), program mask, problem state flag, PSW key, and address space control setting. The condition code need not be preserved. If any of these PSW fields is changed by the user exit, one way to ensure that their previous values are returned is to envelope the code where the change is in effect with a pair of the BAKR ... PR instructions.
  2. The file number specified in the Adabas control block cannot be changed. If it is necessary to change a file number with the user exit, change the field CQEFNR in the command queue element (CQE), offset X'A6' (see the figure in Input and Output Parameters and the example in Command Queue Header DSECT).
  3. The command code field in the Adabas control block cannot be changed; a response code is returned if you attempt to do so.
  4. The length of an Adabas buffer in the Adabas control block cannot be changed.

If a buffer is not supplied by the caller, the associated address field in the IUB address list is set to zero. Depending on the command type, if a buffer is not needed the corresponding address is disregarded. Do not change important buffer addresses.

This document covers the following topics:


Input and Output Parameters

graphics/user_exit_parms.png

General Processing User Exit (1) Parameters

* Indicator: Before calling user exit 1, the fullword indicator area are set to zero. As output from the user exit 1 call, 00 in the first Indicator byte means that the command can be executed; a non-zero value in the first byte means that the command should not be executed, and returns response code 22.

Top of page

Command Queue (CQ) Layout

graphics/command_queue.png

User Exit 1 Command Queue

Top of page

Command Queue Header DSECT

000000      CQH      DSECT               COMMAND QUEUE HEADER
000000      CQHAIDTE DS    A                  ADDR(IDTE) (SET BY 0-CALL)
            * THE FOLLOWING 2 LABELS MUST REMAIN CONTIGUOUS IN THE SAME ORDER
000004      CQHPID   DS    H                  PHYSICAL ID (SET BY SERVICE)
000006      CQHFLAG  DS    X                  FLAGS
            CQHFTRAN EQU   X'80'                TRANSLATOR (SET BY SERVICE)
            CQHFCOMM EQU   X'40'                COMMUNICATOR (SET BY SERVICE)
            CQHFNDBT EQU   X'20'                NOT DATABASE TARGET (SET BY
            *                                     SERVICE)
            CQHFISO  EQU   X'10'                ISOLATED ID (SET BY SERVICE)
            CQHFABR  EQU   X'08'                ATTACHED BUFFERS REQUIRED (SET
            *                                     BY SERVICE)
            CQHFORCE EQU   X'04'                FORCE NEW IDTE (SET BY MPM)
            CQHFANCH EQU   X'02'                ANCHOR SERVICE (SET BY SERVICE)
000007      CQHFLAG1 DS    X                  FLAGS
            CQH1NMC  EQU   X'80'                NO MORE COMMANDS (SET BY     
            *                                     SERVICE)
            CQH1UPG  EQU   X'40'                USER PROBABLY GONE (SET BY
            *                                     8/12/20-CALLS)
            * 8/12-CALL PARMS (THE FOLLOWING 5 LABELS MUST REMAIN CONTIGUOUS IN
            * THE SAME ORDER)
000008      CQHPARMS DS    0A                 PARMS (SET BY MPM)
000008      CQHPARM1 DS    0A                 PARM 1
000008      CQHAIUB  DS    A                  ADDR(CURRENT IUB)
00000C      CQHPARM2 DS    0A                 PARM 2
00000C      CQHACQE  DS    A                  ADDR(CURRENT CQE)
            * MPM PARMS
000010      CQHNCQES DS    F                  NUM(CQES) (SET BY MPM)
000014      CQHIUBL  DS    F                  MAX LEN(IUB) (SET BY MPM)
            * SERVICE POST PARMS (THE FOLLOWING 4 LABELS MUST REMAIN CONTIGUOUS
            * IN THE SAME ORDER)
000018      CQHAECB  DS    A                  ADDR(SERVICE ECB) (SET BY
            *                                   SERVICE)
00001C      CQHTSN   DS    0F                 ADDR(SERVICE TSN) (BS2000) (SET
            *                                   BY 0-CALL)
00001C      CQHTID   DS    0F                 SERVICE TID (DOS) (SET BY 0-CALL)
00001C      CQHAASCB DS    A                  ADDR(SERVICE ASCB) (MVS) (SET BY
            *                                   0-CALL)
            * ATTACHED BUFFERS
000020      CQHAABST DS    A                  ADDR(ATTACHED BUFFER SEGMENT
            *                                   TABLE (SET BY MPM)
000024      CQHLABST DS    F                  LEN(ATTACHED BUFFER SEGMENT
            *                                   TABLE (SET BY MPM)
000028      CQHAABA  DS    A                  ADDR(ATTACHED BUFFER AREA) (SET
            *                                   BY MPM)
00002C      CQHLABP  DS    F                  LEN(ATTACHED BUFFER PREFIX) (SET
            *                                   BY SERVICE)
000030      CQHABHWM DS    F                  ATTACHED BUFFER SEGMENT TABLE
            *                                   HIGH WATER MARK 
            CQHABSTS EQU   4                  ATTACHED BUFFER SEGMENT TABLE 
            *                                   SHIFT
            CQHABAS  EQU   8                  ATTACHED BUFFER AREA SHIFT
            CQHLABS  EQU   256                LEN(ATTACHED BUFFER SEGMENT)
            CQHABSEG EQU   X'EE'              ATTACHED BUFFER SEGMENT TABLE 
            *                                   SEGMENT ALLOCATED BYTE(MUST 
            *                                   BE <0)
            CQHABBAR EQU   X'77'              ATTACHED BUFFER SEGMENT TABLE 
              *                                   BARRIER (MUST BE >=0) 
000034      CQHAECQ  DS    A                  ADDR(END OF CQ) (SET BY MPM)
            * SYSTEM DEPENDENT OVERLAY AREA
000038      CQHOVLAY DS    XL105
            * DOS
0000A1               ORG   CQHOVLAY
000038      CQHACOMR DS    A                  ADDR(SERVICE COMREG) (SET BY 
            *                                   0-CALL)
            * VS1
00003C               ORG   CQHOVLAY
000038       CQHAJTCB DS    A                  ADDR(SERVICE JOB STEP TCB) (SET
             *                                   BY 0-CALL)
             * MVS
00003C                ORG   CQHOVLAY
             * THE FOLLOWING 3 LABELS MUST REMAIN CONTIGUOUS IN THE SAME ORDER
000038       CQHLXL   DS    0F                 LX LIST
000038       CQHLXLN  DS    F'1'                 NUM(LXS)
00003C       CQHLXLLX DS    F                    LX VALUE
000040       CQHET    DS    XL44               ENTRY TABLE (LENGTH MUST BE AT 
             *                                   LEAST ETDLEN+2*ETDELEN)
00006C       CQHTSECB DS    F                  TRANSWAP ECB
000070       CQHSAVE2 DS    F                  R2 SAVE AREA
             * THE FOLLOWING 2 LABELS MUST REMAIN CONTIGUOUS IN THE SAME ORDER
000074       CQHSAVEC DS    F                  RC SAVE AREA
000078       CQHSAVED DS    F                  RD SAVE AREA
00007C       CQHLXRES DS    2F                 LXRES PARM LIST
000084       CQHETCON DS    3F                 ETCON PARM LIST
             * THE FOLLOWING 2 LABELS MUST REMAIN CONTIGUOUS IN THE SAME ORDER
000090       CQHCPUID DS    CL8                CPU ID (SET BY 0-CALL)
000098       CQHVMID  DS    CL8                VM ID (SET BY 0-CALL)
0000A0       CQHKEY   DS    X                  SERVICE PSW-KEY (SET BY 0-CALL)
             *
0000A1                ORG
0000A1                DS    XL19               RESERVED
             *
0000B4       CQHANCHR DS    F                  ANCHOR (CQHFANCH SET) (SET BY
             *                                   SERVICE)
             *
             * THE FOLLOWING 2 WORDS MUST BE THE LAST 2 WORDS IN THE CQH AND
             * REMAIN CONTIGUOUS IN THE SAME ORDER
0000B8       CQHWI    DS    F                  SERVICE WAIT INDICATOR
0000BC       CQHSEQNR DS    F                  COMMAND SEQUENCE NUMBER (SET BY
             *                                   4-CALL)
             CQHLEN   EQU   *-CQH              CQH LENGTH (MUST BE GE CQELEN)
             CQHCQE   EQU   *                  FIRST CQE

Top of page

Command Queue Element (CQE) DSECT

and Queue Element (CQE) DSECT

000000       CQE      DSECT
000000       CQECNTL  DS    X                  TS CONTROL BYTE
000001       CQEUBF   DS    X                  UB FLAGS (UBFLAG)
             *
000002       CQEBIN   DS    X                  BUFFERS IN  (UBBIN)
000003       CQEBOUT  DS    X                  BUFFERS OUT (UBBOUT)
000004       CQEID    DS    H                  ID (UBID)   (UBFPID SET IN 
             *                                              CQEUBF IF PHYSICAL)
             *
000006       CQEFLAG  DS    X                  G E N E R A L  PURPOSE FLAGS
             CQEFBUF  EQU   X'80'                USER BUFFERS IN SERVICE
             *                                     PARTITION, REGION, ADDR 
             *                                     SPACE (MUTUALLY EXCLUSIVE 
             *                                     WITH CQEFAB)
             CQEFETW  EQU   X'40'                ET COMMAND WAITING FOR 12-CALL
             CQEFW16  EQU   X'20'                WAITING FOR 16-CALL (MUTUALLY 
             *                                     EXCLUSIVE WITH CQEF16R)
             CQEF16R  EQU   X'10'                16-CALL REQUIRED (MUTUALLY
             *                                     EXCLUSIVE WITH CQEFW16)
             CQEFAB   EQU   X'08'                ATTACHED BUFFER (MUTUALLY
             *                                     EXCLUSIVE WITH CQEFBUF)
             CQEFABR  EQU   X'04'                ATTACHED BUFFER REQUIRED
             *                                     (MUTUALLY EXCLUSIVE WITH
             *                                     CQEFBUF)
             CQECML   EQU   X'02'                CML LOCK HELD (MVS)
             CQEHELD  EQU   CQEFLAG
             *
000007       CQESFLAG DS    X                  S E L E C T I O N  FLAGS
             CQSFPROC EQU   X'80'                IN PROCESS
             CQSFRDYS EQU   X'40'                READY TO BE SELECTED
             CQSFSUQD EQU   X'20'                SEARCH FOR UQE DONE
             CQSFUQEF EQU   X'10'                UQE FOUND
             CQSFA9   EQU   X'08'                NOT SELECTABLE DURING 
             *                                   BSS=X'80' STATUS
             * 
             CQSFETSY EQU   X'04'                NOT SELECTABLE DURING ET-SYNC
             CQSFWSPC EQU   X'02'                WAITING FOR SPACE
             CQSFWISN EQU   X'01'                WAITING FOR ISN IN HQ
             *
             *                                 P O S T
000008       CQEAECB  DS    A                  ADDR(USER ECB) (UBECB/UBAECB)
00000C       CQETID   DS    0F                 USER TID (VSE)
00000C       CQETSN   DS    0F                 USER TSN (BS2000)
00000C       CQEAASCB DS    A                  ADDR(USER ASCB) (MVS)
             *
             *                                 U S E R  I N T E R F A C E 
000010       CQEAAB   DS    A                  ADDR(ATTACHED BUFFER) (CQEFAB 
             *                                   SET)
000014       CQEAFABS DS    A                  ADDR(FIRST ATTACHED BUFFER
             *                                   SEGMENT TABLE BYTE) (CQEFAB
             *                                   SET)
000018       CQENABS  DS    F                  NUM(ATTACHED BUFFER SEGMENT
             *                                   TABLE BYTES) (CQEFAB SET)
00001C       CQEAUI   DS    A                  ADDR(USER INFO) (UBAUINFO IF 
             *                                   UBFINUB SET)
000020       CQEJNAME DS    CL8                USER JOB NAME (UBJNAME IF 
             *                                   UBFINUB SET)
000028       CQECKSUM DS    D                  CHECKSUM (TOD-CLOCK)
000030       CQESEQNR DS    F                  COMMAND SEQUENCE NUMBER        
             *                                   (CQHSEQNR)
000034       CQELSB   DS    F                  LEN(REQUIRED IUB) (UBLSB)
000038       CQEAUPL  DS    A                  ADDR(USER PARAMETER LIST) 
             *                                   (UBAUPL) 
00003C       CQEAUB   DS    A                  ADDR(UB)
             *                                 W O R K A R E A   FOR SVC AND PC
             *                                    ROUTINES (LENGTH MUST BE AT 
             *                                    LEAST MAX(UBLEN,64))
000040      CQEWORK  DS    XL64
000080               ORG   CQEWORK
000040      CQESAVE  DS    16F                SAVE AREA
000080               ORG   CQEWORK
000040      CQEUB    DS    XL64               UB (MVS)
000080               ORG   CQEWORK
000040      CQEAPL   DS    5A                 APL WITHOUT ADDR(ACB) (MVS)
000054               ORG
            *
            *                                 U S E R  I D  (COMMUNICATION)
000080      CQEUSID  DS    0XL28              USER ID (UBAUID IF UBFINUB SET)
000080      CQECPUID DS    D                  CPU ID (IDCPUID) (THE USER WILL 
            *                                   BE IDENTIFIED EXTERNALLY BY THE
            *                                   CONTENTS OF CQEJNAME IF THE
            *                                   LOW-ORDER BIT OF CQECPUID IS 0,
            *                                   AND BY THE CONTENTS OF CQEUID 
            *                                   IF THE BIT IS 1)
000088      CQEVMID  DS    CL8                VM ID (IDVMID)
000090      CQEOSID  DS    F                  OPSYS ID 
000094      CQEUID   DS    XL8                ID (UBUID/ACBADD2)
            *
00009C      CQERBIBL DS    0F                 ACTUAL RB/IB LENS
00009C      CQERBL   DS    H                  ACTUAL RB LEN
00009E      CQEIBL   DS    H                  ACTUAL IB LEN
0000A0      CQEPASID DS    H                  CALLER'S PASID (MVS)
0000A2      CQE16CTL DS    X                  16-CALL TS CONTROL BYTE (CQEW16 
            *                                   SET)
0000A3      CQEKEY   DS    X                  CALLER'S PSW-KEY
0000A4      CQEPRTY  DS    X                  PRIORITY OF USER (UBPRTY IF 
            *                                   UBFINUB SET)
0000A5      CQECMDT  DS    X                  COMMAND TYPE (UBCMDT)
            *        EQU   X'20'                RESERVED
            *        EQU   X'10'                RESERVED
            CQETET   EQU   X'08'                ET COMMAND
            CQETUC   EQU   X'04'                UPDATE COMMAND
            CQETCC   EQU   X'02'                COMPLEX COMMAND
            CQETSC   EQU   X'01'                SIMPLE COMMAND
0000A6      CQEFNR   DS    H                  FILNR (ACBFNR)
            *
            * TARGET AND SYSTEM DEPENDENT OVERLAY AREA, WHICH CAN BE USED AS
            * FOLLOWS:
            *   - BY THE ROUTER 04-CALL PRIOR TO SETTING 'CQSFRDYS' IN
            *     'CQESFLAG';
            *   - BY THE TARGET FROM THE TIME 'CQSFRDYS' IS SET UNTIL EITHER A
            *     ROUTER 12-CALL FOR WHICH NO 16-CALL IS REQUIRED ('CQEF16R' IN
            *     'CQEFLAG' IS NOT SET) OR UNTIL THE ROUTER 16-CALL OR COMMAND
            *     TIMEOUT OCCURS ('CQE16CTL' CONTAINS X'FF' INSTEAD OF X'00');
            *   - BY THE ROUTER 16-CALL FROM THE TIME IS ACQUIRES THE CQE
            *     (SUCCESSFULLY SETS 'CQE16CTL' TO X'FF') UNTIL IT FREES THE 
            *     CQE (SETS 'CQECNTL' TO X'00').
0000A8      CQEOVLAY DS    XL20
            *
0000BC      ORG   CQEOVLAY           M V S
            * THE FOLLOWING 2 LABELS MUST REMAIN CONTIGUOUS IN THE SAME ORDER
0000A8      CQESAVED DS    A                  RD SAVE AREA
0000AC      CQESAVEE DS    A                  RE SAVE AREA
            * THE FOLLOWING 3 LABELS MUST REMAIN CONTIGUOUS IN THE SAME ORDER
0000B0      CQESAVE3 DS    0F                 R3 SAVE AREA
            *
0000B0      CQEARB   DS    A                  ADDR(RB)
0000B4      CQEAIB   DS    A                  ADDR(IB)
0000B8               ORG   CQEOVLAY           N U C L E U S
0000A8      CQEAUQE  DS    A                  ADDR(UQE)
0000AC      CQEACA   DS    A                  ADDR(WORK-AREA) FOR CONTINUATION
0000B0      CQERQST  DS    F                  REQUESTED RESOURCE (SPACE/FNR/
            *                                   ISN) 
0000B4      CQETHROB DS    F                  TIME OF LAST THROWBACK
0000B8      CQECTHR  DS    0F                 CMD COUNT OF LAST THROWBACK
0000B8      CQEAIUB  DS    0A                 ADDR(IUB)
0000B8      CQET12C  DS    F                  TIME OF MPM 12-CALL
0000BC               ORG
0000BC      CQECMD   DS    XL2                COMMAND
            *
0000BE      CQEX     DS    H                  CQE INDEX
            CQELEN   EQU   *-CQE              CQE LENGTH
            *
            *
            AQUQE    EQU   CQEAUQE-CQE

Top of page