

The CATALOGEXTRACT statement is used to generate a LOAD command file that allows the database catalog to be restored. The statements of this file can be executed on any computer by using the corresponding CATALOGLOAD statement. If code conversion is required, it can be achieved with the file options ASCII or EBCDIC.
With CATALOGEXTRACT TABLE, a user can generate a command file containing catalog information about a base table for which the user has the OWNER privilege.
With CATALOGEXTRACT USER, a user can generate a command file containing the definitions of all his private objects.
With CATALOGEXTRACT ALL, a SYSDBA can generate a command file that defines the complete database catalog.
With CATALOGLOAD TABLE or CATALOGLOAD USER, a user can generate his private partial catalog. Only a user with SYSDBA status can define the complete catalog with CATALOGLOAD ALL.
As not only SQL statements but also the contents of system tables are needed to reload the procedural database objects trigger, DB procedure, and DB function, these are only exported by CATALOGEXTRACT if the statement is a part of DBEXTRACT.
The CATALOGEXTRACT and CATALOGLOAD statements can be part of a command file and may be executed as a batch job.

