Previous Topic: Example JCLNext Topic: When to Use PREINIT index area


PREINIT (Pre-Format Index and Data Areas)

The PREINIT function pre-formats (pre-initializes) a planned non-existing index area or data area. See PREINIT index area and PREINIT data area.

PREINIT promotes 24X7 operations. When you use PREINIT to pre-format a new index area, to contain a key to be cataloged in the 24x7 way using a CA Datacom Datadictionary 1000 APPLYCXX batch transaction, the database can be left open for all normal user applications while the key is built. Without PREINIT, cataloging a key into an index area requires that the area already exists and is in use by another key. Also, use PREINIT to pre-format a new data area to contain a table to be added using SQL DDL statements to CREATE a new table. If you do a PREINIT of an area that is later decided to have been done in error or is no longer needed, you can clean up the PREINIT list. To delete an entry on the PREINIT list, use the following:

CXXMAINT OPTION=DPREINIT,DBID=n,AREA=aaa

The PREINIT list is reported using the DBUTLTY function REPORT with AREA=CXX,TYPE=P. It reports on all items in the PREINIT list. If the list is empty, it has nothing to report. The first page of the full CXX report (not type A) and the same report requested as TYPE=K provides PREINIT AREAS – NO (or YES) to alert users whether any PREINIT areas exist.

PREINIT index area updates with control information the first block in the pre-formatted index area. The first block is subsequently updated when maintenance is performed. The default block size is 4096 for all devices, except for 3380 devices that have a block size of 3860. The block size can be set using the optional keyword BLKSIZE=.

You can also use PREINIT to pre-format and null load a data area that does not already exist. PREINIT data area makes it possible for SQL to be used to create a table in a new area and, optionally, to create a table in a new database. The table is then immediately loaded and available, and the SQL create process can successfully complete.

Note: Without PREINIT, SQL can only create a table if that table is created as loaded into an area that already has another table in it, and for which the area has already been loaded.

Summary of Requirements

During a CA Datacom Datadictionary catalog, the following special actions occur:

On the first normal open of a data set that was built using PREINIT, the information that would normally be in a control block is added. An edit ensures that the data set that was opened has been subjected to a PREINIT and has never been used since initialization.

The PREINIT list is intended to be short-lived. It is not part of a CXX backup function and is therefore not available as the subject of a CXX load.