Normally these GENERATED ALWAYS values would be regenerated upon load to the table. It may be required that existing GENERATED ALWAYS
values stored in a table column be preserved upon re-load to the table after the table is unloaded.
Release : 20.0
Component : CA Fast Unload for DB2 for z/OS, CA Fast Load for DB2 for Z/OS
The FASTUNLOAD Manual has this keyword: IGNOREGA
IGNOREGA—Override the GENERATED ALWAYS Setting
The IGNOREGA keyword specifies whether columns defined as GENERATED ALWAYS are treated as GENERATED BY DEFAULT. This parameter applies to row ID and identity columns.
This keyword has the following format:
Enforces the restraint if a column is defined as GENERATED ALWAYS. This setting is the default.
Overrides the restraint temporarily when a column is defined as GENERATED ALWAYS. The data is loaded from the input data set rather than being generated. Default values are still generated when necessary.
In addition, you would need to use IGNOREGA YES in the CA FAST LOAD parms when loading the data previously unloaded using the same parm .
Take note of this note:
IGNOREGA and NO-IGNOREGA are intended for use with FASTLOAD. If you specify IGNOREGA with DB2LOAD and you want IBM LOAD to preserve the column values, modify the ROWID and IDENTITY column definitions. For the proper procedure, see your IBM documentation.
Fast Unload Parms:
SELECT * FROM authid.TXAUDTTB;
FASTLOAD INDDN SYSULD
RESUME NO REPLACE ENFORCE NO
INTO TABLE authid.TXAUDTTB
This unloads the existing GENERATED ALWAYS AS IDENTITY column values and on the load it loads them back as they were. Also if you manually alter the identity value in the input file and use a RESUME YES, the manually created identity values are loaded as they were on the dataset.