Standard ECMA-13 4 t h Edition – December 1985 Rep r inted in e le c tr o nic fo r m in J a nuar y 1 9 9 9
Standardizing
Information
and
Communication
Systems
File Structure and Labelling of Magnetic Tapes for Information Interchange
P h o n e : + 4 1 2 2 8 4 9 . 6 0 . 0 0 - F a x : + 4 1 2 2 8 4 9 . 6 0 . 0 1 - U R L : h t t p : / / www. e c m a . c h - I n t e r n e t : h e l p d e s k @ e c m a . c h
.
Standard ECMA-13 D e c e mb e r 1 9 8 5
Standardizing
Information
and
Communication
Systems
File Structure and Labelling of Magnetic Tapes for Information Interchange
P h o n e : + 4 1 2 2 8 4 9 . 6 0 . 0 0 - F a x : + 4 1 2 2 8 4 9 . 6 0 . 0 1 - U R L : h t t p : / / www. e c m a . c h - I n t e r n e t : h e l p d e s k @ e c m a . c h LL
ECMA-13.DOC
28-01-99 10,08
.
Brief History
In November 1967 the General Assembly of EC MA adopted the 1 st Edition of Standard ECMA-13, prepared by a task group of TC 1, Input/Output Codes. Subsequent developments led to the setting up of TC 15, Labelling and File Structure, and to the preparation of a 2 nd Edition of the Standard, adopted by the General Assembly of ECMA in June 1973. Beside a major editorial revision, this new edition included provisions for spanned records, while a number of fields, optional in the previous edition, were made mandatory. Work in the area of subsetting, in co-operation with ISO, led to the definition of four levels of labelling, providing explicit subsetting and facilitating the interchange of data among users. The 3 rd Edition published in 1978 specified the definition of levels and other minor changes in the areas of Record Format, Block Length and Block Sequence Indicator. The corresponding International Standard ISO 1001 was published in 1979. In 1983 the need for a revision of ISO 1001 was recognized and TC 15 contributed the major part of the work required for this revision. At the same time it was decided to re-edit ECMA-13. This 4 th Edition is technically identical with the 2 nd Edition of ISO 1001 but for the reference to ECMA standards.
This ECMA Standard has been adopted by the ECMA General Assembly of December 1985.
.
- i -
Table of contents Section I
1
1
Scope and Field of Application
1
2
Conformance Conformance of a Magnetic Tape Volume Set Conformance of an Information Processing System
1 1 1
3
References
1
4
Definitions Application Program Block Blocked Byte File File Section File Set Fixed-Length Record Implementation Installation Label Originating System Originator Receiving System Recipient Record Segmented Record Standard for Information Interchange Tape Mark User Variable-Length Record Volume Volume Set
1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3
Notation
3
2.1 2.2
4.1 4.2 4.3 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12 4.13 4.14 4.15 4.16 4.17 4.18 4.19 4.20 4.21 4.22 4.23 5
Section II
3
6
3 3 3 3 3 4 4 4 4 4 5 5
Arrangement of Labels and Files 6.1 Arrangement of Data on a Volume 6.2 Arrangement of Label Groups 6.2.1 Labels 6.2.2 Label Sets 6.2.3 Label Groups 6.3 Arrangement of File Sections 6.3.1 File Section 6.3.2 Labelled-Sequence 6.4 Relationship of File Sections to a Volume 6.5 Arrangement of Files and File Sets 6.5.1 Files
- ii 6.5.2 File Sets 6.6 Structure of a Volume Set
5 5
7
File Structure for Data Interchange 7.1 Blocks 7.1.1 Characteristics 7.1.2 Block length 7.1.3 Offset field 7.1.4 Padding field 7.2 Records 7.2.1 Characteristics 7.2.2 Fixed-length records 7.2.3 Variable-length records 7.2.4 Segmented records 7.2.5 Coded representation of data 7.3 Files 7.3.1 Characteristics 7.3.2 Consistency of file attributes between file sections 7.3.3 File Organization
5 5 5 5 6 6 6 6 6 6 6 7 7 7 7 7
8
Format and Contents of the Labels and Label Sets 8.1 Character Set and Coding 8.2 Justification of Characters 8.3 Volume Header Label Set (VOL1 to VOL9) 8.3.1 First Volume Header Label (VOL1) 8.3.2 Other Volume Header Labels (VOL2 to VOL9) 8.4 Installation Volume Label Set (UVL1 to UVL9) 8.4.1 Label Identifier (BP 1-3) 8.4.2 Label Number (BP 4) 8.4.3 Field Reserved for Installation Use (BP 5-80) 8.5 File Header Label Set (HDR1 to HDR9) 8.5.1 First File Header Label (HDR1) 8.5.2 Second File Header Label (HDR2) 8.5.3 Other File Header Labels (HDR3 to HDR9) 8.6 User File Header Label Set (UHLs) 8.6.1 Label Identifier (BP 1-3) 8.6.2 Label Number (BP 4) 8.6.3 Field reserved for application use (BP 5-80) 8.7 End of Volume Label Set (EOV1 to EOV9) 8.7.1 First End of Volume Label (EOV1) 8.7.2 Second End of Volume Label (EOV2) 8.7.3 Other End of Volume Labels (EOV3 to EOV9) 8.8 End of File Label Set (EOF1 to EOF9) 8.8.1 First End of File Label (EOF1) 8.8.2 Second End of File Label (EOF2) 8.8.3 Other End of File Labels (EOF3 to EOF9) 8.9 User File Trailer Label Set (UTL) 8.9.1 Label identifier (BP 1-3) 8.9.2 Label Number (BP 4) 8.9.3 Field reserved for application use (BP 5-80)
7 7 8 8 8 9 9 10 10 10 10 10 12 14 14 14 14 14 15 15 16 16 16 17 18 18 18 19 19 19
- iii -
9 9.1 9.2 9.3 9.4
Levels of Interchange Level 1 Level 2 Level 3 Level 4
19 19 19 19 19
Section III
20
10
20
Requirements for the Description of Systems
11 Requirements for an Originating System 11.1 General 11.2 Files 11.3 Labels 11.4 Restrictions
20 20 20 20 21
12 Requirements for a Receiving System 12.1 General 12.2 Files 12.3 Labels 12.4 Restrictions
21 21 22 22 23
Appendix A - IRV Code Table from ECMA-6
25
Appendix B - Initialized Volumes
27
Appendix C - Main Differences between the 3 rd and the 4 th Editions
29
- iv .
Section I 1
Scope and Field of Application This ECMA Standard specifies the file structure and the labelling of magnetic tapes for interchange of information between users of information processing systems. This ECMA Standard specifies the volume and file structure, and the basic characteristics of the blocks containing the records constituting the file. It also specifies the recorded labels to identify files, file sections and volumes of magnetic tapes. It also specifies four nexted levels of interchange. Furthermore, this ECMA Standard specifies requirements for the processes which are provided within information processing systems, to enable information to be interchanged between different systems, utilizing recorded magnetic tape as the medium of interchange. For this purpose it specifies the functions to be provided within systems which are intended to originate or receive magnetic tape volumes which conform to this ECMA Standard.
2 2.1
Conformance Conformance of a Magnetic Tape Volume Set A magnetic tape volume set conforms to this ECMA Standard when all information recorded on it conforms to the specifications of Section II of this ECMA Standard. A statement of conformance shall identify the lowest level of interchange to which the contents of the magnetic tapes conform. A prerequisite to such conformance is conformance of each volume of the volume set to the same recording method and track format as specified in a standard for information interchange.
2.2
Conformance of an Information Processing System An information processing system conforms to this Standard if it meets all the requirements specified in Section III either for an originating system, or for a receiving system, or for both types of system. A statement of conformance shall identify which of these sets of requirements can be met by the system.
3
4
References ECMA-6:
7-bit Coded Character Set
ECMA-35:
Code Extension Techniques
ECMA-43:
8-Bit Coded Character Set Structure and Rules
Definitions For the purpose of this Standard, the following definitions apply.
4.1
Application Program A program that processes the contents of records belonging to a file, and may also process selected attribute data relating to the file or to the volume(s) on which it is recorded. NOTE 1 An application program is a specific class of user, as defined in this Standard.
4.2
Block A group of bytes recorded consecutively in accordance with the relevant standard for information interchange. NOTE 2 The minimum and maximum lengths of a block are specified in the relevant standard for information interchange.
- 2 -
4.3
Blocked An attribute of records and record segments that indicates that they may begin at a byte that is not the first byte of a block.
4.4
Byte A string of eight binary digits operated upon as a unit.
4.5
File A named collection of information consisting of zero or more records.
4.6
File Section That part of a file that is recorded on any one volume.
4.7
File Set A collection of one or more files recorded consecutively on a set of volumes.
4.8
Fixed-Length Record A record contained in a file in which all records must have the same length.
4.9
Implementation A set of processes within an information processing system which enable that system to behave as an originating system, or as a receiving system, or as both types of system.
4.10
Installation A person or other entity which controls the use of one or more implementations which process and interchange magnetic tapes. NOTE 3 An installation is a specific class of user as defined in this Standard.
4.11
Label A record that identifies and characterizes a volume, or a file section on a volume.
4.12
Originating System An information processing system which can record a file set on a volume set for the purpose of data interchange with another system.
4.13
Originator A person who is responsible for isuing commands to an originating system.
4.14
Receiving System An information processing system which can read a file set from a volume set which has been recorded by another system for the purpose of data interchange.
4.15
Recipient A person who is responsible for issuing commands to a receiving system.
4.16
Record Related data treated as a unit of information.
4.17
Segmented Record A record contained in a file which is assigned to contain records that may have different lengths and that may be recorded entirely in one block or over more than one block.
4.18
Standard for Information Interchange A standard that specifies the recording method and the track format of a magnetic tape.
4.19
Tape Mark A control block used as a delimiter.
- 3 -
NOTE 4 The structure of Tape Marks is specified by the relevant standards for information interchange.
4.20
User A person or other entity that causes the invocation of the services provided by an implementation.
4.21
Variable-Length Record A record contained in a file in which the records may have different lengths.
4.22
Volume A dismountable reel of magnetic tape.
4.23
Volume Set A collection of one or more volumes, on which a file set is recorded.
5
Notation The following notation is sued in this Standard: BP:
Byte position within the label
L:
Length of the file in number of byte positions
a-character(s):
Any of the allowed characters (see 8.1)
With the exception of SPACE, a group of capital letters in the content column of a table specifying label contents indicates that these characters shall apear in the order given and in the corresponding byte positions of the field specified, e.g. VOL in BP 1-3 of the Volume Header Lebels. In the tables and throughout this Standard, SPACE signifies the character coded in position 2/0 of Standard ECMA-6.
Section II 6
Arrangement of Labels and Files
6.1
Arrangement of Data on a Volume A volume shall be recorded with a sequence of blocks and Tape Marks. The sequence shall commence with a block, and shall terminate within the usable recording area.
6.2 6.2.1
Arrangement of Label Groups Labels A label shall be a record that shall have a length of 80 bytes. Each label shall be recorded within the first or only 80 byte positions of a block. If the block contains any additional bytes, they shall be recorded with any desired bit combinations. Each label shall be of one of the following types: Volume Header Installation Volume File Header User File Header End of File End of Volume User File Trailer
6.2.2
Label Sets A sequence of one or more labels of the same type, recorded in consecutive blocks, shall be a label set of that type. All labels in a set shall be numbered consecutively starting from 1, except those labels in User File Header and User File Trailer Label Sets.
- 4 -
The labels in User File Header and User File Trailer Label Sets may be identified in any order and may contain duplicate identifiers within a set. 6.2.3
6.3
Label Groups A label group shall consist of a mandatory label set, optionally followed by a second label set of a different type. Each label group shall be of one of the types listed in the table felow, and shall include only those label sets listed in the corresponding entry of the table. The first set listed in each table entry is the mandatory set, and the second set listed is the optional set. Label Group
Label Sets
Beginning of Volume
Volume Header Installation Volume
Beginning of File Section
File Header User File Header
End of File Section
End of Volume User File Trailer
End of File
End of File User File Trailer
Arrangement of File Sections
6.3.1
File Section A file section shall be recorded in a sequence of one or more blocks, or no blocks. If no blocks are recorded, the file section is regarded as empty.
6.3.2 Labelled-Sequence A Labelled-Sequence shall consist of the sequence of blocks and Tape Marks as listed below, 6.3.2.1 consecutively recorded: − − − − − − 6.3.2.2
Beginning of File Section Label Group; Tape Mark; A file section; Tape Mark; Either an End of File Label Group or an End of File Section Label Group, as required in 6.3.2.2; Tape Mark.
If the file section is the last or only file section of a file, then the label group that follows it shall be an End of File Label Gorup. Otherwise the label group shall be an End of File Section Label Group. NOTE 5 An End of File Section Label Group can only be the last label group on a volume because of the requirements of 6.5.1 below.
6.3.2.3
6.3.2.4
6.4
Within a Labelled-Sequence the information contained in the File Header Label Set, and in the End of File or End of Volume Label Set, shall apply to the file section that is recorded within the sequence. Within a Labelled-Sequence the number of labels in an End of Volume or End of File Label Set shall be equal to the number of labels in the File Header Label Set. Within all Labelled-Sequences in which the file sections of a file are recorded, the number of File Header Labels shall be the same.
Relationship of File Sections to a Volume The information on a volume shall consist of the sequence of blocks and Tape Marks as listed below, consecutively recorded: − Beginning of Volume Label Group; − One or more Labelled-Sequences; − Tape Mark.
- 5 -
Any recording following the last Tape Mark of the sequence shall be ignored in interchange. The information that identifies and describes the volume shall be contained in the Volume Header Label Set, within the Beginning of Volume Label Group.
6.5 6.5.1
Arrangement of Files and File Sets Files If a file is recorded entirely within one volume it shall consist of only one file section. If a file is recorded over more than one volume, then only one file section of the file shall be recorded on any one volume, and: − The first file section shall be recorded as the last or only file section on a volume; − Any intermediate file section shall be recorded as the only file section on a volume; − The last file section shall be recorded as the first or only file section on a volume. All sections of a file shall be numbered consecutively from 1.
6.5.2
File Sets A file set shall consist of one or more files having a common file set identifier. All files in a file set shall be numbered consecutively starting from 1. The files in a file set shall be recorded consecutively over a set of one or more volumes.
6.6
Structure of a Volume Set A volume set shall be the set of volumes on which a file set is recorded. The volume set shall contain only one file set.
7
File Structure for Data Interchange This clause specifies the file structure for data interchange in terms of data blocks and data records, and identifies the label fields defined for that purpose.
7.1 7.1.1
Blocks Characteristics A block in which part of a file section is recorded shall contain one or more Measured Data Units (MDU). Each MDU either shall be a fixed-length record, or shall contain a variable-length record or a record segment. A block in which part of a file section is recorded may contain: − An Offset field preceding the first or only MDU; − A Padding field following the last or only MDU. The first or only MDU in a block shall begin at the first byte of the block after the Offset field (if any). Each subsequent MDU shall begin at the byte immediately following the last byte of the preceding MDU in that block. Each MDU shall end in the block in which it begins.
7.1.2
Block length The length of a block shall be the number of bytes in the block. Within a file, all blocks may have different lengths. The length of a block shall be the sume of: − the lengths of the MDUs in the block; − the length of the Offset field; − the length of the Padding field. A maximum block length shall be assigned for a file. The block length shall not exceed the maximum value specified by the relevant standard for information interchange.
- 6 -
7.1.3
Offset field This field shall consist of not more than 99 bytes. It shall be reserved for implementation use. Its contents are not specified by this Standard and may be ignored in interchange.
7.1.4
Padding field This field shall consist of a number of bytes sufficient to extend the length of a block either i. to the minimum length required by the applicable standard for information interchange, or ii. to a greater length as required by the implementation. Each byte of this Padding field shall contain bit combination b 8 to b 1 = 0101 1110. This field shall be ignored in interchange.
7.2 7.2.1
Records Characteristics A record shall have the following characteristics: − a record may be either a fixed-length record, or a variable-length record, or a segmented record; − a fixed-length record or a variable-length record shall be recorded entirely within one block; a segmented record may be recorded in part of one or more blocks; − the length of a record shall be the number of bytes in the record.
7.2.2
Fixed-length records A fixed-length record shall be a record contained in a file that is assigned to contain records that all must have the same length. The minimum assigned length of a fixed-length record shall be one byte and the maximum assigned length shall not exceed the assigned block length less the length of the Offset field. At least one byte of a fixed-length record shall not contain bit combination b 8 to b 1 = 0101 1110.
7.2.3
Variable-length records A variable-length record shall be a record contained in a file that is assigned to contain records that may have different lengths. A variable-length record shall be contained in an MDU. The MDU shall consist of a Record Control Word (RCW), followed immediately by the variable-length record. The RCW shall consist of four characters which shall be coded according to ECMA-6 and shall express the sum of the lengths of the record and of the RCW as a four-digit decimal number. A maximum record length shall be assigned for a file. The length of any record in the file shall not exceed this value. The assigned maximum record length shall not be zero and shall not exceed the assigned block length less the length of the Offset field and less the length of the RCW. The minimum length of a variable-length record shall be zero.
7.2.4
Segmented records A segmented record shall be a record contained in a file that is assigned to contain records that may have different lengths and that may be recorded entirely in one block or over more than one block. That part of a segmented record that is recorded in one block is a record segment. There shall be only one segment of the same record in a block. Successive segments of the same record within the same file section shall be recorded in successive blocks. Different segments of the same record shall only be recorded in different file sections if one of the segments is recorded in the last block of a file section, and the next segment of the record is recorded in the first block of the next non-empty file section of that file. A maximum record length shall be assigned for a file. The length of any record in the file shall not exceed this assigned value. The assigned maximum record length shall not be zero.
- 7 -
NOTE 6 The assigned maximum record length is unbounded in that this Standard specifies no limit to the number of record segments in a record. A record segment shall be contained in an MDU. The MDU shall consist of a Segment Control Word (SCW), followed immediately by the record segment. The SCW shall consist of five characters which shall be coded according to ECMA-6. The first character of the SCW is called the Segment Indicator. This character shall have one of the values 0, 1, 2 or 3 with the following meaning: 0
shall mean that the record begins and ends in this record segment;
1
shall mean that the record begins but does not end in this record segment;
2
shall mean that the record neither begins nor ends in this record segment;
3
shall mean that the record ends but does not gebin in this record segment.
The last four characters of the SCW shall express as a decimal number the sume of the lengths of the record segment and of the SCW. The length of a record segment shall not exceed the assigned block length less the length of the Offset field and less the length of the SCW. The minimum length of a record segment shall be zero. 7.2.5
7.3
Coded representation of data The contents of each record shall be interpreted according to the relevant international standards for the coded representation of information.
Files
7.3.1
Characteristics A file shall contain either only fixed-length records or only variable-length records or only segmented records.
7.3.2
Consistency of file attributes between file sections The following label fields in the File Header Label Set for each file section of the same file shall contain the same characters: − − − − − − − − − −
7.3.3
8 8.1
File Identifier (HDR1 BP 5-21) File Set Identifier (HDR1 BP 22-27) File Sequence Number (HDR1 BP 32-35) Generation Number (HDR1 BP 36-39) Generation Version Number (HDR1 BP 40-41) File Accessibility (HDR1 BP 54) Record Format (HDR2 BP 5) Block Length (HDR2 BP 6-10) Record Length (HDR2 BP 11-15) Pffset Length (HDR2 BP 51-52)
File Organization The file organization shall be sequential.
Format and Contents of the Labels and Label Sets Character Set and Coding Unless otherwise stated, the characters in the labels shall be coded according to ECMA-6. The 57 characters used in the labels shall be those in the following positions of the International Reference Version (IRV):
- 8 -
2/0 2/5 3/0 4/1 5/0 5/15
to to to to to
2/2 2/15 3/15 4/15 5/10
These 57 characters are referred to as “a-characters” (see Appendix A).
8.2
Justification of Characters In the label fields, characters shall be justified as follows: − In each field the content of which is specified by this Standard to be digits, the digits shall be rightjustified and any remaining positions on the left shall be filled with ZEROs; − In each field the content of which is specified by this Standard to be a-characters, the a-characters shall be left-justified and any remaining positions on the right shall be filled with SPACEs.
8.3
Volume Header Label Set (VOL1 to VOL9) A Volume Header Label Set shall be a label set comprising at least one Volume Header Label and at most nine such labels.
8.3.1
First Volume Header Label (VOL1) The First Volume Header Label shall identify the volume, the owner, the accessibility conditions, the implementation recording the Volume Header Label Set, and the version of this Standard which applies. BP
L
Label Identifier
3
VOL
4
Label Number
1
1
5-10
Volume Identifier
6
a-characters
11
Volume Accessibility
1
a-characters
12-14
(Reserved for future standardization)
13
SPACEs
25-37
Implementation Identifier
13
a-characters
38-51
Owner Identifier
14
a-characters
52-79
(Reserved for future standardization)
28
SPACEs
Label Standard Version
1
4
Fields reserved for future standardization (BP 12-24 and BP 52-79) These fields shall be reserved for future standardization. The characters in these fields shall be SPACEs.
8.3.1.2
Label identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be VOL.
8.3.1.3
Label Number (BP 4) This field shall specify the label number. The character in this field shall be digit ONE.
8.3.1.4
Content
1-3
80
8.3.1.1
Field Name
Volume Identifier (BP 5-10) This field shall specify an identification of the volume. The characters in this field shall be a-characters.
- 9 -
8.3.1.5
Volume Accessibility (BP 11) This field shall specify whether there are installation-specified restrictions under which the volume may be accessed. The character in this field shall be an a-character.
8.3.1.6
SPACE
shall mean that no such restrictions for access to the volume have been agreed between originator and recipient of the volume.
Any other a-character
shall mean that there are particular restrictions for access to the volume that are subject to agreement between originator and recipient of the volume.
Implementation Identifier (BP 25-37) This field shall specify an identification of the implementation that has recorded the Volume Header Label Set. The characters in this field shall be a-characters.
8.3.1.7
Owner Edentifier (BP 38-51) This field shall specify an identification of the owner of the volume. The characters in this field shall be a-characters.
8.3.1.8
Label Standard Version (BP 80) This field shall specify the version of this International Standard to which the volume is expected to conform. The character in this field shall be a digit. shall indicate the present 4 th version of this Standard ECMA-13.
4 8.3.2
Other Volume Header Labels (VOL2 to VOL9) Other Volume Header Labels shall be optional. If present, they shall contain implementation-defined information and shall have the following layout. BP
L
Content
1-3
Label Identifier
3
VOL
4
Label Number
1
Digits 2 to 9
(Reserved for Implementation Use)
76
Not specified
5-80
8.3.2.1
Field Name
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be VOL.
8.3.2.2
Label Number (BP 4) This field shall specify the label number. The character in this field shall be one of the digits TWO to NINE.
8.3.2.3
Field Reserved for Implementation Use (BP 5-80) This field shall be reserved for implementation use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.4
Installation Volume Label Set (UVL1 to UVL9) An Installation Volume Label Set is optional. If present, it shall comprise at least one Installation Volume Label and at most nine such labels. They shall have the following layout.
- 10 -
BP
L
Content
1-3
Label Identifier
3
UVL
4
Label Number
1
Digits 1 to 9
(Reserved for Installation Use)
76
Not specified
5-80
8.4.1
Field Name
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be UVL.
8.4.2
Label Number (BP 4) This field shall specify the label number. The character in this field shall be one of the digits ONE to NINE.
8.4.3
Field Reserved for Installation Use (BP 5-80) This field shall be reserved for installation use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.5
File Header Label Set (HDR1 to HDR9) A File Header Label Set shall be a label set comprising at least two File Header Labels and at most nine such labels.
8.5.1
First File Header Label (HDR1) BP
8.5.1.1
Field Name
L
Content
1-3
Label Identifier
3
HDR
4
Label Number
1
1
5-21
File Identifier
17
a-characters
22-27
File Set Identifier
6
a-characters
28-31
File Section Number
4
Digits
32-35
File Sequence Number
4
Digits
36-39
Generation Number
4
Digits
40-41
Generation Version Number
2
Digits
42-47
Creation Date
6
SPACE, Digits
48-53
Expiration Date
6
SPACE, Digits
54
File Accessibility
1
a-character
55-60
Block Count
6
ZEROs
61-73
Implementation Identifier
13
a-characters
74-80
(Reserved for future standardization)
7
SPACEs
Field reserved for future standardization (BP 74-80) This field shall be reserved for future standardization. The characters in this field shall be SPACEs.
- 11 -
8.5.1.2
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be HDR.
8.5.1.3
Label Number (BP 4) This field shall specify the label number. The character in this field shall be digit ONE.
8.5.1.4
File Identifier (BP 5-21) This field shall specify an identification of the file. The characters is this field shall be a-characters. NOTE 7 Different files in a file set are permitted to have the same File identifier.
8.5.1.5
File Set identifier (BP 22-27) This field shall specify an identification of the file set. The characters in this field shall be a-characters.
8.5.1.6
File Section Number (BP 28-31) This field shall specify the ordinal number of the file section as a four-digit decimal number. The characters in this field shall be digits.
8.5.1.7
File Sequence Number (BP 32-35) This field shall specify the ordinal number of the file in a file set as a four-digit decimal number. The characters in this field shall be digits.
8.5.1.8
Generation Number (BP 36-39) This field shall specify an identification of the generation of the file as a four-digit decimal number from 0001 to 9999. The characters is this field shall be digits. NOTE 8 The Generation Number of a file within a file set is permitted to be the same as that of other files with the same File Identifier in this file set.
8.5.1.9
Generation Version Number (BP 40-41) This field shall specify an identification of the version of the generation of a file as a two-digit decimal number. The characters in this field shall be digits. NOTE 9 The Generation Version Number of a file within a file set is permitted to be the same as that of other files with the same File Identifier and Generation Number in this file set.
8.5.1.10
Creation Date (BP 42-47) This field shall specify the creation date of a file section. The characters in this field shall be SPACE and digits. The first character
shall specify that the most significant two digits of the year are 19 if it is SPACE and are 20 if it is digit ZERO.
The next two characters
shall be digits specifying the two least-significant digits of the year from 00 to 99.
- 12 -
The next three characters
shall be digits specifying the ordinal number of the day as a three-digit decimal number from 001 to 366.
If the last five digits are ZEROs, this shall indicate that the creation date is not specified. 8.5.1.11
Expiration Date (BP 48-53) This field shall specify the earliest date at which the data of the file section may be regarded as obsolete. The characters in this field shall be SPACE and digits. The first character
shall specify that the most significant two digits of the year are 19 if it is SPACE and are 20 if it is digit ZERO.
The next two characters
shall be digits specifying the two least-significant digits of the year from 00 to 99.
The next three characters
shall be digits specifying the ordinal number of the day as a three-digit decimal number from 001 to 366.
If the last five digits are ZEROs, this shall indicate that the expiration date is not specified and that the data may be regarded as obsolete. 8.5.1.12
File Accessibility (BP 54) This field shall specify whether there are installation-specified restrictions under which the file may be accessed. The character in this field shall be an a-character.
8.5.1.13
SPACE
shall mean that no such restrictions for access to the file have been agreed between originator and recipient of the volume.
Any other a-character
shall mean that there are particular restrictions for access to the file that are subject to agreement between originator and recipient of the volume.
Block Count (BP 55-60) This field shall specify a constant value. The characters in this field shall be ZEROs.
8.5.1.14
Implementation Identifier (BP 61-73) This field shall specify an identification of the implementation which recorded the label set. The characters in this field shall be a-characters.
8.5.2
Second File Header Label (HDR2) The Second File Header Label shall specify certain attributes of the file and implementation-defined information.
- 13 -
BP
8.5.2.1
Field Name
L
Content
1-3
Label Identifier
3
HDR
4
Label Number
1
2
5
Record Format
1
F or D or S
6-10
Block Length
5
Digits
11-15
Record Length
5
Digits
16-50
(Reserved for Implementation Use)
35
Digits
51-52
Offset Length
2
Digits
53-80
(Reserved for future standardization)
28
SPACEs
Field reserved for future standardization (BP 53-80) This field shall be reserved for future standardization. The characters in this field shall be SPACEs.
8.5.2.2
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be HDR.
8.5.2.3
Label Number (BP 4) This field shall specify the label number. The character in this field shall be digit TWO.
8.5.2.4
Record Format (BP 5) This field shall specify the format of the records of the file. The character in this field shall be D, F or S.
8.5.2.5
F
shall mean that all records are fixed-length records.
D
shall mean that all records are variable-length records.
S
shall mean that records are segmented records.
Block Length (BP 6-10) This field shall specify the maximum allowed length of a data block of the file as a five-digit decimal number. The characters in this field shall be digits.
8.5.2.6
Record Length (BP 11-15) This field shall specify a five-digit decimal number as follows. The characters in this field shall be digits. If the Record Format field (HDR1 BP 5) contains F, the Record Length field shall specify the length of each data record. If the Record Format field (HDR2 BP 5) contains D, the Record Length field shall specify the maximum length of an MDU in the file. If the Record Format field (HDR2 BP 5) contains S, the Record Length field shall specify the maximum length of a record in the file. This number shall not include the bytes in the Segment Control Words. If all characters are ZEROs, this shall mean that the maximum record length may be greater than 99999 bytes.
- 14 -
8.5.2.7
Field reserved for implementation use (BP 16-50) This field shall be reserved for implementation use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.5.2.8
Offset Length (BP 51-52) This field shall specify the length of the Offset field as a two-digit decimal number. The characters in this field shall be digits.
8.5.3
Other File Header Labels (HDR3 to HDR9) Other File Header Labels shall be optional. If present, they shall contain implementation-defined information and shall have the following layout. BP
L
Content
1-3
Label Identifier
3
HDR
4
Label Number
1
Digits 3 to 9
(Reserved for Implementation Use)
76
Not specified
5-80
8.5.3.1
Field Name
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be HDR.
8.5.3.2
Label Number (BP 4) This field shall specify the label number. The character in this field shall be one of the digits THREE to NINE.
8.5.3.3
Field reserved for implementation use (BP 5-80) This field shall be reserved for implementation use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.6
User File Header Label Set (UHLs) A User File Header Label Set shall be optional. If present, its labels shall have the following layout. BP
3
UHL
4
Label Number
1
a-character
(Reserved for Application Use)
76
Not specified
Label Identifier (BP 1-3) This field shall specify the label identifier.
Label Number (BP 4) This field shall specify the label number. The character in this field shall be an a-character.
8.6.3
Content
Label Identifier
The characters in this field shall be UHL. 8.6.2
L
1-3
5-80
8.6.1
Field Name
Field reserved for application use (BP 5-80) This field shall be reserved for application use.
- 15 -
This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.7
End of Volume Label Set (EOV1 to EOV9) An End of Volume Label Set shall be a label set comprising at least two End of Volume Labels and at most nine such labels.
8.7.1
First End of Volume Label (EOV1) BP
Field Name
L
Content
1-3
Label Identifier
3
EOV
4
Label Number
1
1
5-21
File Identifier
17
a-characters
22-27
File Set Identifier
6
a-characters
28-31
File Section Number
4
Digits
32-35
File Sequence Number
4
Digits
36-39
Generation Number
4
Digits
40-41
Generation Version Number
2
Digits
42-47
Creation Date
6
SPACE, Digits
48-53
Expiration Date
6
SPACE, Digits
54
File Accessibility
1
a-character
55-60
Block Count
6
Digits
61-73
Implementation Identifier
13
a-characters
74-80
(Reserved for future standardization)
7
SPACEs
Within a Labelled-Sequence the contents of the fields of this label shall be identical with the contents of the corresponding fields in the First File Header Label, except for the following fields. 8.7.1.1
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be EOV.
8.7.1.2
Block Count (BP 55-60) This field shall specify as a six-digit decimal number the number of blocks in which the file section is recorded. The characters in this field shall be digits.
8.7.1.3
Implementation Identifier (BP 61-73) This field shall specify an identification of the implementation which recorded the label set. The characters in this field shall be a-characters.
- 16 -
8.7.2
Second End of Volume Label (EOV2) BP
Field Name
L
Content
1-3
Label Identifier
3
EOV
4
Label Number
1
2
5
Record Format
1
F or D or S
6-10
Block Length
5
Digits
11-15
Record Length
5
Digits
16-50
(Reserved for Implementation Use)
35
Not specified
51-52
Offset Length
2
Digits
53-80
(Reserved for future standardization)
28
SPACEs
Within a Labelled-Sequence the contents of the fields of this label shall be identical with the contents of the corresponding fields of the Second File Header Label, except for the following fields. 8.7.2.1
Label identifier (BP 1-3) This field shall specify the label identifier, The characters in this field shall be EOV.
8.7.2.2
Field reserved for implementation use (BP 16-50) This field shall be reserved for implementation use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.7.3
Other End of Volume Labels (EOV3 to EOV9) Other End of Volume Labels shall be optional. If present, they shall contain implementation-defined information and shall have the following layout. BP
L
Content
1-3
Label Identifier
3
EOV
4
Label Number
1
Digits 3 to 9
(Reserved for Implementation Use)
76
Not specified
5-80
8.7.3.1
Field Name
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be EOV.
8.7.3.2
Label Number (BP 4) This field shall specify the label number. The characters in this field shall be one of digits THREE to NINE.
8.7.3.3
Field reserved for implementation use (BP 5-80) This field shall be reserved for implementation use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.8
End of File Label Set (EOF1 to EOF9) An End of File Label Set shall be a label set comprising at least two End of File Labels at at most nine such labels.
- 17 -
8.8.1
First End of File Label (EOF1) BP
Field Name
L
Content
1-3
Label Identifier
3
EOF
4
Label Number
1
1
5-21
File Identifier
17
a-characters
22-27
File Set Identifier
6
a-characters
28-31
File Section Number
4
Digits
32-35
File Sequence Number
4
Digits
36-39
Generation Number
4
Digits
40-41
Generation Version Number
2
Digits
42-47
Creation Date
6
SPACE, Digits
48-53
Expiration Date
6
SPACE, Digits
54
File Accessibility
1
a-character
55-60
Block Count
6
Digits
61-73
Implementation Identifier
13
a-characters
74-80
Reserved for future standardization)
7
SPACEs
Within a Labelled-Sequence the contents of the fields of this label shall be identical with the contents of the corresponding fields in the First File Header Label, except for the following fields. 8.8.1.1
Label identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be EOF.
8.8.1.2
Block Count (BP 55-60) This field shall specify as a six-digit decimal number the number of blocks in which the file section is recorded. The characters in this field shall be digits.
8.8.1.3
Implementation Identifier (BP 61-73) This field shall specify an identification of the implementation which recorded the label set. The characters in this field shall be a-characters.
- 18 -
8.8.2
Second End of File Label (EOF2) BP
Field Name
L
Content
1-3
Label Identifier
3
EOF
4
Label Number
1
2
5
Record Format
1
F or D or S
6-10
Block Length
5
Digits
11-15
Record Length
5
Digits
16-50
(Reserved for Implementation Use)
35
Not specified
51-52
Offset Length
2
Digits
53-80
(Reserved for future standardization)
28
SPACEs
Within a Labelled-Sequence the contents of the fields of this label shall be identical with the contents of the corresponding fields in the Second File Header Label, except for the following fields. 8.8.2.1
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be EOF.
8.8.2.2
Field reserved for implementation use (BP 16-50) This field shall be reserved for implementation use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.8.3
Other End of File Labels (EOF3 to EOF9) Other End of File Labels shall be optional. If present, they shall contain implementation-defined information and shall have the following layout. BP
L
Content
1-3
Label Identifier
3
EOF
4
Label Number
1
Digits 3 to 9
(Reserved for Implementation Use)
76
Not specified
5-80
8.8.3.1
Field Name
Label Identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be EOF.
8.8.3.2
Label Number (BP 4) This field shall specify the label number. The characters in this field shall be one of digits THREE to NINE.
8.8.3.3
Field reserved for implementation use (BP 5-80) This field shall be reserved for implementation use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
8.9
User File Trailer Label Set (UTL) A User File Trailer Label Set shall be optional. If present, its labels shall have the following layout.
- 19 -
BP
L
Content
1-3
Label Identifier
3
UTL
4
Label Number
1
a-character
(Reserved for Application Use)
76
Not specified
5-80
8.9.1
Field Name
Label identifier (BP 1-3) This field shall specify the label identifier. The characters in this field shall be UTL.
8.9.2
Label Number (BP 4) This field shall specify the label number. The character in this field shall be an a-character.
8.9.3
Field reserved for application use (BP 5-80) This field shall be reserved for application use. This Standard neither specifies nor restricts the bit combinations which may be recorded in this field, nor does it specify any meaning for these bit combinations.
9
Levels of Interchange This Standard specifies four nested levels of interchange. At all levels labels specified as optional by this Standard may be recorded. These labels may be ignored in interchange.
9.1
Level 1 At Level 1 the following restrictions shall apply: − a volume set shall contain only one file, and − all records in the file shall be fixed-length records.
9.2
Level 2 At Level 2 the following restriction shall apply: − all records in any file shall be fixed-length records.
9.3
Level 3 At Level 3 the following restriction shall apply: − all records in any file shall be either fixed-length records or variable-length records.
9.4
Level 4 At level 4 no resprictions apply.
- 20 -
Section III 10
Requirements for the Description of Systems Clauses 11 and 12 of this Standard specify that certain information shall be communicated between an application program and an implementation, or between an installation and an implementation. An information processing system that conforms to this Standard shall be the subject of a description which identifies the means by which the user may supply such information, or may obtain it when it is made available, as specified in these clauses.
11
Requirements for an Originating System
11.1
General The implementation in an originating system shall be capable of recording a file set, and all labels that are not specified in this Standard to be optional, on a volume set in accordance with one of the interchange levels specified in clause 9 of this Standard. The implementation shall not be required to record any labels that are specified in this Standard to be optional.
11.2
Files The implementation shall obtain from the application program the records that constitute the files of the file set to be recorded. The implementation shall obtain from the application program the length of each record in the file. NOTE 10 An RCW or SCW does not form part of a record.
11.3 11.3.1
Labels The implementation shall allow the installation to supply the information that is to be recorded in each of the label fields listed below, and shall supply the information for a field if the installation does not supply. For each volume in the volume set: − Volume Identifier − Volume Accessibility
VOL1 BP 5-10 VOL1 BP 11
For each file in the file set: − File Accessibility 11.3.2
HDR1 BP 54
If the implementation allows the installation to supply the information that is to be recorded in any of the label fields listed below, then the implementation shall record such information as supplied by the installation, and shall supply the information if the installation does not supply it. For each volume in the volume set: − Owner Identifier
VOL1 BP 38-51
For each file in the file set: − File Set Identifier 11.3.3
HDR1 BP 22-27
The implementation shall allow the application program to supply the information that is to be recorded in each of the label fields listed below, and shall supply the information for a field if the application program does not supply it. For each file in the file set: − File Identifier − Record Format − Block Length
HDR1 BP 5-21 HDR2 BP 5 HDR2 BP 6-10
- 21 -
− Record Length 11.3.4
HDR2 BP 11-15
If the implementation allows the application program to supply the information that is to be recorded in any of the label fields listed below, then the implementation shall record such information as supplied by the application program, and shall supply the information if the application program does not supply it. For each file in the file set: − Generation Number − Generation Version Number
HDR1 BP 36-39 HDR1 BP 40-41
For each file section in the file set: − Creation Date − Expiration Date 11.3.5
HDR1 BP 42-47 HDR1 BP 48-53
If the implementation is capable of recording an Installation Volume Label Set, then the implementation shall allow the installation to supply the information that is to be recorded in the label fields listed below for that label set, and shall not be required to record the corresponding label if the installation does not supply the information. For each label in an Installation Volume Label Set recorded on any volume in the volume set: − Reserved for Installation Use
BP 5-80
NOTE 11 If any label in an Installation Volume Label Set is not recorded, the clause 6.2.2 of this Standard requires that no higher numbered labels in the set shall be recorded. 11.3.6
If the implementation is capable of recording a User Header or a User Trailer Label Set, then the implementation shall allow the application program to supply the information that is to be recorded in the label fields listed below for that label set, and shall not be required to record the corresponding label if the application program does not supply the information. For each label in a User Header and a User Trailer Label Set that forms part of any Labelled-Sequence on a volume: − Label Number − Reserved for Application Use
11.4
BP 4 BP 5-80
Restrictions The implementation may apply restrictions on the information supplied by the user in the Record Length field (HDR2 BP 11-15) as follows: If the records in a file are segmented records the implementation may impose a limit on the maximum record length. This limit shall not be less than the maximum assignable block length, less the length of the Offset field, less the length of the SCW. If the records in a file are variable-length records the implementation may assign a maximum record length equal to the assigned maximum block length, less the length of the Offset field, less the length of the RCW.
12 12.1
Requirements for a Receiving System General The implementation in a receiving system shall be capable of reading a file set, and all recorded labels, from a volume set that has been recorded in accordance with one of the interchange levels specified in clause 9 of this Standard. The implementation may ignore the information from any labels that are specified in this Standard to be optional.
- 22 -
12.2
Files The implementation shall make available to the application program the records that constitute the files of the recorded file set. The implementation shall make available to the application program the length of each record in the file. NOTE 12 An RCW or SCW does not form part of a record.
12.3 12.3.1 12.3.2
Labels The implementation shall allow the user to supply information sufficient to enable the implementation to locate the files required by the user, and to locate the volumes on which these files are recorded. The implementation shall make available to the installation the information that is recorded in each of the label fields listed below. For each volume in the volume set: − Volume Identifier − Volume Accessibility
VOL1 BP 5-10 VOL1 BP 11
For each file in the file set: − File Accessibility 12.3.3
The implementation shall make available to the application program the information that is recorded in each of the label fields listed below. For each file in the file set: − − − −
12.3.4
HDR1 BP 54
File Identifier Record Format Block Length Record Length
HDR1 BP 5-11 HDR2 BP 5 HDR2 BP 6-10 HDR2 BP 11-15
the implementation shall not be required to make available to the user the information that is recorded in each of the label fields listed below. For each volume in the volume set: − Owner Identifier
VOL1 BP 38-51
For each file in the file set: − File Set Identifier − Generation Number − Generation Version Number
HDR1 BP 22-27 HDR1 BP 36-39 HDR1 BP 40-41
For each file section in the file set: − Creation Date − Expiration Date 12.3.5
If the implementation is capable of making available to the user the information that is recorded in an Installation Volume Label Set, it shall make available to the installation the information that is recorded in each of the label fieds listed below. For each recorded label in an Installation Volume Label Set on any volume in the volume set: − Reserved for Installation Use
12.3.6
HDR1 BP 42-47 HDR1 BP 48-53
BP 5-80
If the implementation is capable of making available to the user the information that is recorded in a User Header or a User Trailer Label Set, it shall make available to the application program the information that is recorded in each of the label fields listed below. For each recorded label in a User header and a User Trailer Label Set that forms part of any LabelledSequence on a volume: − Label Number
BP 4
- 23 -
− Reserved for Application Use
12.4
BP 5-80
Restrictions If the records in a file are segmented records, the implementation may impose a limit on the length of a record in the file. This limit shall not be less than the maximum assignable block length, less the length of the Offset field, less the length of the SCW. The implementation is not required to make available to the application program any byte beyond the first n bytes of the record, where n is the value of the imposed limit.
- 24 -
- 25 -
Appendix A IRV Code Table from ECMA-6 b7 0 0 0 0 1 1 b6 0 0 1 1 0 b5 0 1 0 1 0
0
1
1 1 1 1 0 1
0 1 2 3 4 5 6 7 p 0 0 0 0 0 NUL DLE SP 0 @ P 0 0 0 1 1 SOH DC1 ! 1 A Q a q 0 0 1 0 2 STX DC2 " 2 B R b r 0 0 1 1 3 ETX DC3 3 C S c s 0 1 0 0 4 EOT DC4 ¤ 4 D T d t 0 1 0 1 5 ENQ NAK % 5 E U e u 0 1 1 0 6 ACK SYN & 6 F V f v 0 1 1 1 7 BEL ETB ' 7 G W g w 1 0 0 0 8 BS CAN ( 8 H X h x 1 0 0 1 9 HT EM ) 9 I Y i y 1 0 1 0 10 LF SUB * : J Z j z 1 0 1 1 11 VT ESC + ; K k 1 1 0 0 12 FF IS4 , < L l m 1 1 0 1 13 CR IS3 - = M n 1 1 1 0 14 SO IS2 . > N 1 1 1 1 15 SI IS1 / ? O _ o DEL '
b4 b3 b2 b1
98-0077-A
The a-characters are those which are not shaded in the above table.
- 26 -
- 27 -
Appendix B
Initialized Volumes
B.1
Purpose A installation which originates recorded magnetic tapes for information interchange will need to have available a supply of magnetic tape volumes which are ready to be recorded with interchange file sets. Such volumes will typically be unrecorded, or will contain only data that need not be retained. File sets can then be recorded on some of these volumes when the need for data interchange arises. At an installation, the administration of these magnetic tape volumes can be simplified if appropriate volume identification details are already recorded in the first label group on each volume, although no valid file sections are recorded on the volumes. A volume recorded in this way is known as an initialized volume. If initialized volumes and data interchange volumes are handled by common administrative arrangements, it may be convenient if the specification of an initialized volume can be closely related to the specification of an interchange volume. For this purpose a recommended specification for an initialized volume is provided below. The specification makes use only of elements already specified in the body of this Standard, but is not part of the Standard itself.
B.2
Specification The data on an initialized volume shall consist of the sequence of blocks and Tape Marks as listed below, consecutively recorded: − Beginning of Volume Label Group − two Tape marks. Any information that is recorded following the second Tape Mark of the sequence may be ignored.
- 28 -
- 29 -
Appendix C
Main Differences between the 3 rd and the 4 th Editions
C.1
The structure and text of the specifications have been completely revised to improve the clarity and to correspond to the style of ECMA-91.
C.2
The requirements for information processing systems and the requirements for sets of magnetic tape volumes for interchange have been placed in distinct sets of clauses, each with corresponding definitions of conformance.
C.3
Up to eight additional Volume Header Labels may optionally be recorded on a magnetic tape volume, identified by VOL2 to VOL9.
C.4
HDR2, EOV2 and EOF2 labels are now required also at Level 1 and Level 2.
C.5
The contents of a file may consist of the coded representations of any type of information for which an international standard exists, and is no longer restricted to coded character sets conforming to ECMA-6.
C.6
The responsibility for the selection and interpretation of the contents of the Accessibility fields is now clearly assigned to the installation.
C.7
An Appendix B, not part of the Standard, recommending a format for initialized volumes not yet recorded with data for interchange has been added.
.
Printed copies can be ordered from: ECMA 114 Rue du Rhône CH-1204 Geneva Switzerland Fax: Internet:
+41 22 849.60.01 [email protected]
A description of this Standard can be found on the ECMA web site. www.ecma.ch. From there, files E013-DOC.EXE (MSWord, self-expanding) and E013-PDF.PDF (Acrobat PDF) can be freely downloaded. The ECMA web site, http://www.ecma.ch, gives full information on ECMA, ECMA activities, ECMA Standards and Technical Reports.
ECMA 114 Rue du Rhône CH-1204 Geneva Switzerland This Standard ECMA-13 is available free of charge in printed form and as a file. See inside cover page for instructions.