title>GB/T 4092.4-1992 Programming language COBOL Sequential IO module - GB/T 4092.4-1992 - Chinese standardNet - bzxz.net
Home > GB > GB/T 4092.4-1992 Programming language COBOL Sequential IO module
GB/T 4092.4-1992 Programming language COBOL Sequential IO module

Basic Information

Standard ID: GB/T 4092.4-1992

Standard Name: Programming language COBOL Sequential IO module

Chinese Name: 程序设计语言COBOL 顺序I-O模块

Standard category:National Standard (GB)

state:in force

Date of Release1992-08-04

Date of Implementation:1993-05-01

standard classification number

Standard ICS number:Information technology, office machinery and equipment >> 35.060 Languages ​​for information technology

Standard Classification Number:Electronic Components and Information Technology>>Information Processing Technology>>L74 Programming Language

associated standards

alternative situation:GB 4092.4-1983

Procurement status:ISO 1989-7-1985,EQV

Publication information

other information

Release date:1983-12-26

Review date:2004-10-14

Drafting unit:Nanjing University

Focal point unit:National Information Technology Standardization Technical Committee

Publishing department:State Bureau of Technical Supervision

competent authority:National Standardization Administration

Introduction to standards:

GB/T 4092.4-1992 Programming language COBOL Sequential IO module GB/T4092.4-1992 Standard download decompression password: www.bzxz.net

Some standard content:

