The media table is located in the catalog space and contains entries for each databasespecific file type, including a description of the file attributes (the size of the primary and secondary assignments, shareability) and information on the storage media on which the files belonging to the file type in question are to be created. Each entry of this kind is known as a media record.
Edit media table
The first media record for the CAT-REC file and the first media record for the CAT-LOG files are added to the media table with the utility statement CREATE CATALOG when the catalog space is created (see section “Creating the database's catalog space”). The database administrator adds the first media record for DA-LOG files and the first media record for the PBI file or the HSMS work file to the media table with the utility statement CREATE MEDIA DESCRIPTION.
Using the utility statement ALTER MEDIA DESCRIPTION, the database administrator can update the media table by adding or deleting individual media records. In addition, they can use this statement to modify the description of the file attributes. All the media records for a specific file type can be deleted using the utility statement DROP MEDIA DESCRIPTION.
Analysis of the media table by SESAM/SQL
Before SESAM/SQL creates a file it first searches for this file. In the case of logging files, it observes the appropriate rules (see section “BS2000 user IDs in the case of media recovery”). If a database-specific file is to be created and the file is not found, SESAM/SQL analyzes the media table and creates the file in accordance with the information contained in the first media record for the relevant file type. If the media table does not contain an entry for the file type in question, SESAM/SQL always first tries to create the file on the catalog ID which is assigned to the DB user ID, see section “Database files and job variables on foreign user IDs”.
Otherwise, SESAM/SQL creates the file on the DB user ID. Details of the actual defaults that SESAM/SQL uses are provided in the description of the database-specific files below.
SESAM/SQL continues to create files on the storage medium specified in the first media record for the relevant file type until there is no more space on the device. Only then does SESAM/SQL analyze the second media record for this file type and create the next file of this type on the storage medium specified in the second media record. SESAM/SQL continues in this way until it has worked its way through the media table, in other words until it has reached the final media record for the relevant file type. Using one of the clauses of the utility statement CREATE MEDIA DESCRIPTION, the database administrator can specify whether or not SESAM/SQL should request additional information on storage media for the relevant file type at the console once it has worked its way through the table.
For the PBI file or the HSMS work file, the media table is only analyzed with COPY. If RECOVER is issued for an online backup which was created using ARCHIVE, the PBI file is stored on the default pubset of the DBH user ID.
If a DMS error occurs when processing the PBI file, for example, because the file cannot be extended, the COPY statement is aborted.