For an example CXX PREINIT Report, see Type P - PREINIT Report.
Example 1
Use the PREINIT function if you want to add a new key to a new index area (identified as index area I10 in this example) to an open and loaded database in a 24x7 environment.
The catalog of a new key requires an index area that is initialized and loaded. To meet the 24x7 requirements, you can use the PREINIT function to create a new index area data set and initialize it before there is a need to add the new key to a new index area.
Specify the keywords DBID=, AREA=IXX, and IXXAREA=. Optional for the PREINIT for an index are OLDEP=, BLKSIZE=, and VOLUMES=. The optional keywords work the same with PRENIT as with INIT.
DBUTLTY opens the data set out of all normal context (such as not opening the database). The area is initialized with the provided values. The data set name is saved in the CXX in the PREINIT list.
After completion of the PREINIT, the key catalog can be done. When a key catalog discovers that the index area to be used contains no other key and therefore does not exist, the PREINIT list is searched to discover the initialized area. The key catalog locks in the data set name to the new index and deletes the PREINIT list item. When the index is opened during the addition of the key, the current data set is validated. If the data set is not found or the wrong database or area is found, it is rejected and the key catalog is aborted. The failed addition of the key needs to be deleted and the process attempted from scratch. A database being opened must find that all index areas are properly defined and initialized. If the PREINIT process is not followed correctly, the database is not opened until the new key to be added is deleted from CA Datacom Datadictionary and the database is cataloged. Otherwise, a new index area must be properly subjected to an INIT function.
The PREINIT list is only accessed during a catalog and an SQL CREATE for an area that is not known to the current database.
If requirements are met, the key can be added in a 24x7 environment in parallel with the database being opened for user processing.
Example 2
You can use the PREINIT function in concert with SQL DDL statements to add a new database and a new table and have the new database and table be instantly loaded and available. You can also add a new table into a new area in an existing database.
In this example, use PREINIT with the required keywords DBID=, AREA=IXX, and IXXAREA=IXX. Other optional keywords available when AREA=IXX is used are OLDEP=, BLKSIZE=, and VOLUMES=. Next use PREINIT to initialize each data area in the database. For a data area, the required keywords are DBID=, AREA=, and BLKSIZE=. Other optional keywords available are VOLUMES=.
The standard DDNAME is used during a PREINIT, but the database is not opened and if the area exists and has a data set name, it is not known. The DD statement is therefore required.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|