National Standard of the People's Republic of China
Programming language LOBOL
Sequential 1-0 module
Programming language COBOL
Sequential [-O module
GB/T4092.4—92
Substitute GB4092.4—83
1.1 Function
The Sequential 10 module provides the function of accessing file records in the established sequence. This sequence is established by writing records to the file. 1.2 Level characteristics
For each item in the file control section, file description section and IO-CONTROI. section, the 1st level sequence I- provides local functions. In the procedure section, the 1st level sequential IC provides partial functionality for CLOSE, OPEN, READ, USE, and WRITE statements, and provides full functionality for READ and REWRITE statements. The 2nd level sequential IO provides full functionality for the file control section, file description section, and each section in the IO-CONTROL section. In the procedure section, the 2nd level sequential IO provides full functionality for CLOSE, OPEN, READ, REWRITE, USE, and WRITE statements. 1.3 Language Concepts
1.3.1 Organization
Sequential files are organized so that each record in the file, except the last record, has a unique successor record, and each record, except the first record, has a unique predecessor record. These predecessor and successor relationships are established in the order of WRITE statements when the file is created. Once this predecessor and successor relationship is established, it cannot be changed except when adding records at the end of the file. A sequentially organized mass storage file has the same logical structure as a file on any sequential media; however, a sequential mass storage file may be updated as needed. When this technique is used, no new records may be added to the file and each replaced record shall be the same length as the original record.
1.3.2 Access Mode
In sequential access mode, records are accessed in the order in which they were originally written to the file. 1.3.3 Current Volume Pointer
The current volume pointer is a conceptual entity used in this standard to facilitate the identification of the current physical volume of a sequential file. The state of the current volume pointer is affected by the CLOSE, OPEN, RECALL, and WRITE statements. 1.3.4 File Position Indicator
The file position indicator is a conceptual entity used in this standard to facilitate the identification of the next record to be accessed in a given file during an input/output operation. The value to which the file position indicator is set is affected only by CLOSEUPEN and READ statements. For files opened in output mode or extended mode, the concept of a file position indicator is meaningless. 1.3.51-0 Status
The IO status is a two-character conceptual entity whose value indicates the status during the execution of a CLOSE, OPEN, READ, REWRITE, or WRITE statement, the status before the execution of any command statement associated with the IO statement, or the status before the execution of any applicable USEAFTER STANDARD EXCEPTION procedure tree line. In a COBOL program, the value of the IO status is used by using the FILE STATUS clause in the file's control clause. The IO status also determines whether an applicable USEAFTER STANDARD EXCEPTION procedure is executed. If the conditions encountered are not those covered under the heading "SUCCESSFUL COMPLETION", such procedures are executed according to the rules described elsewhere. If the conditions encountered are those covered under the heading "SUCCESSFUL COMPLETION", such procedures are not executed (see 4.6 USE Statement). Certain classes of 1-0 status values ​​indicate critical error conditions. These are: error conditions beginning with the digits 3 or 4 and any error condition beginning with the digit 9 defined by the implementer as critical. If the I-0 status value of an input-output operation indicates such an error condition, the implementer determines the action to be taken after executing any applicable USEAFTERSTANDARDEXCEPTION procedures. If none of the above procedures are available, the implementer determines that an input-output control system error has occurred. What action is taken after the error standard is handled. The I-{) state indicates one of the following conditions based on the completion of the input and output operation: (1) Successful completion. The input and output statement is executed successfully. (2) Reached the end. The sequential READ statement is not executed successfully because the terminal condition is met. (3) Permanent error. The input and output statement is not executed successfully because an error occurs that prevents further processing of the file. Execute any specified exception procedures. If there is no call to the implementer-defined technique to correct the permanent error condition, the condition remains valid during the remaining input and output operations.
(4) Logical error. The input and output statement is not executed successfully because a series of inappropriate input and output operations are performed on the file or user-defined restrictions are violated. ||tt| |(5) Implementer defined. The input/output statement was not successfully executed because some implementer defined condition was met. The following are the I-0 status values ​​for the above conditions, which are generated after an input/output operation is performed on a sequential file. If more than one value applies: the implementer determines which of the available values ​​in the IO status is used. (1) Successful completion
. 1-0 status = 00. The input/output statement was successfully executed and no further information about the input/output operation is available. b, IO status = 14. The READ statement was successfully executed, but the length of the currently processed record is inconsistent with the inherent size of the corresponding file.
c I-0 status = 05. The OPEN statement was successfully executed, but when the OPEN was executed. Reference The optional volume referenced is not present. If the open mode is 1-0 or extended, the volume has already been created. d, 1-O status = 07. An input/output statement was successfully executed, except that, for a CLOSE statement with the phrase NOREWINDREEL/UNIT or FORREMOVAI. or for an OPEN statement with the phrase NOREWIND, the referenced volume is located on non/unit media.
(2) Unsuccessful termination of terminal condition
a. 1-0 status = 10. While a sequential READ statement is being executed, the next sequential record does not exist for the following reasons: 1) The end of the volume has been reached: or
2) The first attempt to execute a sequential READ statement on an optional input volume that does not appear. 3) Unsuccessful termination of permanent error conditiona.: 1-0 status = 30. A permanent error has occurred and no further information is available regarding the input/output operation. bI-0 status = 34. Permanent error due to illegal boundaries An attempt was made to write outside the externally defined boundaries of a sequential file. The implementation specifies how these boundaries are defined. :I-State = 35. A permanent error occurs if an OPEN statement with the INPUT, IO, or EXTEND phrase is executed on a non-optional file and the file does not exist. dI-O State = 37. A permanent error occurs because the OPEN statement attempts to operate on a file that does not support the open mode specified in the OPEN statement. Possible error scenarios are: 1) The EXTEND or OUTPUT phrase is specified but the file does not support write operations. 2) The 1-0 phrase is specified but the file does not support the input and output operations allowed by a sequential file opened in 1-0 mode. GB/T 4092: 4—92
3) The INPUT phrase is specified but the file does not support read operations. e.1-0 State = 38. A permanent error occurs because an OPEN statement attempts to operate on a file that is locked. rI-0 state = 3. OPEN was unsuccessful because a conflict was detected between the inherent file attributes and the properties specified for the file in the program.
(4) Logical error condition for unsuccessful termination. 1-O state = 41. An attempt was made to execute an OPEN statement for a file in open mode. b, IO state = 42. An attempt was made to execute a CLOSE statement for a file that was not in open mode. c, IO state = 43. For a mass storage file in sequential access mode, the last input/output statement executed for the relevant file before the REWRITE statement was executed was not a successfully executed READ statement. d.I-0 status = 44. Illegal boundary condition due to 1) an attempt to write or overwrite a record whose length is greater than the maximum length allowed in the RECORDISVARYING clause of the associated file name, or less than the minimum length allowed. 2) an attempt to overwrite a record of a sequential file whose length is not equal to the length to be replaced. IO status = 46. An attempt to execute a sequential READ statement on a file opened in input-output mode or IO mode and a valid next record has not been established due to e.
the following reasons: 1) the previous READ statement was unsuccessful but did not produce a terminal condition, or 2) the previous READ statement did not produce a terminal condition. f. IO status = 47. An attempt to execute a READ statement on a file that was not opened in input mode or IO mode. .g. IO status = 48. An attempt to execute a WRITE statement on a file that was not opened in output or extended mode. h. IO status 49. An attempt to execute a REWRITE statement on a file that was not opened in I-O mode; (5) an implementer-defined unsuccessful terminal condition. : IO status = 9x. An implementer-defined condition exists. This condition cannot be repeated with any of the 1-0 status values ​​00 to 49. The value of × is implementer-defined.
1.3.6 Terminal Condition
A terminal condition can occur as a result of executing a READ statement (see 4.4 READ Statement). 1.3.7 File Attribute Conflict Conditions
After executing an OPEN, REWRITE, or WRITE statement, a file attribute conflict condition may occur. When a file attribute conflict condition occurs, the input and output statements that recognize this condition are executed unsuccessfully and the file is not affected (see 1.30 PEN statement: 4.5 REWRITE statement and 4.7 WRITE statement. After the file attribute conflict condition is recognized, these actions are performed in the following order: (1) The I-0 status associated with the file name is assigned to indicate the file attribute conflict condition (see 1.3.5 1-0 status). (2) The USEAFTEREXCEPTION procedure associated with the file name (if any) is executed. 1.3.8 Special register LINAGE-COUNTER The reserved word LINAGE-COUNTER is the name of the one-thousand line counter generated when the LINAGE clause appears in the file description (see 3.7 LINAGE clause). It implicitly describes an unsigned integer whose size is equal to the value of the LINAGE clause. The size of integer 1 in or the size of the data item referenced by data name 1. LINAGE-COUNTER can only be referenced in statements in the procedure section, however, only the input-output control system can change the value of LINAGE-COUNTER. 2 Sequence 1-0 Module Environment Section
2.1 Input-Output Section
The input-output section is located in the environment section of the source program. The information involved in the input-output section is the information required to control the data transfer and data processing between the external media and the target program. The input-output section is optional in the environment section of the COBOL source program. The general format of the input-output section is as follows: GB/T4092.4—92
INPUT-OUTPUTSECTION
FILE-CONTROL..File Control Section}
[IO-CONTROL.Input and Output Control Section I2.2 FILE-CONTROL. Section
2.2.1 Function
The FILE-CONTROL section allows the information associated with the file tree to be specified. 2.2.2 General format
FILE-CONTROL.{meaning volume control clause
2.3 File control clause
2.3.1 Function
The file control clause describes the relevant physical properties of a sequential file. 2.3.2 General format
SELECT[OPTIONAL]』] File name 1
Implementation name 1
Character value 1
RESERVF integer 1
ASSIGN TO
[LORGANIZATION ISISEQUENTIAL]【Data name 1]
PADDINGCHARACTERIS
Character value 2
RECORDDELIMITERIS
STANDARD-1
Implementation name 2
[ACCESS MODE IS SEQUENTIAL.][FILESTATUSISData name 21
2.3. 3 Syntax rules
(1) The SELECT clause must be specified first in the file control clause. The clauses following the SEI.FCT clause can appear in any order.
(2) Each file name described in the data part must be named only once in the FTLE-CONTRCOI. segment. Each file name described in the SELECT clause must have a file description clause in the data part. (3) Word value 1 must be a non-numeric word value and cannot be a symbolic constant. The meaning and rules of the content allowed by implementation name 1 and the value of word value 1 are defined by the implementer.
2. 3. 4 General Rules
. (1) If the file connector referenced by file name 1 is an external file connector (see 4.5 EXTERNAL clause in GB/T 4092.12), then all file control clauses in the operation unit that reference that file connector must: a. Have the same description of the OPTIONA1. phrase. Have a consistent description of implementation name 1 or value 1 in the ASSIGN clause. The implementer specifies consistent rules for implementation name 1 or value 1.
E. Have a consistent description of implementation name 2 in the RECORDER)DELIMITER clause. The implementer specifies consistent rules for implementation name 2.
Have the same value for integer " in the RESERVE clause.
D.
Companion organization.
F. The same access method.
GB/T 4092. 4-92
gThe same statement applies to the PADDINGCHARACTER clause. (2) The OPTIONA1 phrase applies only to files opened in input, I-0, or extended mode. This phrase is necessary for files that are not necessarily referenced each time the target program is run. (3) The ASSIGN clause specifies the association between the file referenced by the file name 1 and the storage medium referenced by the implementation name 1 or word value 1. (A) ACCESS MODE clause, FILE STATUS clause, ORGANIZATION IS SEQUENTIAL clause. The PADDINGCHARACTER clause, RECORDDELIMITER clause, and RESERVE clause are listed in alphabetical order.
2.4 ACCESS MODF clause
2.4.1 Function
The ACCESSMODE clause specifies the order in which records in a file are to be accessed. 2.4.2 General Rules
ACCESSMODEISSEQUENTIAL
2.4.3 General Rules
(1) If the ACCESS MODE clause is not specified, sequential mode is assumed.(2) The file access order specifies the order in which records in the file are accessed. For sequential files, this order is determined by the precedent-successor relationship established by the WRITE statement when the file is created or extended.(3) If the associated file connector is an external file connector, each file control descriptor associated with that file connector in the run unit must specify the same access mode. 2.5 FILESTATUS Clause
2.5.1 Function
The FILE STATUS clause specifies:· A data item containing input and output status. 2.5.2 General format
FILE STATLS IS dataname1
2.5.3 Syntax rules
(1) dataname1 can be restricted.
(2) dataname1 must be defined as a two-character data item of type character in the data section. It cannot be defined in the FILE section, REPORT section, or COMMUNICATION section.
2.5.4 General rules
(1) If the FILE STATUS clause is specified, the value of the data item referenced by dataname1 also changes to contain the value of 1.0 status. This value indicates the status after the statement is executed (see 1.3.51 0 status). (2) The data item referenced by dataname 1 is specified in the file control description clause associated with the input and output statement.
2.6 ORGANIZATION IS SEQUENTIAL. Clause 2.6.1 Function
The (ORGANIZATION_T)ISSEQUENTIAL. clause specifies that the logical structure of the file is a sequential organization. 2.6.2 General format
I ORGANIZATION IST SEQUENTIAL 2.6.3 General rules
(1) The DRGANISSEQUENTIAL. clause specifies that the logical structure of the file is a sequential organization. The file organization is established when the file is created and cannot be changed.
(2) A sequential organization is a permanent logical structure of a file, and the position of a record in that logical structure is identified by a precedence relationship, which is established when the record is inserted into the file. (3) If ORGANIZATIONISSEQUENTIAL is not specified, a sequential organization is implied. 2.7 PADDINGCHARACTER clause
2.7.1 Function
The PADDINGCHARACTER clause specifies the character used in the padding block of a sequential file. 2.7.2 General format
PADDINGCHARACTER IS
2.7.3 Syntax rules
[data name 1]
(word value 1
(1)word value 1 must be a single-character word value other than a word value: (2)Data name 1 can be restricted:
(3)Data name 1 must be defined as a single-character data item of character type in the data section and cannot be defined in the COMMUNICATION section, FILE section, or REPORT section. 2.7.4 General rules
(1)PADDING CHARACTER The PADDINGCHARACTER clause specifies the characters used in padding blocks of sequential files. During input operations, any block beyond the last logical record or consisting entirely of filler characters is skipped. During input operations, logical records consisting only of filler characters are skipped. During output operations, any block beyond the last logical record is filled with filler characters. (2) If the PADDINGCHARACTER clause is not applicable to the device type assigned to the file, filler characters are not generated or recognized.
(3) Data items referenced by word value 1 or data name 1 are used as filler characters during the execution of the OPEN statement that creates the file. Fill The filler character is a fixed attribute of the file.
(4) If the CODE-SET clause is specified for the file, the filler character specified by the value of word 1 or the contents of dataname 1 is converted when the file is opened.
(5) If the PADDINGCHARACTER clause is not specified, the value used as the filler character is defined by the implementor. (6) If the associated file connector is an external file connector, all PADDINGCHARACTER clauses associated with that file connector in the run unit have the same specification. If dataname 1 is specified, it must refer to an external data item. 2.8 RECORD DELIMITER clause
2.8.1 Function
The RECORDDELIMITER clause specifies how the length of a variable-length record is determined on external media. 2.8.2 General format
RECORD DELIMITER IS
[STADNARD-1
[Implementation name 1
2.8.3 Syntax rules
GB/T 4092.4 --92
(1) The RECORDDELIMITER clause can only be specified for variable-length records. (2) If the STANDARD-1 phrase is specified, the external medium must be a tape file. 2.8.4 General Rules
(1) The RECORDDELIMITER clause is used to specify the method for determining the length of variable-length records on the external medium. Any method used does not reflect the size of the record area or record used in the program. (2) If the STANDARD-1 phrase is specified, the method for determining the length of variable-length records is as described in GB7574 "Magnetic Tape Labels and File Structures for Information Processing Interchange". (3) If the implementation name 1 phrase is specified, the method for determining the length of variable-length records is related to the implementation name 1 defined by the implementer. (4) If the RECORDDELIMITER clause is not specified, the method for determining the length of variable-length records is specified by the implementer. (5) After the OPEN statement is successfully executed, the record delimiter is the delimiter specified in the RECORIDDELIMITER clause of the file control descriptor associated with the file name specified in the OPEN statement. (6) If the associated file connector is an external file connector, all RECORDDELIMITER clauses associated with that file connector in the run unit must have the same description. 2.9RESERVE Clause
2.9.1 Function
The RESERVE clause allows the user to specify the number of allocated input and output storage areas. 2.9.2 General Format
┌ARFA
RESERVE integer 1
2.9.3 General Rules
(I)The RESERVE clause allows the user to specify the number of allocated input and output storage areas. If the RESERVE clause is specified, the number of allocated input and output storage areas is equal to the integer 1. If the RESERVE clause is not specified, the number of allocated input and output storage areas is specified by the implementer.
2.10 IO-CONTROL segment
2. 10.1 Function
The IO-CONTROL segment specifies the reset point, the storage area shared by different files and the location of each file on a multi-file system. In this version of standard COBOL, the RERUN clause and the MULTIPLEFILETAPE clause of the IO-CONTROL segment are considered obsolete components because they will be deleted in future revisions of standard COBOL. 2.10.2 Format
I O-CONTROL
1 document name 1
F[RERUNON,
implementation name
EEND OF
[UNIT』OF document name 2
integer 1 RECORDS
i integer 2 CLOCK-UNITS
condition name】
[SAMERECORD]]AREAFOR document name 3(document name 4)-..[MULTIPLEFILETAPECONTAINSI document name 5[POSITION integer 3]]]
2.10. 3 Syntax rules
(1) The order in which clauses appear is important. 2-10.4---General Rules
GB/T4092.4—92
(1) MULTIPLEFILETAPE Clause The RERUN clause and the SAME clause are listed in alphabetical order. 2.11 MULTIPLEFILETAPE Clause
2.11.1 Function
The MULTIPLEFILETAPE clause specifies the location of a file on a multifile volume. The MULTIPLEFILETAPE clause is considered obsolete in this version of the standard because it will be deleted in future revisions of the COBOL standard. 2-11-2-Format
MULTIPLE FILE TAPE CONTAINS(file name 1[POSITION integer 1]...-2. 11. 3 General Rules
(1) The MULTIPLEFILETAPE clause is required when more than one file shares the same physical volume. Only those files used in the target program need be specified, regardless of the number of files on a single volume. If all file names are listed consecutively, the POSITION phrase need not be given. If one of the file names is not listed, the initial position of the tape must be given. Only one file may be opened per run on the same volume.
2.12 RERUN+ Clause
The RERUN clause specifies the rerun establishment point. The RERLN clause is considered obsolete in this version of Standard COBOL because it will be removed in future revisions of Standard COBOL. 2.12.1—General format
[ENDOF
[file name 11-
RERUNN
integer]
! implementation name 11
RECORDS
integer 2 CLOCK-UNITS
[Condition name 1
2.12.2 Syntax rules
(1) File name 1 must be a sequentially organized file. OF file name 2
(2) The ENDOFREEL/UNIT phrase can be used only when file name 2 is a sequentially organized file. The definition of UNIT is determined by the implementer.
(3) When the integer 1 RECORDS phrase or the integer 2 CLOCK-UNITS phrase is specified, implementation name 1 must be given in the RERUN clause.
(4) For a given file name 2, multiple RERUN clauses may be specified, subject to the following restrictions: When multiple integer 1 RECORDS phrases are specified, no two of them may specify the same file name 2.
h. When multiple END.OFUNIT phrases are specified, no two of them may specify the same file name 2. (5) Only one RERUN clause with a CLOCK-UNITS phrase may be specified. 2.12.3 General Rules
(1) The RERUN clause specifies when and where rerun information is recorded. Rerun information is recorded as follows: If file name 1 is specified, rerun information is written on each volume or unit of input file. The implementer specifies where on the volume or file to record rerun information.
b. If implementation name is specified, rerun information is written on a separate file on a device specified by the implementer. (2) According to different conditions for establishing rerun points, RERUV clauses can be divided into seven categories. The implementer must provide at least a clause of the class RERUV.
a. When the END OF REEL or ENTER OF UNIT phrase is used without an ON phrase. In this case, the rerun information is written on file name 2, and file name 2 must be an output file. b. When the ENDOFREEL or ENDOFUNIT phrase is used and file name 1 is specified in the ON phrase. In this case, the rerun information is written in file name 1, and file name 1 must be an output file. In addition, the standard volume unit closing function is performed on file name 2. File name 2 can be an input file or an output file. C. When the ENDOFREEL or ENDOFUNIT phrase is used and the implementation name is specified in the ON phrase. In this case, the rerun information is written on an independent rerun unit defined by the implementer. File name 2 can be an input file or an output file. d. When the integer 1 RE(ORDS phrase is used. In this case, once the integer 1 record of file name 2 is processed, the rerun information is written to the device specified by implementation name 1, which must be specified in the ON phrase. File name 2 can be an input file or an output file, and its organization and access method are not limited. When the integer 2 CLOCK-UNITS phrase is used. In this case, once a period of time counted by the internal clock has passed, e.
the rerun information is written to the device specified by implementation name 1, which must be specified in the ON phrase. f. When the conditional name phrase is used and implementation name 1 is specified in the ON phrase. In this case, once a switch has a specific state specified by conditional name 1, the rerun information is written to the device specified by implementation name 1. . In this case, the relevant switches must be defined in the SPECIAL-NAMES section of the environment configuration node. The implementer specifies when to detect the switch status. g: When the condition name 1 phrase is used and file name 1 is specified in the ON phrase. In this case, once a switch has the specific state specified by condition name 1, the re-run information is written to file name 1, and file name 1 must be an output file. In this case, as in f, the relevant switches must be defined in the SPECIAL-NAMES section of the environment configuration node. The implementer specifies when to detect the switch status.
2.13SAME clause
2.13.1 Function
The SAME clause specifies a storage area shared by different files. 2.13.2. General format
SAME[ RECORDAREAFOR file name 1(file name 2)2.13.3 Syntax rules
(1) File name 1 and file name 2 must be specified in the FILE-CONTROL section of the same program. (2) File name 1 and file name 2 cannot reference external file connectors. (3) Multiple SAME clauses can appear in a program, but there are the following restrictions: the same file name cannot appear in multiple SAMEAREAa
b, the same file name cannot appear in multiple SAMEAREA clauses. C, if one or more file names in the SAMEAREA clause appear in a SAMEAREA clause, all file names in the SAMEAREA clause must appear in the SAMEAREA clause. However, additional file names that do not appear in the SAMEAREA clause may appear in the SAMERECORDAREA clause. The rule that at any given time, at least one file name in the SAMEAREA clause can be open has precedence over the rule that at any given time, at least one file name in the SAMERECORDAREA clause can be open. (4) Files referenced in a SAMEAREA or SAMERECORDAREA clause need not all have the same organization or access mode.
2.13.4 General Rules
(1) The SAMEAREA clause specifies that two or more files referenced by filename1 and filename2, neither of which represents sorted or merged files, are to be processed using the same storage area. The shared area includes all storage areas allocated to the files referenced by filename1 and filename2; therefore, it is not possible for more than one such file to be in open mode at the same time (see clause 3e above).
GB/T 4092.4—92
(2) The SAMERECORDAREA clause specifies that the two or more files referenced by filename1 and filename2 are to use the same storage area when processing the current logical record. All of these files may be in open mode at the same time. The logical record in the SAMERECORDAREA is considered to be the logical record of the file opened in output mode in the SAMERECORDAREA clause, and is also considered to be the logical record of the most recently read file opened in input mode in the SAMERECORDAREA clause. This is equivalent to an implicit redefinition of the storage area, i.e., the records are aligned to the leftmost character position, 3-way order 1-0 Data section of the module
3.1 Section
The file section is located in the data section of the source program. The file section defines the structure of the data file. Each file is defined by a file description clause and one or more record description clauses. The record description clause follows the file description clause. The general format of a sequential IO module section is as follows: FILE SECTION.
[File description clause
{Record description clause}
3.1.1 File description clause
In a COBOL program, a file description clause (FD) represents the highest organization in a file section. A file description clause follows the file section header. The file description clause consists of a level indicator (FD), a file name, and a series of independent clauses. The FD clause specifies the size of the logical and physical records, whether a label record exists, the value of the label item defined by the implementer, the name of the data record that makes up the file, and the line number to the logical printout. This description clause ends with a period. 3.1.2 Record description structure
A record description consists of a set of data description clauses that describe the characteristics of a particular record. Each data description clause consists of a level number followed by a data name (if necessary), and a series of required independent clauses. Record descriptions have a hierarchical structure, so the sub-items used with a description clause may vary greatly, depending on whether it is followed by subordinate clauses. The structure of record descriptions and the components allowed in record description clauses are described in the "Concept of Layers" and data description clauses. The availability of specific sub-items in data description clauses is determined by the level of core modules supported in the implementation. 3.1.3 Initial Values
The initial values ​​of data items in a file section are undefined. 3.2 File Description Clause
3.2.1 Function
The file description clause provides information about the physical structure identification and record names of a sequential file. 3.2.2 General format
FD file name 1
RECORDS
BLOCKCONTAINS[integer 1 TO J integer 2 I CHARACTERS
[CONTAINS integer 3 CHARACTERS
RECORD
ISVARYINGINSIZEL[FROM integer 4 J TO integer 5 J CHARATERS][DEPENDING ON data name 1]
(CONTAINS integer 6 TO Wish
integer 7 CHARACTERS
[I.ABEL RECORD IS
[STANDARD]
[RECORDS AREJ[OMITTED
[VAL.UE(F implementation name 1 IS [data name]] [word value 1
RECORD IS
GB/T 4092.4—92
1Data Name 3%
RECORDS ARE!
LINAGE IS Data Name 4|LINESWITH[Integer 8]
FOOTING AT[Data Name 51[LINES AT TOF Integer 9
[LINESATBOTTOM/Data Name 7)
[Data Name 6
[Integer 10
[CODE-SETIS Alphabet Name 1]
3.2.3 Syntax Rules
[Integer 11
(1) The level indicator FD marks the beginning of the file description and must precede the file name 1. (2) The order in which the clauses following the file name 1 appear is arbitrary. (3) The file description clause must be followed by one or more record description clauses. 3.2.4 General rules
(1) The file description clause associates the file name 1 with the file connector. (2) The BLOCKCONTAINS clause, CODE-SET clause, DATARECORDS clause, LABELRECORDS clause, LINAGE clause, RECORD clause, and VALUEOF clause are listed in alphabetical order. 3.3BLOCKCONTAINS clause
3.3.1 Function
The BLOCK CONTAINS clause specifies the size of the physical record. 3.3.2 General format
RECORDS
BLOCK CONTAINS E integer 1 TO] integer 2 CHARACTERS
3.3.3 General Rules
(1) This clause is always required except in the following cases: a.
A physical record contains one and only one complete logical record. The hardware device allocated to the file has one and only one physical record size. The number of records contained in a block is specified in the operating environment. (2) The size of a physical record may be indicated by the number of records. However, the RECORDS phrase must not be used in the following cases. a.
In mass storage files, logical records may span physical records. Physical records contain padding (areas not contained in logical records). b.
The combination of logical records results in an implied inexact physical record size. (3) When the word CHARACTERS is specified, the physical record size is indicated by the number of character positions required to store the physical record, regardless of the character type used to represent the data items of the physical record. (4) If integer 1 is not specified, integer 2 represents the exact length of the physical record. If both integer 1 and integer 2 are specified, they represent the minimum and maximum lengths of the entity record, respectively. (5) If the associated file connector is an external file connector, integer 1 and integer 2 have the same value in all BLOCKCONTAINS clauses associated with that file connector in the run unit. 3.4 CODE-SET clause
3.4.1 Function
The CODE SET clause specifies the character encoding set used to represent data on external media. 3.4.2 General format
CODE-SETIS Alphabet name 1
3.4.3 Syntax rules
GB/T4092.4—92
(1) When the CODE-SET clause is specified for a file, all data in that file must be described as USAGEISDISPLAY. Furthermore, any signed numeric data must be described using the SIGNISSEPARATE clause. (2) The alphabet name clause referenced by the CODE-SET clause must not specify a word value constant phrase. 3.4.4 General Rules
(1) If the CODE-SET clause is specified: After the successful execution of the OPEN statement, the character set representing the data on the external media is the character set used by the alphabet name 1 in the file description of the file name specified in the OPEN statement (see 4.5 SPECIAL-NAMES in GB/T 4092.2). It specifies the conversion algorithm for converting from the character set on the external media or the native character nest or from the native character set to the character set on the external media. This conversion occurs during the execution of input and output operations. (2) If the CODE-SET clause is not specified, the data on the external media uses the native character set. (3) If the associated file connector is an external file connector, the CODESET clause associated with the file connector in the operation unit has the same character set.
3.5DATARECORDS Clause
3.5.1 Function
The DATARECORDS clause is used only to list the names of the individual data records of the relevant files in the program. In this version of Standard COBOL, DATARECORD is considered an obsolete feature because it will be removed in future revisions of Standard COBOL. 3.5.2 General Format
RECORD IS
RECORDSARE!
3.5.3 Syntax Rules
(Data Name 1}
(1) Data Name 1 is the name of the data record. They must have a corresponding 01-level description and the same name is used in the description. 3.5.4 General Rules
(1) The presence of multiple data names indicates that the file contains multiple data records. These records can have different sizes, different formats, etc. The order in which they are engraved in the file is not important. (2) Conceptually, all records in a file share the same area, which does not change due to the presence of multiple data types in the file.
3.6 LABELRECORDS Clause
3.6.1 Function
IABELRECORDS. Indicates whether labels appear. The LABELRECORDS clause is considered obsolete in this version of the standard COBOL because it will be deleted in future revisions of the standard COBOL. 3. 6. 2 General format
RECORD IS
STANDARD
IRFCORDSARE/IOMITTED
3.6.3 General rules
(1) OMITTED indicates that no explicit label exists for the file or the device assigned to the file. (2) STANDARD indicates that a label exists for the file or the device assigned to the file and that the label is consistent with the implementer's label specification.
(3) If no LABELRECORDS clause is specified for a file, the label record for the file shall be consistent with the implementer's label specification.
(4) If the file connector associated with the file description is an external file connector (see clause 4.5 EXTERNAL in B/T 4092.12), all LABELRECORDS clauses associated with the file connector in the operational unit shall have the same specification.ABEL RECORD IS
[STANDARD]
[RECORDS AREJ[OMITTED
[VAL.UE(F Implementation Name 1 IS [Data Name]] [Word Value 1
RECORDIS
GB/T 4092.4—92
1Data Name 3%
RECORDS ARE!
LINAGE IS Data Name 4|LINESWITH[Integer 8]
FOOTING AT[Data Name 51[LINES AT TOF Integer 9
[LINESATBOTTOM/Data Name 7)
[Data Name 6
[Integer 10
[CODE-SETIS Alphabet Name 1]
3.2.3 Syntax Rules
[Integer 11
(1) The level indicator FD marks the beginning of the file description and must precede file name 1. (2) The clauses following file name 1 appear in any order. (3) The file description clause must be followed by one or more record description clauses. 3.2.4 General rules
(1) The file description clause associates file name 1 with the file connector. (2) The BLOCKCONTAINS clause, CODE-SET clause, DATARECORDS clause, LABELRECORDS clause, LINAGE clause, RECORD clause, and VALUEOF clause are listed in alphabetical order. 3.3BLOCKCONTAINS clause
3.3.1 Function
The BLOCK CONTAINS clause specifies the size of the physical record. 3.3.2 General format
RECORDS
BLOCK CONTAINS E integer 1 TO integer 2 CHARACTERS
3.3.3 General rules
(1) This clause is always required except in the following cases: a.
A physical record contains one and only one complete logical record. The hardware device allocated to the file has one and only one physical record size. The number of records contained in a block is specified in the operating environment. (2) The size of a physical record may be indicated as a number of records. However, the RECORDS phrase must not be used in the following cases. a.
In mass storage files, logical records can span physical records. Physical records contain padding (areas not contained in logical records). b.
The combination of logical records is such that an inexact physical record size is implied. (3) When the word CHARACTERS is specified, the physical record size is specified in terms of the number of character positions required to store the physical record, without regard to the character type used to represent the data items of the physical record. (4) If integer 1 is not specified, integer 2 represents the exact length of the physical record. If both integer 1 and integer 2 are specified, they represent the minimum and maximum lengths of the physical record, respectively. (5) If the associated file connector is an external file connector, integer 1 and integer 2 have the same value in all BLOCKCONTAINS clauses associated with that file connector in the run unit. 3.4 CODE-SET clause
3.4.1 Function
The CODE SET clause specifies the character encoding set used to represent data on external media. 3.4.2 General format
CODE-SETIS alphabet name 1
3.4.3 Syntax rules
GB/T4092.4—92
(1) When a CODE-SET clause is specified for a file, all data in the file must be described as USAGEISDISPLAY. Furthermore, any signed numeric data must be described using the SIGNISSEPARATE clause. (2) The alphabet name clause referenced by the CODE-SET clause must not specify a word value constant phrase. 3.4.4 General rules
(1) If a CODE-SET clause is specified:: After the successful execution of the OPEN statement, the character set representing the data on the external media is the character set used by the alphabet name 1 in the file description of the file name specified in the OPEN statement (see 4.5 SPECIAL-NAMES in GB/T4092.2). , it specifies the conversion algorithm for converting from the character set on the external media or the native character set or from the native character set to the character set on the external media. This conversion occurs during the execution of input and output operations. (2) If the CODE-SET statement is not specified, the data on the external media uses the native character set. (3) If the relevant file connector is an external file connector, the CODESET clause associated with the file connector in the operation unit has the same character set.
3.5DATARECORDS clause
3.5.1 Function
The DATARECORDS clause is only used to list the names of the individual data records of the relevant file in the program. In this version of Standard COBOL, DATARECORD is considered an obsolete component because it will be removed in later revisions of Standard COBOL. 3.5.2 General format
RECORD IS
RECORDSARE!
3.5.3 Syntax Rules
(Data Name 1}
(1) Data Name 1 is the name of the data record. They must have a corresponding 01-level description and the same name is used in the description. 3.5.4 General Rules
(1) The presence of multiple data names indicates that the file contains multiple data records. These records can have different sizes, different formats, etc. The order in which they are engraved in the file is not important. (2) Conceptually, all records in a file share the same area, which does not change due to the presence of multiple data types in the file.
3.6 LABELRECORDS Clause
3.6.1 Function
IABELRECORDS. Indicates whether labels appear. The LABELRECORDS clause is considered obsolete in this version of the standard COBOL because it will be deleted in future revisions of the standard COBOL. 3. 6. 2 General format
RECORD IS
STANDARD
IRFCORDSARE/IOMITTED
3.6.3 General rules
(1) OMITTED indicates that no explicit label exists for the file or the device assigned to the file. (2) STANDARD indicates that a label exists for the file or the device assigned to the file and that the label is consistent with the implementer's label specification.
(3) If no LABELRECORDS clause is specified for a file, the label record for the file shall be consistent with the implementer's label specification.
(4) If the file connector associated with the file description is an external file connector (see clause 4.5 EXTERNAL in B/T 4092.12), all LABELRECORDS clauses associated with the file connector in the operational unit shall have the same specification.ABEL RECORD IS
[STANDARD]
[RECORDS AREJ[OMITTED
[VAL.UE(F Implementation Name 1 IS [Data Name]] [Word Value 1
RECORDIS
GB/T 4092.4—92
1Data Name 3%
RECORDS ARE!
LINAGE IS Data Name 4|LINESWITH[Integer 8]
FOOTING AT[Data Name 51[LINES AT TOF Integer 9
[LINESATBOTTOM/Data Name 7)
[Data Name 6
[Integer 10
[CODE-SETIS Alphabet Name 1]
3.2.3 Syntax Rules
[Integer 11
(1) The level indicator FD marks the beginning of the file description and must precede file name 1. (2) The clauses following file name 1 appear in any order. (3) The file description clause must be followed by one or more record description clauses. 3.2.4 General rules
(1) The file description clause associates file name 1 with the file connector. (2) The BLOCKCONTAINS clause, CODE-SET clause, DATARECORDS clause, LABELRECORDS clause, LINAGE clause, RECORD clause, and VALUEOF clause are listed in alphabetical order. 3.3BLOCKCONTAINS clause
3.3.1 Function
The BLOCK CONTAINS clause specifies the size of the physical record. 3.3.2 General format
RECORDS
BLOCK CONTAINS E integer 1 TO integer 2 CHARACTERS
3.3.3 General rules
(1) This clause is always required except in the following cases: a.
A physical record contains one and only one complete logical record. The hardware device allocated to the file has one and only one physical record size. The number of records contained in a block is specified in the operating environment. (2) The size of a physical record may be indicated as a number of records. However, the RECORDS phrase must not be used in the following cases. a.
In mass storage files, logical records can span physical records. Physical records contain padding (areas not contained in logical records). b.
The combination of logical records is such that an inexact physical record size is implied. (3) When the word CHARACTERS is specified, the physical record size is specified in terms of the number of character positions required to store the physical record, without regard to the character type used to represent the data items of the physical record. (4) If integer 1 is not specified, integer 2 represents the exact length of the physical record. If both integer 1 and integer 2 are specified, they represent the minimum and maximum lengths of the physical record, respectively. (5) If the associated file connector is an external file connector, integer 1 and integer 2 have the same value in all BLOCKCONTAINS clauses associated with that file connector in the run unit. 3.4 CODE-SET clause
3.4.1 Function
The CODE SET clause specifies the character encoding set used to represent data on external media. 3.4.2 General format
CODE-SETIS alphabet name 1
3.4.3 Syntax rules
GB/T4092.4—92
(1) When a CODE-SET clause is specified for a file, all data in the file must be described as USAGEISDISPLAY. Furthermore, any signed numeric data must be described using the SIGNISSEPARATE clause. (2) The alphabet name clause referenced by the CODE-SET clause must not specify a word value constant phrase. 3.4.4 General rules
(1) If a CODE-SET clause is specified:: After the successful execution of the OPEN statement, the character set representing the data on the external media is the character set used by the alphabet name 1 in the file description of the file name specified in the OPEN statement (see 4.5 SPECIAL-NAMES in GB/T4092.2). , it specifies the conversion algorithm for converting from the character set on the external media or the native character set or from the native character set to the character set on the external media. This conversion occurs during the execution of input and output operations. (2) If the CODE-SET statement is not specified, the data on the external media uses the native character set. (3) If the relevant file connector is an external file connector, the CODESET clause associated with the file connector in the operation unit has the same character set.
3.5DATARECORDS clause
3.5.1 Function
The DATARECORDS clause is only used to list the names of the individual data records of the relevant file in the program. In this version of Standard COBOL, DATARECORD is considered an obsolete component because it will be removed in later revisions of Standard COBOL. 3.5.2 General format
RECORD IS
RECORDSARE!
3.5.3 Syntax Rules
(Data Name 1}
(1) Data Name 1 is the name of the data record. They must have a corresponding 01-level description and the same name is used in the description. 3.5.4 General Rules
(1) The presence of multiple data names indicates that the file contains multiple data records. These records can have different sizes, different formats, etc. The order in which they are engraved in the file is not important. (2) Conceptually, all records in a file share the same area, which does not change due to the presence of multiple data types in the file.
3.6 LABELRECORDS Clause
3.6.1 Function
IABELRECORDS. Indicates whether labels appear. The LABELRECORDS clause is considered obsolete in this version of the standard COBOL because it will be deleted in future revisions of the standard COBOL. 3. 6. 2 General format
RECORD IS
STANDARD
IRFCORDSARE/IOMITTED
3.6.3 General rules
(1) OMITTED indicates that no explicit label exists for the file or the device assigned to the file. (2) STANDARD indicates that a label exists for the file or the device assigned to the file and that the label is consistent with the implementer's label specification.
(3) If no LABELRECORDS clause is specified for a file, the label record for the file shall be consistent with the implementer's label specification.
(4) If the file connector associated with the file description is an external file connector (see clause 4.5 EXTERNAL in B/T 4092.12), all LABELRECORDS clauses associated with the file connector in the operational unit shall have the same specification.3BLOCKCONTAINS Clause
3.3.1 Function
The BLOCK CONTAINS clause specifies the size of a physical record. 3.3.2 General Format
RECORDS
BLOCK CONTAINS E integer 1 TO integer 2 CHARACTERS
3.3.3 General Rules
(1) This clause is always required except in the following cases: a.
A physical record contains one and only one complete logical record. The hardware device assigned to the file has one and only one physical record size. The number of records contained in a block is specified in the operating environment. (2) The size of a physical record may be indicated by the number of records. However, the RECORDS phrase must not be used in the following cases. a.
In mass storage files, logical records can span physical records. Physical records contain padding (areas not contained in logical records). b.
The combination of logical records implies an inexact physical record size. (3) When the word CHARACTERS is specified, the physical record size is specified in terms of the number of character positions required to store the physical record, without regard to the character type used to represent the data items of the physical record. (4) If integer1 is not specified, integer2 represents the exact length of the physical record. If both integer1 and integer2 are specified, they represent the minimum and maximum lengths of the physical record, respectively. (5) If the associated file connector is an external file connector, integer1 and integer2 have the same value in all BLOCKCONTAINS clauses associated with that file connector in the run unit. 3.4 CODE-SET clause
3.4.1 Function
The CODE SET clause specifies the character encoding set used to represent data on external media. 3.4.2 General format
CODE-SETIS alphabet name 1
3.4.3 Syntax rules
GB/T4092.4—92
(1) When a CODE-SET clause is specified for a file, all data in the file must be described as USAGEISDISPLAY. Furthermore, any signed numeric data must be described using the SIGNISSEPARATE clause. (2) The alphabet name clause referenced by the CODE-SET clause must not specify a word value constant phrase. 3.4.4 General rules
(1) If a CODE-SET clause is specified:: After the successful execution of the OPEN statement, the character set representing the data on the external media is the character set used by the alphabet name 1 in the file description of the file name specified in the OPEN statement (see 4.5 SPECIAL-NAMES in GB/T4092.2). , it specifies the conversion algorithm for converting from the character set on the external media or the native character set or from the native character set to the character set on the external media. This conversion occurs during the execution of input and output operations. (2) If the CODE-SET statement is not specified, the data on the external media uses the native character set. (3) If the relevant file connector is an external file connector, the CODESET clause associated with the file connector in the operation unit has the same character set.
3.5DATARECORDS clause
3.5.1 Function
The DATARECORDS clause is only used to list the names of the individual data records of the relevant file in the program. In this version of Standard COBOL, DATARECORD is considered an obsolete component because it will be removed in later revisions of Standard COBOL. 3.5.2 General format
RECORD IS
RECORDSARE!
3.5.3 Syntax Rules
(Data Name 1}
(1) Data Name 1 is the name of the data record. They must have a corresponding 01-level description and the same name is used in the description. 3.5.4 General Rules
(1) The presence of multiple data names indicates that the file contains multiple data records. These records can have different sizes, different formats, etc. The order in which they are engraved in the file is not important. (2) Conceptually, all records in a file share the same area, which does not change due to the presence of multiple data types in the file.
3.6 LABELRECORDS Clause
3.6.1 Function
IABELRECORDS. Indicates whether labels appear. The LABELRECORDS clause is considered obsolete in this version of the standard COBOL because it will be deleted in future revisions of the standard COBOL. 3. 6. 2 General format
RECORD IS
STANDARD
IRFCORDSARE/IOMITTED
3.6.3 General rules
(1) OMITTED indicates that no explicit label exists for the file or the device assigned to the file. (2) STANDARD indicates that a label exists for the file or the device assigned to the file and that the label is consistent with the implementer's label specification.
(3) If no LABELRECORDS clause is specified for a file, the label record for the file shall be consistent with the implementer's label specification.
(4) If the file connector associated with the file description is an external file connector (see clause 4.5 EXTERNAL in B/T 4092.12), all LABELRECORDS clauses associated with the file connector in the operational unit shall have the same specification.3BLOCKCONTAINS Clause
3.3.1 Function
The BLOCK CONTAINS clause specifies the size of a physical record. 3.3.2 General Format
RECORDS
BLOCK CONTAINS E integer 1 TO integer 2 CHARACTERS
3.3.3 General Rules
(1) This clause is always required except in the following cases: a.
A physical record contains one and only one complete logical record. The hardware device assigned to the file has one and only one physical record size. The number of records contained in a block is specified in the operating environment. (2) The size of a physical record may be indicated by the number of records. However, the RECORDS phrase must not be used in the following cases. a.
In mass storage files, logical records can span physical records. Physical records contain padding areas (areas not contained in logical records). b.
The combination of logical records implies an inexact physical record size. (3) When the word CHARACTERS is specified, the physical record size is specified in terms of the number of character positions required to store the physical record, without regard to the character type used to represent the data items of the physical record. (4) If integer1 is not specified, integer2 represents the exact length of the physical record. If both integer1 and integer2 are specified, they represent the minimum and maximum lengths of the physical record, respectively. (5) If the associated file connector is an external file connector, integer1 and integer2 have the same value in all BLOCKCONTAINS clauses associated with that file connector in the run unit. 3.4 CODE-SET clause
3.4.1 Function
The CODE SET clause specifies the character encoding set used to represent data on external media. 3.4.2 General format
CODE-SETIS alphabet name 1
3.4.3 Syntax rules
GB/T4092.4—92
(1) When a CODE-SET clause is specified for a file, all data in the file must be described as USAGEISDISPLAY. Furthermore, any signed numeric data must be described using the SIGNISSEPARATE clause. (2) The alphabet name clause referenced by the CODE-SET clause must not specify a word value constant phrase. 3.4.4 General rules
(1) If a CODE-SET clause is specified:: After the successful execution of the OPEN statement, the character set representing the data on the external media is the character set used by the alphabet name 1 in the file description of the file name specified in the OPEN statement (see 4.5 SPECIAL-NAMES in GB/T4092.2). , it specifies the conversion algorithm for converting from the character set on the external media or the native character set or from the native character set to the character set on the external media. This conversion occurs during the execution of input and output operations. (2) If the CODE-SET statement is not specified, the data on the external media uses the native character set. (3) If the relevant file connector is an external file connector, the CODESET clause associated with the file connector in the operation unit has the same character set.
3.5DATARECORDS clause
3.5.1 Function
The DATARECORDS clause is only used to list the names of the individual data records of the relevant file in the program. In this version of Standard COBOL, DATARECORD is considered an obsolete component because it will be removed in later revisions of Standard COBOL. 3.5.2 General format
RECORD IS
RECORDSARE!
3.5.3 Syntax Rules
(Data Name 1}
(1) Data Name 1 is the name of the data record. They must have a corresponding 01-level description and the same name is used in the description. 3.5.4 General RulesWww.bzxZ.net
(1) The presence of multiple data names indicates that the file contains multiple data records. These records can have different sizes, different formats, etc. The order in which they are engraved in the file is not important. (2) Conceptually, all records in a file share the same area, which does not change due to the presence of multiple data types in the file.
3.6 LABELRECORDS Clause
3.6.1 Function
IABELRECORDS. Indicates whether labels appear. The LABELRECORDS clause is considered obsolete in this version of the standard COBOL because it will be deleted in future revisions of the standard COBOL. 3. 6. 2 General format
RECORD IS
STANDARD
IRFCORDSARE/IOMITTED
3.6.3 General rules
(1) OMITTED indicates that no explicit label exists for the file or the device assigned to the file. (2) STANDARD indicates that a label exists for the file or the device assigned to the file and that the label is consistent with the implementer's label specification.
(3) If no LABELRECORDS clause is specified for a file, the label record for the file shall be consistent with the implementer's label specification.
(4) If the file connector associated with the file description is an external file connector (see clause 4.5 EXTERNAL in B/T 4092.12), all LABELRECORDS clauses associated with the file connector in the operational unit shall have the same specification.5SPECIAL-NAMES segment). It specifies the conversion algorithm for converting from the character set on the external media or the native character set or from the native character set to the character set on the external media. This conversion occurs during the execution of input and output operations. (2) If the CODE-SET statement is not specified, the data on the external media uses the native character set. (3) If the relevant file connector is an external file connector, the CODESET clause associated with the file connector in the operation unit has the same character set.
3.5DATARECORDS clause
3.5.1 Function
The DATARECORDS clause is only used to list the names of the individual data records of the relevant file in the program. In this version of Standard COBOL, DATARECORD is considered an obsolete component because it will be removed in later revisions of Standard COBOL. 3.5.2 General format
RECORD IS
RECORDSARE!
3.5.3 Syntax Rules
(Data Name 1}
(1) Data Name 1 is the name of the data record. They must have a corresponding 01-level description and the same name is used in the description. 3.5.4 General Rules
(1) The presence of multiple data names indicates that the file contains multiple data records. These records can have different sizes, different formats, etc. The order in which they are engraved in the file is not important. (2) Conceptually, all records in a file share the same area, which does not change due to the presence of multiple data types in the file.
3.6 LABELRECORDS Clause
3.6.1 Function
IABELRECORDS. Indicates whether labels appear. The LABELRECORDS clause is considered obsolete in this version of the standard COBOL because it will be deleted in future revisions of the standard COBOL. 3. 6. 2 General format
RECORD IS
STANDARD
IRFCORDSARE/IOMITTED
3.6.3 General rules
(1) OMITTED indicates that no explicit label exists for the file or the device assigned to the file. (2) STANDARD indicates that a label exists for the file or the device assigned to the file and that the label is consistent with the implementer's label specification.
(3) If no LABELRECORDS clause is specified for a file, the label record for the file shall be consistent with the implementer's label specification.
(4) If the file connector associated with the file description is an external file connector (see clause 4.5 EXTERNAL in B/T 4092.12), all LABELRECORDS clauses associated with the file connector in the operational unit shall have the same specification.5SPECIAL-NAMES segment). It specifies the conversion algorithm for converting from the character set on the external media or the native character set or from the native character set to the character set on the external media. This conversion occurs during the execution of input and output operations. (2) If the CODE-SET statement is not specified, the data on the external media uses the native character set. (3) If the relevant file connector is an external file connector, the CODESET clause associated with the file connector in the operation unit has the same character set.
3.5DATARECORDS clause
3.5.1 Function
The DATARECORDS clause is only used to list the names of the individual data records of the relevant file in the program. In this version of Standard COBOL, DATARECORD is considered an obsolete component because it will be removed in later revisions of Standard COBOL. 3.5.2 General format
RECORD IS
RECORDSARE!
3.5.3 Syntax Rules
(Data Name 1}
(1) Data Name 1 is the name of the data record. They must have a corresponding 01-level description and the same name is used in the description. 3.5.4 General Rules
(1) The presence of multiple data names indicates that the file contains multiple data records. These records can have different sizes, different formats, etc. The order in which they are engraved in the file is not important. (2) Conceptually, all records in a file share the same area, which does not change due to the presence of multiple data types in the file.
3.6 LABELRECORDS Clause
3.6.1 Function
IABELRECORDS. Indicates whether labels appear. The LABELRECORDS clause is considered obsolete in this version of the standard COBOL because it will be deleted in future revisions of the standard COBOL. 3. 6. 2 General format
RECORD IS
STANDARD
IRFCORDSARE/IOMITTED
3.6.3 General rules
(1) OMITTED indicates that no explicit label exists for the file or the device assigned to the file. (2) STANDARD indicates that a label exists for the file or the device assigned to the file and that the label is consistent with the implementer's label specification.
(3) If no LABELRECORDS clause is specified for a file, the label record for the file shall be consistent with the implementer's label specification.
(4) If the file connector associated with the file description is an exter
Tip: This standard content only shows part of the intercepted content of the complete standard. If you need the complete standard, please go to the top to download the complete standard document for free.