The processing of output 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.
For the most part, DMS handles files created with LABEL=NSTD exactly like files with standard labels (LABEL=(STD,n)).
Checking labels
If the first record on the tape is not a VOL1 label, DMS permits file access without further checks; the tape is immediately positioned to the beginning of tape (see step 2, "Files with standard labels").
If the first record is a VOL1 label, DMS checks the VSN in this label, and in the case of an error DMS issues message DMS0DA1
on the console. If the job has the necessary TPIGNORE authorization, the operator can ignore this message; otherwise, he/she must take the appropriate action.
If the user has requested a work tape, or if the volume list for the file is exhausted, the operator is requested via message DMS0DFB
to assign a tape.
If the VOL1 label contains the correct VSN, DMS then checks file header labels HDR1 through HDR3. Thereby evaluating the fields “access indicator” (HDR1), “file owner” (HDR3), “expiration date” (HDR1) and “access type” (HDR3). If the job is not authorized to access the file, the user receives DMS message DMS0DD7
or DMS0DA3
.
If he/she has the necessary TPIGNORE authorization, he can ignore the error message and proceed with file processing. Otherwise, he/she must react in a suitable manner to the message (terminate program, display label, retry label checking).
Positioning
If file access is permitted, the tape is rewound to the BOT mark.
Writing labels
First, DMS branches to the OPENV routine, which writes the nonstandard user volume labels (UVLs). In register 0, DMS provides the address of the area in which the labels can be created sequentially. The format for nonstandard user volume labels is not fixed, i.e. it can be defined by the user. The OPEN routine is terminated using the EXRTN macro. However, the tape must be positioned correctly before file processing can be continued. If the user program has no OPENV routine for writing UVL labels, DMS assumes that the tape is already correctly positioned.
Writing a tape mark
If TPMARK=YES or TAPE-MARK-WRITE=*YES was specified for the file, DMS now writes a tape mark. If no tape mark is wanted, the user must specify TPMARK=NO in the FILE macro or in the FCB, or TAPE-MARK-WRITE=*BY-PROGRAM in the ADD-FILE-LINK command.