TAPE FILE ORGANIZATION * Magnetic Tape Labels and File Structure for Information Interchange (ANSI_X3.27-1978) Files may be organized on tape in volumes in one of four ways: 1) single volume, single file; 2) single volume, multiple files; 3) multiple volumes, single file; and 4) multiple volumes, multiple files. Examples of the sequence of labels, tape marks and files for each configuration is given below. Single volume, Single file Single volume, Multiple files Volume Header Label (VOL1) Volume Header Label (VOL1) File Header Label (HDR1) File Header Label (HDR1) File Header Label (HDR2) File Header Label (HDR2) Tape Mark Tape Mark File of data records File A of data records Tape Mark Tape Mark End of File Label (EOF1) End of File Label (EOF1) End of File Label (EOF2) End of File Label (EOF2) Tape Mark Tape Mark Tape Mark File Header Label (HDR1) File Header Label (HDR2) Tape Mark File B of data records Tape Mark End of File Label (EOF1) End of File Label (EOF2) Tape Mark Tape Mark Multiple volumes, Single file Volume A Volume B Volume Header Label (VOL1) Volume Header Label (VOL1) File Header Label (HDR1) File Header Label (HDR1) File Header Label (HDR2) File Header Label (HDR2) Tape Mark Tape Mark File of data record-Part 1 File of data records-Part 2 Tape Mark Tape Mark End of Volume Label (EOV1) End of File Label (EOF1) End of Volume Label (EOV2) End of File Label (EOF2) Tape Mark Tape Mark Tape Mark Tape Mark Multiple volumes, Multiple files Volume A Volume B Volume C Volume Header Label(VOL1) Volume Header Label(VOL1) Volume Header Label(VOL1) File Header Label(HDR1) File Header Label(HDR1) File Header Label(HDR1) File Header Label(HDR2) File Header Label(HDR2) File Header Label(HDR2) Tape Mark Tape Mark Tape Mark File A of data records File B of data rec.-Pt.2 File B of data rec.-Pt.3 Tape Mark Tape Mark Tape Mark End of File Label(EOF1) End of Volume Label(EOV1) End of File Label(EOF1) End of File Label(EOF2) End of Volume Label(EOV2) End of File Label(EOF2) Tape Mark Tape Mark Tape Mark File Header Label(HDR1) Tape Mark File Header Label(HDR1) File Header Label(HDR2) File Header Label(HDR2) Tape Mark Tape Mark File B of data rec.-Pt.1 File C of data records Tape Mark Tape Mark End of Volume Label(EOV1) End of File Label(EOF1) End of Volume Label(EOV2) End of File Label(EOF2) Tape Mark Tape Mark Tape Mark Tape Mark In the following tables, "numeric" refers to ASCII numerics 0-9, and "alphanumeric" refers to all the allowable characters as specified above. Where numeric characters are indicated in Content, if the numeric value is shorter than the length allotted for the element, then the value is right justified and unused positions filled with zeros. Where alphanumeric characters are indicated in Content, if the alphanumeric value is shorter than the length allotted for the element, then the value is left justified and unused positions filled with blanks. The ASCII blank character is code 20(hex). Volume Header Label (VOL1): Element Name Bytes Length Content (Description) Label Identifier 0-2 3 VOL Label Number 3 1 1 Volume Identifier 4-9 6 (numeric characters) Accessibility 10 1 (blank) Unused 11-36 26 (blanks) Owner Identifier 37-50 14 (alphanumeric characters) Unused 51-78 28 (blanks) Label Standard Ver. 79 1 1 File Header Label (HDR1): Element Name Bytes Length Content (Description) Label Identifier 0-2 3 HDR Label Number 3 1 1 File Identifier 4-20 17 (alphanumeric characters) File Set Identifier 21-26 6 (numeric characters) File Section Number 27-30 4 (numeric characters) File Sequence Number 31-34 4 (numeric characters) Unused 35-40 6 (blanks) Creation Date 41-46 6 (blank and 5 numeric characters)* Expiration Date 47-52 6 (blanks) Accessibility 53 1 (blank) Block Count 54-59 6 000000 System Code 60-72 13 (alphanumeric characters) Unused 73-79 7 (blanks) *The date is formatted yyddd, where yy = last 2 digits of the year and ddd = Julian day. File Header Label (HDR2): Element Name Bytes Length Content (Description) Label Identifier 0-2 3 HDR Label Number 3 1 2 Record Format 4 1 U Block Length 5-9 5 02048 Record Length 10-14 5 00000 Unused 15-49 35 (blanks) Buffer Offset 50-51 2 00 Unused 52-79 28 (blanks) End-of-Volume Label (EOV1): Element Name Bytes Length Content (Description) Label Identifier 0-2 3 EOV Label Number 3 1 1 Same as HDR1 4-53 50 (same as HDR1) Physical Block Count 54-59 6 (numeric characters) Same as HDR1 60-79 20 (same as HDR1) EOV 1 End-of-Volume Label (EOV2): Element Name Bytes Length Content (Description) Label Identifier 0-2 3 EOV Label Number 3 1 2 Same as HDR2 4-79 76 (same as HDR2) EOV 2 End-of-File Label (EOF1): Element Name Bytes Length Content (Description) Label Identifier 0-2 3 EOF Label Number 3 1 1 Same as HDR1 4-53 50 (same as HDR1) Block Count 54-59 6 (numeric characters) Same as HDR1 60-79 20 (same as HDR1) EOF 1 End-of-File Label (EOF2): Element Name Bytes Length Content (Description) Label Identifier 0-2 3 EOF Label Number 3 1 2 Same as HDR2 4-79 76 (same as HDR2) EOF 2