This structure is used to return information after a call to sqluhgne - Get Next Recovery History File Entry.
Table 66. Fields in the SQLUHINFO Structure
| Field Name | Data Type | Description |
|---|---|---|
| SQLUHINFOID | CHAR(8) | An eight-byte structure identifier and "eye-catcher" for storage dumps. Can be either "SQLUHINF" or "SQLUHADM". No symbolic definition for these strings 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, D for dropped table, F for roll forward, G for reorganize table, L for load, R for restore, S for run statistics, and T for alter table space. |
| 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 operation can result in multiple entries in this file when the backup 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. The time stamp, combined with the sequence number, must be unique. |
| START_TIME | CHAR(14) | A time stamp with format yyyymmddhhnnss, indicating when the operation was done. |
| 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 load operations. |
| TABLE_NAME | CHAR(18) | Table name. Blank except for 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 load copies, 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 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) 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. |
| ADMIN_INFO | Array | An array of sqluhadm structures. |
Table 67. Fields in the SQLUHTSP Structure
| Field Name | Data Type | Description |
|---|---|---|
| TABLESPACE_NAME | CHAR(18) | A string containing the name of a table space. |
Table 68. Fields in the SQLUHADM Structure
| Field Name | Data Type | Description |
|---|---|---|
| END_TIME | CHAR(14) | Time stamp. |
| ID | CHAR(24) | A unique identifier for a dropped table. |
| EVENT_SQLCA | Structure | For information about the sqlca structure, see SQLCA. |
| COMMAND | Structure | For information about the sqlchar structure, see SQLCHAR. |
| TABLESPACE | Array | An array of SQLN sqluhtsp structures. |
Table 69. Fields in the SQLUHSTR Structure
| Field Name | Data Type | Description |
|---|---|---|
| LENGTH | UNSIGNED LONG | Length of the character string pointed to by DATA. |
| DATA | Pointer | An array of characters of length LENGTH. |
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];
union
{
char object_part[SQLUH_OBJPART_SZ+1];
char start_time[SQLUH_TIMESTAMP_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];
union
{
struct sqluhtsp tablespace[1];
struct sqluhadm admin_info;
}
};
/* ... */
|
/* File: sqlutil.h */
/* Structure: SQLUHTSP */
/* ... */
SQL_STRUCTURE sqluhtsp
{
char tablespace_name[SQLUH_TABLESPACENAME_SZ+1];
char filler;
};
/* ... */
|
/* File: sqlutil.h */
/* Structure: SQLUHADM */
/* ... */
SQL_STRUCTURE sqluhadm
{
char end_time[SQLUH_TIMESTAMP_SZ+1];
char id[SQLUH_ID_SZ+1];
struct sqlca event_sqlca;
struct sqluhstr command;
struct sqluhtsp tablespace[1];
};
/* ... */
|
/* File: sqlutil.h */
/* Structure: SQLUHSTR */
/* ... */
SQL_STRUCTURE sqluhstr
{
unsigned long length;
char *data;
};
/* ... */
|
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.
*
|