Is it possible to include the table column names in the unload dataset when executing CA Fast Unload?

book

Article ID: 35852

calendar_today

Updated On:

Products

CA Database Analyzer for DB2 for z/OS CA Fast Unload for DB2 for z/OS CA Fast Check for DB2 for z/OS CA Fast Index for DB2 for z/OS CA Fast Load for DB2 for z/OS CA Rapid Reorg for DB2 for z/OS

Issue/Introduction

Question:

Is it possible to include the DB2 table column names within the same unload dataset as the unloaded data when executing CA Fast Unload for DB2 for z/OS (PFU)?

 

Answer:

PFU does not have a automated method to write the table column names to the unload / SYSREC dataset.  Recommend the following method in PFU to complete this request:

The first SELECT are the column name literals and table creator.DUMMY is a stub table with 1 column and 1 row to facilitate unloading of the column name literals. Table creator.TABLE1 is the actual table to be unloaded.

//SYSREC DD DSN=
.
.
//SYSIN DD *
FASTUNLOAD
LOAD-CONTROL NONE
OUTPUT-FORMAT COMMA-DELIMITED
SQL-ACCESS NONE
AUTO-TAG-SIZE 0
OBJ-ORDER NONE
ONE-SYSREC
INPUT-FORMAT TABLE
SHRLEVEL REFERENCE
SELECT 'COLA', 'COLB' FROM creator.DUMMY;
SELECT * FROM creator.TABLE1;

Environment

Release:
Component: PFU