Previous | Contents | Index |
For example, to display the complete listing of all information about the files concerning sales on the tape BACKUP_SALES (created by a backup job): 3
$ MEDIA BACKUP_SALES>SALES* DIRECTORY/FULL Directory of BACKUP_SALES;1>[] SALES_APR.BCK;1 Size: 578 (8912) Created: 30-APR-1996 00:00:00.00 Owner: [JOHNSON] Revised: 30-APR-1996 00:00:00.00 Protection: Expires: (not set) (RW,RW,RW,RW) Backup: (not set) Record size: 8912 Record Format: VMS Backup, embedded carriage control, VAX/VMS SALES_MAY.BCK;1 Size: 747 (8912) Created: 31-MAY-1996 00:00:00.00 Owner: [JOHNSON] Revised: 31-MAY-1996 00:00:00.00 Protection: Expires: (not set) (RW,RW,RW,RW) Backup: (not set) Record size: 8912 Record Format: VMS Backup, embedded carriage control, VAX/VMS SALES_JUN.BCK;1 Size: 624 (8912) Created: 31-JUN-1996 00:00:00.00 Owner: [JOHNSON] Revised: 31-JUN-1996 00:00:00.00 Protection: Expires: (not set) (RW,RW,RW,RW) Backup: (not set) Record size: 8912 Record Format: VMS Backup, embedded carriage control, VAX/VMS Total of 3 files |
In the first line of the display, the "[ ]" means that this medium does
not contain directories.
11.2.7 Example using qualifiers in a Media search
Suppose a user is looking for the file DUNNING_LETTER.FRM, which is stored off-line. It has been three months since he last sent a letter to an overdue account, so he has forgotten on which tape the file is stored and he is not sure what he named the file of sample letters.
He begins his search by listing all of the media allocated to him:
$ MEDIA * DIRECTORY Directory of media on 2-JAN-1996 14:13 BETTY1;25 BETTY2;14 DEL_ACCTS;1 LETTERS;15 MISC_FRMS;4 OVRDUE;5 TEMP01;1 TEMP02;1 Total of 8 media |
Since he is not sure of the file name but he is sure that the file was used around three months ago, he can use qualifiers to narrow the range of possible media. Three months before January 2 would be around October 2 and he wants to add a safety margin of two weeks, so the user limits his search to media that have been modified between September 15 and October 15.
$ MEDIA /BEFORE=15-OCT-1996/MODIFIED/SINCE=15-SEP-1996/MODIFIED Directory of media on 2-JAN-1996 14:30 DEL_ACCTS;1 Total of 1 medium |
The user can now request the tape DEL_ACCTS and find his file.
If this user had been sure that he named the file DUNNING_LETTER.FRM, he could have entered the command:
$ MEDIA * > DUNNING_LETTER.FRM DIRECTORY |
which would search through all the contents information and list the
media on which it was found.
11.2.8 Adding media to the database
An important point to note is that adding media entries to the MEDIA DATABASE is not the same as physically adding tapes to the library storage areas. The database is essentially a series of entries in a rather complex, electronic card catalog. Tapes and disks can be physically in the library storage area without having been added or cataloged. Likewise, a medium can be added to the database even if it does not exist. The ideal is for each medium in the library storage area to correspond with one and only one entry in the MEDIA DATABASE.
MEDIA can be added to the DATABASE in one of three ways:
Most of the time, you will use media that have already been entered into the system by the MANAGER Occasionally, you may find a need for the third entry, called an INCORE (or USER) entry. An INCORE entry is not cataloged into the MEDIA DATABASE. It is a current session entry that disappears from the database when you log out of the current session. You can have only one INCORE entry during a single session.
The following command will add a medium for use in the current session.
$ MEDIA USER-EXTERNAL_ID ADD |
For example, if you received a tape from an outside customer that you want to work with for the day, you can add it temporarily to the database with a name like HISTAPE using either of the following commands:
$ MEDIA USER-HISTAPE ADD $ MEDIA INCORE ADD |
If you want to check what INCORE media have been added, you would type:
$ MEDIA INCORE DIRECTORY |
Directory of media on 2-JAN-1996 10:10 HISTAPE;0 Total of 1 medium |
An example of a job command involving INCORE media is
$ MEDIA INCORE $ COPY ABC.DAT MEDIA: |
Media can also be added to the database permanently. Check with your
MANAGER to see if this is possible at your site.
11.2.9 Adding multiple media into the database
MEDIA ADD is one way to add tapes to the MEDIA database. You can add media one at a time or you can use range specifications to add consecutive series of media numbers to the database. A user wants to set up a new range of tapes for storing programs. She will use these tapes as required by using the UNKNOWN keyword. The tapes are numbered consecutively from R001 to R005, and he wants to have the system confirm that the tapes have been added, so he adds the qualifier /LOG to his command line: .test page 9
$ MEDIA R001:5 ADD/LOG R001 Added R002 Added R003 Added R004 Added R005 Added |
This command has added the information to the MEDIA database that these five tapes exist, but has not told the MEDIA librarian anything else about the tapes. A user can add qualifiers to the command string to give the librarian more information or she can let the MEDIA program take the information from the header and contents files when the medium is mounted for the first time.
For example, if a user wants to add her five tapes, specifying read access only for all users except herself, she can enter:
$ MEDIA R001:5 ADD/DENSITY=6250/PROTECTION=(S:R,O:RWID,G:R,W:R) |
11.2.10 The MEDIA CATALOG command
MEDIA CATALOG is an interactive version of the MEDIA ADD command
that can also be used to add existing media to the MEDIA
database catalog. This command is designed to be used with media that
already contain data and are to be added to the allocated pool and
assigned to a particular user. MEDIA CATALOG prompts you for
information about the medium you are adding.
When you type the command:
$ MEDIA CATALOG |
the following prompts appear
External label : label on outside Internal label (Blank) : encoded label User name (SMITH) : owner of medium Comment : any text Density (1600) : recording density Location (LIBRARY) : storage location Protection (S:RWID,O:RWID,G,W) : protection settings Status (TAPE,LABEL_TBD) : status conditions Medium type (TAPE) : type control word Label (ANSI) : label type Mount (ANSI,NOWRITE) : mount conditions Update (ANSI,SDR) : update conditions Submit a directory update request [Y/N] : yes/no |
The first column is the prompt, the second is the default value. The
third column is a description of the allowed values that can be
entered. The medium name can include a list of media or a range
specification. The defaults for your site are set by your MANAGER, so
they may be different from the examples shown. To accept a default,
just press RETURN.
11.2.11 Returning media to the available pool
When you are finished working with a medium and all of the information on it is no longer of use, you can return it to the system for re-use with the command RELEASE, using the format:
$ MEDIA MEDIUM_NAME RELEASE/QUALIFIER |
For example, the following command causes the medium SPECIAL_ACCOUNTS to be moved into the released pool.
$ MEDIA SPECIAL_ACCOUNTS RELEASE |
Once you have released a medium to the released pool, it will remain there for a period of time specified by your MANAGER and then will be automatically shifted to the available pool and reset.
The purpose of the released pool is to give you a chance to change your mind within the period allowed and decide you want the tape back. In this case, you must send a message to the MANAGER or the OPERATOR and, if the tape has not been allocated to someone else, it can be re-allocated to you. If the tape has already been re-allocated to someone else, it will have been initialized and the old data will no longer be intact. The default for the time period spent in the released pool is 30 days, but this parameter can be set by your MANAGER to any length of time.
You can use the RELEASE command to release more than one medium at a time, by using wildcards or name range formats.
The following examples release media using wildcards:
$ MEDIA SALES* RELEASE |
This example releases all media with an alias beginning with SALES, including SALES_APR, SALESACCOUNT and SALESORDERS_DEC.
$ MEDIA ACCT% RELEASE |
This example releases all media with an alias of five characters that start with ACCT, including ACCT1 and ACCTD but not ACCTDEL or ACCT23.
To use the range format for extended releases, simply replace the assigned name with a valid range format. For example:
$ MEDIA ACCT1:6 RELEASE $ MEDIA 2001:2010 RELEASE |
The first example releases media ACCT1, ACCT2, ACCT3...ACCT6; the second releases media 2001,2002...2010.
You can restrict the extended RELEASE command by using the following search qualifiers and field modifiers.
Qualifier | Description |
---|---|
/BEFORE=date | specifies that the command will act only on those media with a date before the specified date |
/SINCE=date | specifies media with a date after the date specified |
The date referred to in the above qualifiers is the value of the date field attached to the media or the files searched.
For example,
$ MEDIA ACCT1% RELEASE/BEFORE=01-JAN-1996 |
releases all media with names from ACCT10 to ACCT19 that were created before January 1, 1996.
The date field selected can also be modified.4 The most commonly used date-field modifiers are:
Modifier | Description |
---|---|
/CREATED | the date a file or medium was first created or added to the database |
/MODIFIED | the date a file or medium was last modified |
/EXPIRED | the date a file or medium expires |
Modifier | Description |
---|---|
/created | the date a file or medium was first created or added to the database |
/modified | the date a file or medium was last modified |
/expired | the date a file or medium expires |
Unlike INCORE media, which are automatically deleted from the system when you log out of the current session, media that have been added to the MEDIA database must either be released for reuse or deleted entirely. The most common means of releasing a medium is by setting an expiration date and letting the system release the medium automatically. In some cases, however, you may want to intervene to release a medium yourself. You must have the appropriate privilege level and delete access to the medium to do this.
The MEDIA RELEASE command is the simplest command for returning control of a medium to the librarian. This moves the medium from the allocated pool to the released pool. It remains in the released pool for a period of time specified by your MANAGER before it goes into the available pool.
The MEDIA PURGE command is a more involved form of the RELEASE command for use when several media have been given the same alias name. Instead of simply releasing a particular medium, MEDIA PURGE returns older versions of the medium to the system. You specify the number of versions to be kept, using the qualifier /KEEP=n. The command format is:
$ MEDIA MEDIUM_NAME PURGE/QUALIFIER |
For example, by typing in the following commands:
$ MEDIA MY_TAPE/NEW $ MEDIA MY_TAPE/NEW $ MEDIA DIRECTORY MY_TAPE;2 MY_TAPE;1 |
two new medium have been created with the name MY_TAPE. 5
The only difference between the two being the version number.
PURGE deletes the oldest version of the file, leaving only the most recent version(s).
$ MEDIA MY_TAPE PURGE/LOG |
If you don't specify a number of versions to be kept only the highest version numbered medium is kept.
The MEDIA DELETE command does not release control of the medium to the system; it permanently removes all information about that medium from the on-line database. You must have delete access to use this command, and you can only delete media that you have added. To delete media added by someone else requires a higher level of privilege.
All three of these commands, RELEASE, PURGE and DELETE, can use the same search qualifiers as any of the MEDIA database commands. To refresh your memory, these include:
Qualifier | Description |
---|---|
/BEFORE=date | specifies that the command will act only on those media with a date before the specified date |
/SINCE=date | specifies media with a date after the date spec ified |
/SELECT=criterion or (criterion,criterion...) | selects all media with the specified characteristics. This applies to volumes that have the selection criteria, not to files. |
The date in the above qualifiers is the value of the date field attached to the medium or the files searched. The date field can also be modified. The most commonly used date field modifiers6 are:
Qualifier | Description |
---|---|
/CREATED | the date a file or medium was first created in the database |
/MODIFIED | the date a file or medium was last modified |
/EXPIRED | the date a file or medium expired |
If no field modifier is specified, the default field modifier is /CREATED.
The /SELECT search qualifier controls the selection of media using several criteria:
Criteria | Description |
---|---|
LOCATION=string or (string,string...) | selection string |
TYPE=string or (string,string...) | selection string |
COMMENT=string or (string,string...) | selection string |
MFG=string or (string,string...) | selection string |
DENSITY=density or (density,density...) | density selection |
MATCH=mode | match mode |
The selection criteria are controlled by one of the MATCH keywords:
Keyword | Synonym | Action |
---|---|---|
AND | ALL | if all strings match |
OR | ANY | if any strings match (DEFAULT) |
XOR | ANY1 | if one and only one string matches |
NOT | if string does not match | |
NAND | NOTANY | if no strings match |
NOR | NOTALL | if at least one string does not match |
3 In the first line of the display, the `[]' means that this medium does not contain directories.4 /CREATED, /MODIFIED, and /EXPIRED are mutually exclusive date-fields; they cannot be used together in the same command line.5 The MY_TAPE is an alias name. The external id. of the medium is always constant and is established by the MEDIA ADD command.6 /CREATED, /MODIFIED, and /EXPIRED are mutually exclusive date-fields; they cannot be used together in the same command line. |
Previous | Next | Contents | Index |