gtpd1m1i | Database Reference |
Database reorganization (DBR) consists of 3 phases:
Before starting DBR, you must initialize the control and exception records that are used by DBR. The following commands are used in the initialization phase:
You can also use the ZDBRO OECB or ZDBSO OECB command to modify the number of available ECBs to fit your installation requirements. The default number of available ECBs for the output phase is 4. Be careful when raising the available ECB count because each ECB causes as many as 20 frames to be used. Checks have been inserted in the system to prevent users from running out of frames during the running of DBR. However, additional activity on the system and the running of DBR on multiple subsystems simultaneously can cause working storage to be used up rapidly.
You must enter the ZDBRO INIT or ZDBSO INIT command before any other DBR command.
The INIT function formats the predefined record type (#DBRRI) to reflect all the fixed file and pool records to be captured into the necessary control and exception records that are needed by DBR.
ZDBSO INIT SSU3/SSU4/SSU5
ZDBRO INIT SSU1/B/2
Once the records are initialized, you can modify the control records as necessary to process the database as determined by your installation.
Use the BYPASS function to set a certain record type or group of records in a record type so they are not captured. For example:
ZDBRO BYPASS RECtype-0009
or
ZDBSO BYPASS RECtype-0009
The BYPASS option sets the control bits that are ignored or preserved by the BYPASS parameter of the INIT command. When BYPASS=YES on the INIT function, the capture bits that are set with the BYPASS function are ignored.
A practical instance of the BYPASS function involves the PROT table. The output tape device used by DBR is identified in the PROT table. This table is captured by the DBR output phase and restored by the DBR input phase. When the restored system comes online, the previous PROT table takes effect and may not agree with the tape status of the current system unless the same tape device was specified for both phases of DBR. If you cannot avoid using different tape devices, you can bypass the capture of PROT during the output phase, or correct the contents of PROT after the system is restored if the BYPASS function was not used.
ZDBRO BYPASS RECtype-0009 RANGE-020.035
or
ZDBSO BYPASS RECtype-0009 RANGE-020.035
ZDBRO BYPASS DIR
or
ZDBSO BYPASS DIR
If a particular hexadecimal record type or group of records in a record type are set so that they will not be captured, but you determine that they should in fact be captured, use the RESET function to reset the capture bit in the master keypoint and the exception fields in the exception records.
For example:
ZDBRO RESET RECtype-0009
or
ZDBSO RESET RECtype-0009
ZDBRO RESET RECtype-0009 RANGE-020.035
or
ZDBSO RESET RECtype-0009 RANGE-020.035
ZDBRO RESET DIR
or
ZDBSO RESET DIR
ZDBRO RESET OVR
or
ZDBSO RESET OVR
Use the DISPLAY function to display the status of the DBR control and exception records to determine if the records that are set to be captured or bypassed are correct, or changes are necessary to update these records before starting the output phase.
For example:
ZDBRO DISPLAY ALL RECtype-value
or
ZDBSO DISPLAY ALL RECtype-value
where value is the record type code, which must be a 4-digit hexadecimal number. The record type that is specified by value is the first record type to be displayed. A maximum of 48 items can be displayed in each output message.
ZDBRO DISPLAY OVR
or
ZDBSO DISPLAY OVR
ZDBRO DISPLAY EXC
or
ZDBSO DISPLAY EXC
ZDBRO DISPLAY RECtype-value
or
ZDBSO DISPLAY RECtype-value
where value is the record type code, which must be a 4-digit hexadecimal number.
When the DBR control and exception records are initialized, you can start the DBR output phase.
Start the DBR output phase with the ZDBRO START or RESTART command or with the ZDBSO START or RESTART command. See TPF Operations for additional information about the format of all the DBR commands.
Before you start the DBR output phase, display the master keypoint and exception records to ensure the database will be captured correctly.
As each record type is captured during the output phase, a message is sent to the console. Check the record type to ensure that the correct record types are being captured.
At any time during the output phase, you can request status with the STATUS function. The record type, ordinal number, and number of available ECBs are displayed on the console. The STATUS function is not available during the input phase.
If the system needs to be IPLed for any reason while DBR is running, DBR forces the DBF/DBP tapes to be removed before DBR is started again.
For maximum efficiency, as many as 10 FINDC macros are issued before a WAITC macro is issued. If a find error occurs, a core block is zeroed and the record ID field is set to X'FFFF'. This is a dummy record containing all zeros, and is referenced in the online message as the ZZ record. If the record is necessary, you must correct the record and restart DBR, or correct the record after it is moved to the new database.
Unless the DBR control records are destroyed, the DBR output phase can be stopped and restarted at any time. The restart starts processing with ordinal number zero of the record type that was being captured when the process was stopped. The DBF/DBP tape that was mounted when the process was stopped should be saved and a new tape mounted when the restart is requested.
When capturing records, the records associated with TPF programs, loaders, and images are bypassed. Records that are bypassed include:
If you want to move these records from 1 TPF system to another you can do a full load or use the ZIMAG command to create or copy the image.
The tape utility writes the subsystem user ID to a tape label. This subsystem user ID is checked when the tape is mounted. Remember, DBR cannot be run on tapes that are mounted in blocked mode.
If you run DBR in a state other than 1052 state, record logging for the capture and restore utility must be started to record any changes that are made to records after DBR has captured them to tape. Logging must remain active until the system is cycled down to 1052 state. See Capture and Restore for additional information about the capture and restore utility.
If you must stop the DBR process during the output phase, use the ZDBRO ABORT or ZDBSO ABORT command. This command closes any open tapes and resets the DBR control bits. The DBR code periodically saves the last record type processed in the DBR working keypoint so that you can restart DBR at that record type after an unplanned shutdown of the system. You can use the RESTART function to restart DBR at the record type saved in the keypoint. Because the record types that were written to tape may not be in sequential order, additional record types after the specified record type also may have been written to tape. The DBR code ensures that all record types up to the specified record type were processed before it saves that record type in the keypoint. If an ABORT command was entered, a RESTART command restarts DBR at the last record type processed before the ABORT message was entered. DBR restarts with ordinal number 0 of the record type that was being processed when the system was lost. You can also use the RESTART function to restart DBR at any record type in order to avoid writing records to tape that may have already been written before an unplanned system shutdown.
The DBR input phase is started by the ZDBRI START or RESTART, or the ZDBSI START or RESTART command. See TPF Operations for more information about the format of all the DBR commands.
For maximum efficiency, as many as 10 FILNC macros are issued before a WAITC macro is issued.
The DBR input phase can be restarted at any specified record type. The tape is searched until the specified record type is found and processing continues from that point to end of file.
Once the fixed file and pool database are reloaded, you should process the logging tapes that were created during the output phase (if in other than 1052 state). When the logging tape restore has been completed, the database reorganization process is completed.