BMC AMI Unload OBID


Use this option to look for a different table OBID value when unloading from an image copy.


OBID.png

Use this option if you are unloading from an image copy that matches the table structure but has a different OBID, possibly because it is from a different Db2 subsystem or because the object was dropped and recreated.

Without this option, BMC AMI Unload assumes that the input data has the same OBID as the one defined in SYSIBM.SYSTABLES for the table named in the FROM clause. If this is not what you intend, use the OBID option to specify a different one. BMC AMI Unload does not validate the OBID value that you supply. You can specify the OBID as an integer or as a hexadecimal string and you must use parentheses.

Specifying an OBID value that does not match the copy data can have unpredictable results.

The following example uses this option:

//SYSIN DD *,SYMBOLS=EXECSYS                    
   UNLOAD                                       
       INFILE IMAGECOPY                         
   SHRLEVEL CHANGE                              
   DIRECT  YES                                  
   AUTOTAG YES                                  
   DELETEFILES NO                               
        SELECT * FROM Q430166D.Q30166T1 (OBID 0)

If the OBID specified in the OBID keyword is not found in the image copy, the following messages will be issued and the Unload will terminate.

NGTU711W NO INPUT SELECTED FROM INFILE:  IMAGECOPY.

NGTU712W UNLOAD INPUT HAS OBID(S):  3,4.     

Overriding the OBID value

BMC AMI Unload enables you to override the OBID value defined by IBM Db2 when qualifying rows for unloading.

By default, BMC AMI Unload uses the value that Db2 assigns. This makes it easier to recover data if a table is dropped and you need to unload from a copy of the table space. You can override the OBID specification that BMC AMI Unload retrieves from the Db2 catalog. This enables you, for example, to unload data from image copies or DSN1COPYs after a table has been dropped.

If you use an OBID value of 0, BMC AMI Unload ignores all OBIDs in the input records. Use the value of 0 for single-table table spaces only. Using a value of 0 with a multi-table table space might produce unpredictable results or result in an abend.

To override the Db2-defined OBID value

  1. Code the OBID keyword in the unload statement.

    Warning

    Important

    • If you are using the UNLOAD command, you specify OBID on the FROM TABLE clause.
    • For the UNLD command, you must supply the OBID value as an integer. For the UNLOAD command, you can supply the value either as an integer or in hexadecimal format.
    • BMC AMI Unload does not perform range validation of the supplied OBID.
  2. If you are using the UNLOAD command, specify the INFILE option.
  3. Ensure that the table name in the FROM TABLE clause in the unload statement exists. It need not contain rows, because BMC AMI Unload needs only the column specification for the table.
  4. Ensure that, for the table in the FROM TABLE clause, the columns that BMC AMI Unload unloads are compatible with the table in the input copy data set.
  5. If the table in the copy has an EDITPROC, ensure that the Db2-defined table is defined with that same EDITPROC.

 

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

BMC AMI Unload for Db2 13.1