The processing of input files with nonstandard labels is requested by means of the operand LABEL=NSTD of the FILE macro or the operand LABEL-TYPE=*NON-STD of the ADD-FILE-LINK command.
Checking labels
DMS first checks whether the tape starts with a VOL1 label. If not, file access is permitted without further checking (processing continues with step 2, "Files with standard labels").
If the tape has a VOL1 label, DMS checks, just as for files with standard labels, whether the VSNs in the label and in the FILE macro or ADD-FILE-LINK command agree. If not, DMS sends message DMS0DA1
to the operator. For foreign files for which no VSN was specified in the FILE macro or ADD-FILE-LINK command, DMS issues message DMS0DFB
.
If the VSNs match, the contents of the HDR labels determine whether or not file access is permitted. Just as for files for which LABEL=(STD,n) or LABEL-TYPE=*STD(DIN-REVISION-NUMBER=n) was specified, DMS first reads the HDR1 label and then the HDR2 and HDR3 labels.
The “access indicator” in the HDR1 label is checked, and if the file is not shareable the owner identifier is compared with the user ID of the job (error message: DMS0DD7
). If the file is to be opened with OPEN INOUT, the HDR3 field “Access type” (ACCESS=READ) and the HDR1 field “Expiration date” are checked (error message: DMS0DA3
).
Evaluating labels
The tape is first rewound to the BOT (Beginning-Of-Tape) mark. DMS then branches to the LABGN exit routine of the user program in which the volume header labels are to be checked. This is done with the aid of BTAM macros.
If no LABGN exit is defined in the EXLST macro, the labels are ignored.
If the labels are found to be invalid, the program is terminated with an OPEN error.
The LABGN routine is terminated by means of the LBRET macro.
Positioning
The user is responsible for correct positioning of the tape, i.e. (s)he must ensure that the tape is positioned to the file header labels before returning control to DMS. The user program must also evaluate the file header labels. You are also responsible for positioning these correctly.
Tape marks
Tape marks are ignored unless TPMARK=YES is specified in the file control block or TFT entry. If this is the case, DMS positions the tape after the tape mark. If TPMARK=NO is specified in the file control block or TFT entry, DMS assumes that the user has already positioned the tape to the first record (see above).