Limited supportBMC provides limited support for this version of the product. As a result, BMC no longer accepts comments in this space. If you encounter problems with the product version or the space, contact BMC Support.BMC recommends upgrading to the latest version of the product. To see documentation for that version, see UNLOAD PLUS for DB2 13.1.

C exit parameter structure


This topic illustrates the C exit parameter structure.

The ADUEXITP structure is contained in a header file, aduxith0.h.


struct ADUEXITP
  {
/*********************************************************************/
/* ADUEXITP DEFINES THE UNLOAD USER EXIT PARM BLOCK                  */
/* YOU MAY NOT MODIFY THE FIELDS IN FRONT OF THE USER AREA           */
/* (ACTUALLY YOU MAY, BUT YOU WON'T LIKE WHAT HAPPENS)               */
/*********************************************************************/
  int xpfunc;             /* 0 = PROCESS, 1 = INIT, 2=TERMINATE      */
  void *xpsqldaA_;        /* A(SQLDA) FOR THIS TABLE                 */
  void *xptableA_;        /* A(TABLE NAME BEING UNLOADED)            */
/*    THE ABOVE POINTS TO 128 BYTE CREATOR, FOLLOWED BY 128 BYTE NAME*/
  char xpflags;           /* VARIOUS FLAGS                           */
#define XPFDEBUG 0x01     /* DEBUG IS ON                             */
  char _f0;               /*                                         */
  short xprefP_;          /* BLOCK REFERENCE #                       */
  void *xpssidA_;         /* A(SSID)                         4  BYTES*/
  void *xpuserA_;         /* A(USERID)                       8  BYTES*/
  void *xputidA_;         /* A(UTILITY ID)                   16 BYTES*/
  int _f1(|6|);           /*                                         */
/*                                                                   */
/*                  * USER AREA                                      */
/*                                                                   */
/*XPUSRMSG CONTAINS A SINGLE MESSAGE ENTRY.  ON RETURN FROM THE EXIT,*/
/*            IF THIS FIELD IS NON-BLANK, IT IS PRINTED THEN BLANKED.*/
/*                                                                   */
/* XPUSRMS@ POINTS TO A MESSAGE BUFFER THAT CAN CONTAIN MULTIPLE EXIT*/
/*                MESSAGES OF EQUAL LENGTH.  THESE MESSAGE(S) WILL BE*/
/*                            PRINTED AFTER XPUSRMSG (IF ANY).       */
/*                   FORMAT OF THE MESSAGE BUFFER AT THIS ADDRESS IS:*/
/*                                                                   */
/*               #MSGS   DS  H          NUMBER OF LINES, 0 = NO PRINT*/
/*               MSGSIZE DS  H          SIZE OF EACH LINE (MAX = 100)*/
/*                       MSGTEXT DS  CL(#MSGS*MSGSIZE)  USER MESSAGES*/
/*                                                                   */
  void *xpuserwA_;        /* USER WORK AREA ADDRESS                  */
  int xpuserf1;           /* USER FIELD                              */
  int xpuserf2;           /* USER FIELD                              */
  int xpuserf3;           /* USER FIELD                              */
  int xpuserf4;           /* USER FIELD                              */
  void *xpusermA_;        /* USER MESSAGE BUFFER ADDRESS             */
  int xpusermz;           /* USER MESSAGE BUFFER TOTAL SIZE          */
  CL100 xpusrmsg;         /* USER SINGLE MESSAGE AREA                */
/*                                                                   */
  XL2 xpresrv;            /* RESERVED                             V12*/
/*                                                                   */
  char xpusrpad(|842|);   /* PADDING                                 */
#define XPK 1024          /*                                         */
  };


#define XPFLAGS                         xpflags
#define XPFUNC                          xpfunc
#define XPREFP_                         xprefP_
#define XPRESRV                         xpresrv
#define XPSQLDAA_                       xpsqldaA_
#define XPSSIDA_                        xpssidA_
#define XPTABLEA_                       xptableA_
#define XPUSERA_                        xpuserA_
#define XPUSERF1                        xpuserf1
#define XPUSERF2                        xpuserf2
#define XPUSERF3                        xpuserf3
#define XPUSERF4                        xpuserf4
#define xpusermz                        xpusermz
#define XPUSERMA_                       xpusermA_
#define XPUSERWA_                       xpuserwA_
#define XPUSRMSG                        xpusrmsg
#define XPUSRPAD                        xpusrpad
#define XPUTIDA_                        xputidA_


/*
SYMBOL         OFFSET     SIZE     TYPE      C-TYPE       C-NAME
ADUEXITP       000000    000000
XPFLAGS        00000C    000001    X         char         xpflags
XPFUNC         000000    000004    F         int          xpfunc
XPREF#         00000E    000002    H         short        xprefP_
XPRESRV        0000B4    000002    XL2       XL2          xpresrv
XPSQLDA@       000004    000004    A         void *       xpsqldaA_
XPSSID@        000010    000004    A         void *       xpssidA_
XPTABLE@       000008    000004    A         void *       xptableA_
XPUSER@        000014    000004    A         void *       xpuserA_
XPUSERF1       000038    000004    F         int          xpuserf1
XPUSERF2       00003C    000004    F         int          xpuserf2
XPUSERF3       000040    000004    F         int          xpuserf3
XPUSERF4       000044    000004    F         int          xpuserf4
XPUSERMZ       00004C    000004    F         int          xpusermz
XPUSERM@       000048    000004    A         void *       xpusermA_
XPUSERW@       000034    000004    A         void *       xpuserwA_
XPUSRMSG       000050    000064    CL100     CL100        xpusrmsg
XPUSRPAD       0000B6    00034A    (1024-... char (|842|) xpusrpad
XPUTID@        000018    000004    A         void *       xputidA_
*/

The following table explains C user exit parameter structure elements and their uses:

Field

Description

*xpsqldaA_

Pointer to the pseudo-SQLDA for this table as shown in C-pseudo-SQLDA-structure

For each table unloaded, this record describes the column names, data types, and pointers to the column data within the output record being unloaded. This record is identical in format to a Db2 SQLDA, and is used in much the same way.

*xptableA_

Pointer to the name of the table being unloaded

This name field allows for a 128-byte creator name, followed by a 128-byte table name.

xprefP_

Exit reference number

Each table being unloaded gets its own copy of a user parameter block and an SQLDA. The XPREF# is incremented to provide a unique reference number.

*xpssidA_

Pointer to a 4-byte field containing the SSID value

*xpuserA_

Pointer to an 8-byte field containing the user ID of the user executing the UNLOAD PLUS utility

*xputidA_

Pointer to the 16-byte utility ID

CL100 xpusrmsg

A 100-byte message field to use when issuing a simple message

On return from any function call, if this field is nonblank, UNLOAD PLUS issues message 51635I identifying the exit name, exit reference number, and this message text. This field is blank after processing.

*xpusermA_

Pointer to a user-defined message buffer that can contain multiple messages of equal length

Any messages pointed to by this address are printed after the XPUSRMSG message.

xpuserm$

Size of the user message buffer pointed to by *xpusermA_

 

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*