Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Processing of MF/MV sets

File access in an MF/MV set

If the user wishes to access a cataloged file within an MF/MV set, (s)he only needs to specify the file name in the FILE/FCB macro or the ADD-FILE-LINK command. DMS then takes the associated VSNs and the file sequence number from the catalog entry. When the file is opened, DMS positions the first tape in the volume list to the start of the file, checks the file header records and, if permitted, then allows access to the file. Label checking and tape positioning are described in detail in chapter "Label processing when opening tape files".

If the user wishes to access an existing, but uncataloged, file (= foreign file), he/she can use the macros to specify the following:

  • the file name, the operand STATE=FOREIGN, the file sequence number (FSEQ=) and the volume list (in the VOLUME operand) in the FILE macro.

  • If he does not know the file sequence number, he can specify the file name and the volume list, together with the operand FSEQ=UNK. DMS then searches for the file in the specified volume set, using the file name as the search argument. A prerequisite for this is, however, that the foreign file was created with standard labels.

If using commands, the user must first import the file with the IMPORT-FILE command. He/she can then specify the following:

  • the file name and the file sequence number (FILE-SEQUENCE= operand) in the ADD-FILE-LINK command.

  • If he does not know the file sequence number, he can specify the file name together with the operand “FILE-SEQUENCE=UNKNOWN”. DMS then searches for the file in the specified volume set, using the file name as the search argument. A prerequisite for this is, however, that the foreign file was created with standard labels.

If the FILE macro does not contain a VSEQ specification or the ADD-FILE-LINK command does not include a specification for the VOL-SEQUENCE-NUMBER operand, DMS assumes that the user wants the first section of the file.

Access in REVERSE mode

For access in REVERSE mode, DMS requests the volume which contains the last file section and positions the tape to the end of this section. DMS uses the number of volumes recorded in the catalog entry in order to determine which volume in the volume set contains the end of the file. If the file is not cataloged (foreign file), DMS assumes that the last volume in the volume list contains the end of the file.

If the user specifies only one volume in the FILE macro (VSEQ operand) or ADD-FILE-LINK command (VOL-SEQUENCE-NUMBER operand), DMS requests this volume since the file section number and the tape sequence number correspond. It then positions the tape to the end of the file section.

Access to any desired file section

If the user wishes to process a file which extends over several tapes, he/she can use the FILE macro (VSEQ operand) or ADD-FILE-LINK command (VOL-SEQUENCE-NUMBER operand) to position the file to any desired file section. The user program can then process either this file section or all file sections from this file section to the end of the file.

If the program is to process only one file section, the user must specify the VSEQ operand as follows:

VSEQ=(L=(n))

If the user program is to process all file sections from the specified section to the end of the file, the VSEQ operand must be specified as follows:

VSEQ=n

where “n” is the number of the volume which contains the first file section to be processed.

Random access to file sections

File sections of a file can be processed in any desired order. To do so a list of file section numbers in the VSEQ or VOL-SEQUENCE-NUMBER operand must be specified. Each of the entries in this list refers to a volume of the volume set which contains the file.

Example 1 (program interface)

File A extends over the tape volumes 00000A, 00000B, 00000C, 00000D, 00000E. If the user specifies the VSEQ operand:

VSEQ=(L=(4,1,3))

and if the user program completely processes each specified file section, DMS requests that volumes 00000D, 00000A and 00000C be mounted in this order.

Random access to file sections is particularly important if sections of a multivolume file have been destroyed or are unreadable and the user wants to process those sections of his file which can still be read.

Example 2 (program interface)

If, in the above example, the second section of file A had been destroyed, the user could specify the following to process the file sections which are still accessible:

