This structure is used to return information after a call to sqluhgne - Get Next Recovery History File Entry.
Table 64. Fields in the SQLUHINFO Structure
Field Name | Data Type | Description |
---|---|---|
SQLUHINFOID | CHAR(8) | A structure identifier and "eye-catcher" for storage dumps. It is a string of eight bytes that must be initialized with the string "SQLUHINF". No symbolic definition for this string exists. |
SQLUHINFOBC | INTEGER | Size of this structure in bytes. Use the SQLUHINFOSIZE macro (defined in sqlutil) to set this field. |
SQLN | SMALLINT | Number of table space elements. |
SQLD | SMALLINT | Number of used table space elements. |
OPERATION | CHAR(1) | Type of operation performed: B for backup, R for restore, U for unload, and L for load. |
OBJECT | CHAR(1) | Granularity of the operation: D for full database, P for table space, and T for table. |
OBJECT_PART | CHAR(17) | The first 14 characters are a time stamp with format yyyymmddhhnnss, indicating when the operation was done. The next 3 characters are a sequence number. Each backup and unload operation can result in multiple entries in this file when the backup image or unload image is saved in multiple files or on multiple tapes. The sequence number allows multiple locations to be specified. Restore and load operations have only a single entry in this file, which corresponds to sequence number '001' of the corresponding backup or unload. The time stamp, combined with the sequence number, must be unique. |
OPTYPE | CHAR(1) | Operation type. Additional qualification of the operation. For a full database or table space level backup: F indicates an offline backup, and N indicates an online backup. For a load: R indicates replace, A indicates append, and C indicates copy. Any other operation will leave this field blank. |
DEVICE_TYPE | CHAR(1) | Device type. This field determines how the LOCATION field is interpreted: D indicates disk, K indicates diskette, T indicates tape, A indicates ADSM, U indicates user exit, and O indicates other (for other vendor device support). |
FIRST_LOG | CHAR(12) | The earliest log file ID (ranging from S0000000 to S9999999):
|
LAST_LOG | CHAR(12) | The latest log file ID (ranging from S0000000 to S9999999):
|
BACKUP_ID | CHAR(14) | A time stamp with format yyyymmddhhnnss that references one or more file lines (depending on sequence number) representing backup operations. For a full database restore, this references the full database backup that was restored. For a table space restore, this references the table space backup, or full database backup used to restore the specified table spaces. This field is otherwise left blank. |
TABLE_CREATOR | CHAR(8) | Table creator. Blank except for unload and load operations. |
TABLE_NAME | CHAR(18) | Table name. Blank except for unload and load operations. |
NUM_OF_TABLESPACES | CHAR(5) | Number of table spaces involved in the backup or restore. Each table space backup contains one or more table spaces. Each table space restore replaces one or more table spaces. If this field is not zero (indicating a table space level backup or restore), the next lines in this file contain the name of the table space backed up or restored, represented by an 18-character string. One table space name appears on each line. |
LOCATION | CHAR(255) | For backups, and copies for loads and unloads, this field indicates where
the data has been saved. For operations that require multiple entries in the
file, the sequence number defined by OBJECT_PART identifies
which part of the backup or unload is found in the specified location. For
restores and loads, the location always identifies where the first part of the
data restored or loaded (corresponding to sequence '001' for
multi-part backups and unloads) has been saved. The data in
LOCATION is interpreted differently, depending on
DEVICE_TYPE:
|
COMMENT | CHAR(30) | Free form text comment. |
TABLESPACE | Array | An array of SQLN sqluhtsp structures. |
Table 65. Fields in the SQLUHTSP Structure
Field Name | Data Type | Description |
---|---|---|
TABLESPACE_NAME | CHAR(18) | A string containing the name of a table space. |
Language Syntax
C Structure
/* File: sqlutil.h */ /* Structure: SQLUHINFO */ /* ... */ SQL_STRUCTURE sqluhinfo { char sqluhinfoid[8]; long sqluhinfobc; short sqln; short sqld; char operation[SQLUH_OP_SZ+1]; char object[SQLUH_OBJ_SZ+1]; char object_part[SQLUH_OBJPART_SZ+1]; char optype[SQLUH_OPTYPE_SZ+1]; char device_type[SQLUH_DEVTYPE_SZ+1]; char first_log[SQLUH_FIRSTLOG_SZ+1]; char last_log[SQLUH_LASTLOG_SZ+1]; char backup_id[SQLUH_BACKID_SZ+1]; char table_creator[SQLUH_TCREATE_SZ+1]; char table_name[SQLUH_TNAME_SZ+1]; char num_of_tablespaces[SQLUH_NUMTABLESPACE_SZ+1]; char location[SQLUH_LOC_SZ+1]; char comment[SQLUH_COMMENT_SZ+1]; struct sqluhtsp tablespace[1]; }; /* ... */ |
/* File: sqlutil.h */ /* Structure: SQLUHTSP */ /* ... */ SQL_STRUCTURE sqluhtsp { char tablespace_name[SQLUH_TABLESPACENAME_SZ+1]; char filler; }; /* ... */ |
COBOL Structure
* File: sqlutil.cbl 01 SQLUHINFO. 05 SQLUHINFOID PIC X(8). 05 SQLUHINFOBC PIC S9(9) COMP-5. 05 SQLH-SQLN PIC S9(4) COMP-5. 05 SQLH-SQLD PIC S9(4) COMP-5. 05 SQL-OPERATION PIC X(1). 05 FILLER PIC X. 05 SQL-OBJECT PIC X(1). 05 FILLER PIC X. 05 SQL-OBJECT-PART PIC X(17). 05 FILLER PIC X. 05 SQL-OPTYPE PIC X(1). 05 FILLER PIC X. 05 SQL-DEVICE-TYPE PIC X(1). 05 FILLER PIC X. 05 SQL-FIRST-LOG PIC X(12). 05 FILLER PIC X. 05 SQL-LAST-LOG PIC X(12). 05 FILLER PIC X. 05 SQL-BACKUP-ID PIC X(14). 05 FILLER PIC X. 05 SQL-TABLE-CREATOR PIC X(8). 05 FILLER PIC X. 05 SQL-TABLE-NAME PIC X(18). 05 FILLER PIC X. 05 SQL-NUM-OF-TABLESPACES PIC X(5). 05 FILLER PIC X. 05 SQL-LOCATION PIC X(255). 05 FILLER PIC X. 05 SQL-COMMENT PIC X(30). 05 FILLER PIC X. 05 SQL-TABLESPACE OCCURS 1 TIMES. 10 SQL-TABLESPACE-NAME PIC X(18). 10 FILLER PIC X. 10 SQL-FILLER PIC X. * |
* File: sqlutil.cbl 01 SQLUHTSP. 05 SQL-TABLESPACE-NAME PIC X(18). 05 FILLER PIC X. 05 SQL-FILLER PIC X. * |