This structure is used to:
Table 64. Fields in the SQLU-MEDIA-LIST Structure
| Field Name | Data Type | Description |
|---|---|---|
| MEDIA_TYPE | CHAR(1) | A character indicating media type. |
| SESSIONS | INTEGER | Indicates the number of elements in the array pointed to by the target field of this structure. |
| TARGET | Union | This field is a pointer to one of three types of structures. The type of structure pointed to is determined by the value of the media_type field. For more information on what to provide in this field, see the appropriate API. |
Table 65. Fields in the SQLU-MEDIA-LIST-TARGETS Structure
| Field Name | Data Type | Description |
|---|---|---|
| MEDIA | Pointer | A pointer to an sqlu_media_entry structure. |
| VENDOR | Pointer | A pointer to an sqlu_vendor structure. |
| LOCATION | Pointer | A pointer to an sqlu_location_entry structure. |
Table 66. Fields in the SQLU-MEDIA-ENTRY Structure
| Field Name | Data Type | Description |
|---|---|---|
| RESERVE_LEN | INTEGER | Length of the media_entry field. For languages other than C. |
| MEDIA_ENTRY | CHAR(215) | Path for a backup image used by the backup and restore utilities. |
Table 67. Fields in the SQLU-VENDOR Structure
| Field Name | Data Type | Description |
|---|---|---|
| RESERVE_LEN1 | INTEGER | Length of the shr_lib field. For languages other than C. |
| SHR_LIB | CHAR(255) | Name of a shared library supplied by vendors for storing or retrieving data. |
| RESERVE_LEN2 | INTEGER | Length of the filename field. For languages other than C. |
| FILENAME | CHAR(255) | File name to identify the load input source when using a shared library. |
Table 68. Fields in the SQLU-LOCATION-ENTRY Structure
| Field Name | Data Type | Description |
|---|---|---|
| RESERVE_LEN | INTEGER | Length of the location_entry field. For languages other than C. |
| LOCATION_ENTRY | CHAR(256) | Name of input data files for the load utility. |
Valid values for MEDIA_TYPE (defined in sqlutil) are:
Language Syntax
C Structure
/* File: sqlutil.h */
/* Structure: SQLU-MEDIA-LIST */
/* ... */
typedef SQL_STRUCTURE sqlu_media_list
{
char media_type;
char filler[3];
long sessions;
union sqlu_media_list_targets target;
} sqlu_media_list;
/* ... */
|
/* File: sqlutil.h */
/* Structure: SQLU-MEDIA-LIST-TARGETS */
/* ... */
union sqlu_media_list_targets
{
struct sqlu_media_entry *media;
struct sqlu_vendor *vendor;
struct sqlu_location_entry *location;
};
/* ... */
|
/* File: sqlutil.h */
/* Structure: SQLU-MEDIA-ENTRY */
/* ... */
typedef SQL_STRUCTURE sqlu_media_entry
{
unsigned long reserve_len;
char media_entry[SQLU_DB_DIR_LEN+1];
} sqlu_media_entry;
/* ... */
|
/* File: sqlutil.h */
/* Structure: SQLU-VENDOR */
/* ... */
typedef SQL_STRUCTURE sqlu_vendor
{
unsigned long reserve_len1;
char shr_lib[SQLU_SHR_LIB_LEN+1];
unsigned long reserve_len2;
char filename[SQLU_SHR_LIB_LEN+1];
} sqlu_vendor;
/* ... */
|
/* File: sqlutil.h */
/* Structure: SQLU-LOCATION-ENTRY */
/* ... */
typedef SQL_STRUCTURE sqlu_location_entry
{
unsigned long reserve_len;
char location_entry[SQLU_MEDIA_LOCATION_LEN+1];
} sqlu_location_entry;
/* ... */
|
COBOL Structure
* File: sqlutil.cbl
01 SQLU-MEDIA-LIST.
05 SQL-MEDIA-TYPE PIC X.
05 SQL-FILLER PIC X(3).
05 SQL-SESSIONS PIC S9(9) COMP-5.
05 SQL-TARGET.
10 SQL-MEDIA USAGE IS POINTER.
10 SQL-VENDOR REDEFINES SQL-MEDIA
10 SQL-LOCATION REDEFINES SQL-MEDIA
10 FILLER REDEFINES SQL-MEDIA
*
|
* File: sqlutil.cbl
01 SQLU-MEDIA-ENTRY.
05 SQL-MEDENT-LEN PIC 9(9) COMP-5.
05 SQL-MEDIA-ENTRY PIC X(215).
05 FILLER PIC X.
*
|
* File: sqlutil.cbl
01 SQLU-VENDOR.
05 SQL-SHRLIB-LEN PIC 9(9) COMP-5.
05 SQL-SHR-LIB PIC X(255).
05 FILLER PIC X.
05 SQL-FILENAME-LEN PIC 9(9) COMP-5.
05 SQL-FILENAME PIC X(255).
05 FILLER PIC X.
*
|
* File: sqlutil.cbl
01 SQLU-LOCATION-ENTRY.
05 SQL-LOCATION-LEN PIC 9(9) COMP-5.
05 SQL-LOCATION-ENTRY PIC X(255).
05 FILLER PIC X.
*
|