VSEQ=(L=(1,3,4,5)

Example 3 Processing a file section by section (command interface)

File A extends over the tape volumes 00000A, 00000B, 00000C, 00000D, 00000E. If the user issues the following ADD-FILE-LINK command

/ADD-FILE-LINK FILE-NAME=A,
     SUPPORT=*TAPE(VOLUME-LIST=*CATALOG(VOL-SEQUENCE-NUMBER=(4,1,3))

and if the user program completely processes each specified file section, DMS requests that the volumes 00000D, 00000A and 00000C be mounted in this order.

Example 4 Access to file sections (command interface)

If, in the above example, the second section of file A had been destroyed, the user could issue the following command to enable the remaining file sections to be processed:

/ADD-FILE-LINK FILE-NAME=A,
     SUPPORT=*TAPE(VOLUME-LIST=*CATALOG(VOL-SEQUENCE-NUMBER=(1,3,4,5))

Extending files in an MF/MV set

The rules for extending files in an MF/MV set are the same as for extending files in a file set:

If files in the MF/MV set or file sections of such files are extended, the following files are implicitly overwritten and the file set is destroyed.

The catalog entries of the overwritten files are not automatically erased, which means that they point to non-existent files. Any attempt to access a file which has been implicitly overwritten will lead to an OPEN error. It is the responsibility of the user to delete such catalog entries.

This implicit overwriting may destroy the nth file section of a multivolume file. However, by specifying VSEQ=n+1 in the FILE macro or START-POSITION=n+1 in the ADD-FILE-LINK command, the user can still access the following section of this file.

All files of a file set which are stored before the overwritten or extended file on a volume, and all files on the other volumes of a volume set, remain accessible.

The overwritten/extended file becomes the last file of the file set.

The original volume set no longer exists. The new volume set consists of the volumes of the old volume set up to and including the volume on which the file was overwritten or extended. Any attempt to position from this new volume set to a volume in the “remainder” of the original volume set will lead to unpredictable results.

Implicit overwriting of a file is prevented if the preceding file has a higher security level (retention period, access type). If the SECLEV operand is specified with the option OPR in the FILE/FCB macro or the OVERWRITE-PROTECTION operand is specified in the ADD-FILE-LINK command, a file cannot be created with a higher security level than that of its predecessor in the file set.

Positioning MF/MV sets

A prerequisite for access to a file in an MF/MV set is that the volume set is first positioned to the desired file. This positioning is carried out automatically for cataloged files with standard labels or with no labels when the file is to be opened. In the case of uncataloged files or files with nonstandard labels, it is the user's responsibility to ensure that positioning is correct.

Positioning is based on the file sequence number, which is specified by FSEQ or FILE-SEQUENCE, as appropriate. This sequence number is allocated to each file of an MF/MV set when the file is created. If a file is continued on the next volume, it retains the same file sequence number. The next higher sequence number is allocated to the file which follows it on the next volume. The file sequence number of a file is recorded in the HDR1 label and in the catalog entry.

If a user wants to access a cataloged file, DMS automatically fetches the file sequence number and the VSNs of the volumes containing the file from the file catalog entry.

For access to an uncataloged file, or when creating a new file, the user must specify the FSEQ operand in the FILE/FCB macro or the FILE-SEQUENCE operand in the ADD-FILE-LINK command. Otherwise, DMS assumes that the user wishes to access the first file of a file set.

When a file on a tape is opened, the current file sequence number is taken from the FILE or FCB macro, from the ADD-FILE-LINK command, or from the catalog entry.

The tape is then positioned until

  • the sequence number of the file being read matches the requested sequence number, or

  • if FSEQ=NEW/FILE-SEQUENCE=NEW is specified, the end of the MF/MV set is found, namely a double tape mark following an EOF label group; the tape is then moved one tape mark backwards, or

  • if FSEQ=UNK/FILE-SEQUENCE=UNKNOWN is specified, the file name is found.

If necessary, DMS automatically has the tapes swapped and carries out label checking (see chapter "Label processing when opening tape files").

If a file is to be opened in REVERSE mode, the search is executed as described above, but the tape is in each case positioned to the end of the file.

The user must provide special EXLST routines for positioning tapes which use nonstandard labels.