title>GB/T 4092.1-1992 Programming language COBOL Preliminary knowledge - GB/T 4092.1-1992 - Chinese standardNet - bzxz.net
Home > GB > GB/T 4092.1-1992 Programming language COBOL Preliminary knowledge
GB/T 4092.1-1992 Programming language COBOL Preliminary knowledge

Basic Information

Standard ID: GB/T 4092.1-1992

Standard Name: Programming language COBOL Preliminary knowledge

Chinese Name: 程序设计语言 COBOL 预备知识

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.1-1983

Procurement status:ISO 1989-1-5-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.1-1992 Programming Language COBOL Preliminary Knowledge GB/T4092.1-1992 Standard Download Decompression Password: www.bzxz.net

Some standard content:

1 General provisions
National Standard of the People's Republic of China
Programming language COBOL
Preliminary knowledge
Programming language COBOL
Introductory information
1.1 Subject matter and scope of application
GB/T 4092.1—92
Replaces GB 4092.183
This standard specifies the format of COBOL programs and their interpretation. Its purpose is to increase the degree of machine-specificity in such programs so that they can be used in various automatic data processing systems. 1.2 Structure of language function description
The organization of COBOL function description in this standard is based on the concept of function processing modules. This series of standards defines the following 11 function processing modules: core, sequential IO, relative I-0, index 1-0, inter-program communication, sort-merge, source text management, report compilation, communication, debugging and program segmentation. Nine of the modules are divided into level 1 components and level 2 components. The level 1 components of the same module are subsets of the level 2 components. The other two modules contain only level 1 components.
The core module contains the language components required for internal data processing in the basic structure of the four parts of the COBOL program. The core modules are divided into two levels: core level 1 provides the components required to perform basic internal operations, that is, the more basic optional components of various clauses and verbs, and core level 2 provides more extensive and more complete internal processing capabilities. The sequential 1-0 module contains the language components required to define and access sequential organization files. This module is divided into two levels: level 1 provides the components required for the basic facilities for defining and accessing sequential files: level 2 provides complete facilities for defining and accessing sequential files. The relative I-0 module contains the speech components required to define and access mass storage files. In mass storage files, records are identified by relative record numbers! The Relative I-0 module is divided into two levels: Level 1 provides the components needed to define and access the basic facilities of relative files; Level 2 provides more complete facilities, including the ability to access files both sequentially and randomly in the same COBOL program. The Index I-0 module contains the language components needed to define and access mass storage files, in which records are identified by key values ​​and accessed by indexes. The Index I-0 module is divided into two levels: Level 1 provides the components needed to define and access the basic facilities of index files; Level 2 provides more complete facilities, including selection keys and the ability to access files both sequentially and randomly in a COBOL program.
The Interprogram Communication module contains the language components that enable a program to communicate with one or more other programs. This module is divided into two levels: Level 1 provides the ability to transfer control to another program known at compile time, and the ability for both programs to access a common data item; Level 2 provides the ability to transfer control to programs that were not identified at compile time and the ability to be nested in other programs.
The sort-merge module contains: the language components required for sorting one or more documents. It also contains the language components required for merging two or more documents of the same order. The user can arbitrarily use the input or output process to apply certain special processing to each individual record. The sort-merge module contains only level 1 components. The source text management module contains such language components, which are the components required for the import and replacement of source program text as part of the source program compilation. This module is divided into two levels: Level 1 provides facilities for copying text from a single library to the source program. Level 12 provides the ability to replace library text during the copy process, specify more than one COBOL library and replace the source program text during compilation. The report preparation module contains the language components required for semi-automatic report generation. This module contains only level 1 components. The communication module contains the language components required to access, process, and create messages or message segments, as well as the language components required to communicate with communication equipment through the message control system. This module is divided into two levels: Level 1 provides basic facilities for sending or receiving complete messages: Level 2 provides more complete facilities, including the ability to send or receive message segments. The debugging module enables the user to specify his debugging algorithm, that is, to indicate the conditions of monitoring data or process items during program execution. This module is divided into two levels: Level 1 provides basic debugging capabilities, including the ability to specify selected or full-segment monitoring; Level 2 provides complete COBOL debugging capabilities.
The program segmentation module provides the ability to overwrite sections of the process when the target is running. This module is divided into two levels: Level 1 provides the program segment number of the section and the fixed program segment limit; Level 2 adds the ability to change the program segment limit. 3 Organization of standards
This series of standards consists of 12 standards and 4 appendices. GB/T4092.1-92 consists of an introduction, a module component table, a COBOL component table, concepts, vocabulary, a general introduction to the language, and a framework for language composition. GB/T4092.2-4092.12-92 describes the core module and other functional processing modules in detail. In each standard, only level 2 functional descriptions are enclosed in boxes. 1.4 Usage of the standard
This series of standards can be viewed from different perspectives. In addition to the table of contents, the module component table and the COBOL component table can also be used to search for this standard.
To determine the contents of any level in a module, the module component table in GB/T 4092.1-92 should be used, which contains details of each component of the national standard (COBOL) in a given module. For example, to find out the contents of the first level of the sequence IO module, you need to look up that module in the module component table (see GB/T 4092.1-92 Sequence 1-0 Module Components). There you can find a COBOL component table for the sequence I-() module, which includes the language generalization, environment section, data section and process section verbs. In order to determine in which module a particular language feature appears The component table of the COBOL section in GB/T4092.1-92 should be used to determine which level of the module and the level of the module. The table details all the components of the national standard COBOL and their appearance in each module. For those components that are not completely included in the first level, the location of each subcomponent is specified in detail. For example, the READ statement appears in the sequential IO module, the relative JO module, and the index 1-O module at level 1. Since some phrases of the READ statement only appear in level 2 of these modules, the subcomponents of the READ statement are listed separately (see the READ statement of the process component of GB/T4092.1-92). Table 1
Required blocks (needed for subsets)
Inter-program
2NUC1.22SEQ12
2REL1.2 2INX1.2
2IPC1,2
INUIC1.2 1SEQ1.2
JINX1,2
[1NUC1.21SEQI,2
HPC1,2
Sort-
Source text
ISRTI,
Optional blocks (not needed for subsets)
2SEG1,2
2COM1,22EBI.2
1SRTI,1ISTMI.2IRPWI,1
ICOMI,2| 1DEB1.2
Table 1 is a diagrammatic representation of the 11 functional processing modules that constitute the content of the national standard COBOL. The table gives the hierarchy of the levels within each functional processing module. The abbreviated notation in the table (e.g. 21NX1,2) indicates the level position in the functional module and the number of module levels. This abbreviated notation consists from left to right of a number indicating the level position, a three-letter module abbreviation, and two numbers indicating the lowest and highest levels of the module to which it belongs. For example: 2INX1,2 means that this level is the second non-killed level (level 2) of the index I-0 module, and the module contains two non-empty levels (levels 1 and 2).
The three-letter module abbreviations are as follows:
Sequential 1-0
Relative 1-0
Index I-0
Inter-program communication
Sort-merge
Source text management
Report compilation
Program segmentation
1.5 Definition of national standard C) BOT. implementation
GB/T4092.1—92
This clause provides definitions of the language features that make up national standard COBOL. National standard COBOL consists of 11 modules, 7 of which are required and 1 is optional. The following are the criteria that must be met in order for the base implementation to conform to national standard COBOL. 1.5.1 Subset Definition
National Standard COBOL is divided into three levels: high subset, middle subset, and low subset. Each subset consists of one level of seven required modules. These seven modules are: core, sequential IO, relative IO, index IO, inter-program communication, sort-merge, and source text management. According to the diagram on the surface, the subsets of National Standard COBOL are represented by one of the three horizontal rows in the required module column. The optional four modules (report preparation, communication, debugging, and program segmentation) are not required in these three subsets. · The high subset consists of all language components of the highest level of all required modules, namely: core, sequence I-0, relative I-0, index 1-0, level 2 components of inter-program communication and source text management, level 1 components of sort-merge;
· The middle subset consists of all language components of level 1 of all required modules, namely: core, sequence I-0, relative I-0, index I-0, level 1 components of inter-program communication, sort-merge and source text management · The low subset consists of level 1 language components of core, sequence I-0 and inter-program communication. 1.5.2. Definition of a conforming implementation
A conforming implementation of National Standard COBOL must fully support any of the subsets defined in Section 1.5.1 above, and may include all levels of optional modules or some of the levels of optional modules or no optional modules at all. A conforming implementation of a given subset of National Standard COBOL must fully support all language components of that subset, except as limited by Section 1.5.2.5. A conforming implementation of a defined level of an optional module of the National Standard COBOL must fully support all language components of that level of the optional module, except as limited by 1.5.2.5. Furthermore, any implementation must also meet the requirements of 1.5.2.1 to 1.5.2.4. 1.5.2.1 Substitute or Additional Language Components
An implementation may not include substitute or additional language components in the source program that attempt to perform the same function as a component of the National Standard COBOL language. In addition, in the entire National Standard COBOL functional description, there are some language components whose syntax or function can be partially defined by the implementer [see Appendix B (Reference) B2 List of Implementer-Defined Language Components]. For those language components specified in the National Standard COBOL that can be defined by the implementer for their syntax and rules, when the implementer specifies certain restrictions, such restrictions shall not require the inclusion of substitute or additional language components in the source program. 1.5.2.2 Acceptance of Standardized Language Components
If a module is included in an implementation, then the implementation must accept the syntax and provide the functionality of all standard language components specified at a given level in the module, except for those language derogations associated with specific components as noted in Section 1.5.2.5.1. If an implementation implements components of a level of a module other than in full conformance to the syntax specified in this standard language, then the implementation must either provide the functionality specified in this standard for that syntax or must mark those language components as nonstandard extensions (see Section 1.5.2.5.2). 1.5.2.3 Obsolete language components
GB/T 4092.192
Obsolete language components are identified in the National Standard COBOL (reference) as language components that will be deleted in future revisions of this standard (see Appendix B (reference) B1 Obsolete language component list]. Obsolete language components neither add to nor modify the definitions in the National Standard GB4092-83 when preparing this version. The interaction between obsolete language components and other language components is undefined unless otherwise specified in the National Standard COBOL. Conforming implementations of the National Standard COBOL are required to support these obsolete language components, which appear at all levels and subsets of optional modules declared by the implementation. The documentation associated with its implementation must identify all obsolete language components in the implementation. Conforming implementations of the National Standard COBOL must provide warning mechanisms that users can optionally refer to at compile time to indicate, if appropriate, that the program includes obsolete language components.
1.5.2.4 Externally provided functions
In an implementation, if the functions specified by the language components of a module of this standard are to be provided outside the source program, then the implementation must not replace the language components of this standard with functional expressions of external functions, nor add external functions to the language components of this standard.
However, in order to interface with the operating environment, the implementation may request functional expressions outside the source program to support the functions specified in the source program. 1.5.2.5 Restrictions
The following restrictions apply to the implementation of functional expressions of the national standard COBOL. : 1.5.2.5.1 Hardware-dependent language components There are certain language components that are related to specific types of hardware components (see Appendix B Reference) B3 Hardware-dependent language component table. In order for an implementation to meet the requirements of this standard, the implementation must specify the hardware components it supports. Furthermore, when a specific hardware component is required to be supported and the modules in which all language components related to the component are located are included in the implementation, then all these language components must be implemented. Language components related to hardware components that are not required to be supported do not need to be implemented. However, it must be pointed out that those language components are missing from the implementation of the national standard () B ().
1.5.2.5.2 Extended language components
-If an implementation includes language components other than the assembly and the levels of optional modules that are required to be supported, this implementation still meets the requirements of this standard. Even if the implementer can extend the reserved table, it will still affect the normal compilation of programs that meet the requirements of this standard, which is considered correct.
The documentation related to the implementation must indicate the standard extensions ( A language component that is not defined in the supported subset or in the levels of supported optional modules but is defined elsewhere in this standard) or a non-standard extension (a language component or functionality not defined in this standard).
Conforming implementations of this standard must provide a warning mechanism that users may optionally reference at compile time to indicate, if appropriate, that a program contains non-standard extensions included in the implementation. 1.5.2.5.3 Reserved Words
An implementation of this family of standards must reserve all occurrences of the reserved words in the seven required and four optional modules. All COBOL reserved words are reserved.
1.5.2.5.4 Character Substitution
The COBOI. character set defined in Section 5.2 of this standard represents the complete COBOL character set of the standard. When an implementation does not provide graphical representations for the entire COBOL character set, implementors may specify substituted graphics to replace characters that cannot be represented. 1.5.2.5.5 ENTER Statement
An implementation of this standard may or may not include the ENTER statement, which is determined by the implementor. 1. 6 Definition of conforming source program
A conforming source program is a program that does not significantly violate the terms and functional expressions described in this standard. In order for a source program to conform to this standard, it must not contain any language components not specified in this standard. The operation of a source text (program) that conforms to this standard is predictable within the definition of this standard. Unless otherwise specified in this standard, the results of violating the format or rules of this standard are undefined.
GB/T 4092. 1-92
In order for a source program to conform to a subset specified in this standard, it must contain only language components of that subset. In the national standard COBOL, there are cases where the result of executing a statement is undefined or indeterminate [see Appendix B (reference) B4 Table of undefined language components]. Although the operation result is not defined by the national standard COBOL, a COROI source program that allows this situation to occur is still considered a conforming program. 1.7 The relationship between conforming programs and conforming implementations. The compiling of conforming source programs and the subsequent running of target programs by conforming implementations are defined only within the scope of the National Standard COBOI. However, this does not mean that the program will be successfully compiled or run, because this is related to other factors, such as the use of language components defined by the implementer, the logical correctness of the program and the data on which the program operates. Generally speaking, some issues are not pointed out in the functional description of the National Standard COBOL, such as: the maximum number of statements contained in a program: the maximum number of operands in certain statements, etc. This standard recognizes that these limits may vary from implementation to implementation, but it may affect the successful compilation of programs that meet this standard. 2 Module component table
2.1 General Description
This chapter contains a list of all components in the national standard COBOL organized by functional processing module. The column heading "Level 1\" indicates the level 1 components of the module. The column heading "Level 2\" indicates the level 2 components of the module. The letter X in the column indicates that the specified component in the specified level of the module is present. The letter N indicates that the specified component in the specified level of the module is absent. The letter Z in the column indicates that the specified component in the specified level of the module is present, but the component is obsolete in this version of the national standard COBOL because it will be eliminated in future versions of the national standard COBOL. The following is a list of module components, totaling
·Core module component list
·Sequential I-0 module component list
·Relative I-0 Module component table
·Index I-0 module component table
·Inter-program communication module component table
·Sorting-merging module component table
·Source text management module component table
·Report compilation module component table
·Communication module component table
·Debug module component table
·Program segmentation module component table
2.2 Core
Language Overview Read
Character set
Characters that make up a word
A, B, **, Z
Two (hyphen)
Level 1Level 2
Characters used as punctuation
*Quotation markbZxz.net
(Left bracket
: Semicolon
Characters used as punctuation
(Sign)
Characters used for editing
BSpace
+ Positive sign
: period
Zero suppression
Value protection
Currency symbol
CR Credit
DB Debit
Characters used for arithmetic
**Power
Characters used for relational conditions
=Equal to
GB/T 4092.1-92
》-greater than or equal to
<=less than or equal to
Characters used for subscript
Permitted single-character substitution
Permitted double-character substitution
Separator
String
COBOL Word
No more than 30 characters
User-defined word
Alphabet name
Category name
Condition name
Data name
Placeholder name
Mnemonic name
Program name
Routine name
Special character
System name
Computer name
GB/T 4092. 1-92
Level 1 Level 2
Implementation name
Program name
Reserved word
Required word
Special character
Arithmetic operator
GB/T 4092-1—92
Arithmetic operators for subscripts
Relative characters
Optional characters
Special target characters
Symbolic constants
ZERO, ZEROS. ZEROES. SPACE, SPACES, HIGH-VALUE. HIGH-VALUES, LOW-VALUE. LOW-YALUFS. OUOTE OUOTES
Symbolic constant
Symbolic character, ALL word value, ALL symbolic constant, ALL symbolic character word value
Numeric word value: 1 to 18 digits
Non-numeric word value: 1 to 160 characters
PICTURE string
Annotation
Unlimited nature of reference
Unlimited; if nested references are used, the name must be a female 50 limit
3-level subscript
7-level subscript
Word value subscript
Level 1 Level 2
GB/T 4092.1-92
Level 1 Level 2
Data name subscript
Placeholder name subscript
Relative subscript
Reference modification
Base format
Continuation of line
Continuation of non-numeric word value
Continuation of COBOI word, numeric word value, PICTURE character stringX
Blank line
Comment Line
Asterisk (★) comment line
Slash (/) comment line
Error line with D in the indicator field
Structure of source program
Required identification section
, optional environment section
Optional data section
Optional procedure section
Program end header
Identification section
PROGRAM-ID Segment
Program name
AUTHOR segment
INSTALLATION segment
DATE-WRITTEN segment
DATE-COMPILED segment
SECURITY segment
Environment section
Configuration section
GB/T 4092. 1—92
Level 1 Level 2
SOURCE-COMPUTER segment
Computer name
WITHDEBUGGING MODE clause
OBJECT-COMPUTER segment
Computer name
MEMORY SIZE clause
PROGRAM COLLATING SEQUENCE Clause x
SPECIALNAMES section
ALPHABET clause
STANDARD-1 Optional
STANDARD-2 Optional
NATIVE Optional
Implementation name Optional
Word value Optional
CLASS clause
CURRENCY SIGN clause
DECIMAL-POINT clause
Implementation name clause
IS mnemonic name Optional
ON STATUSIS condition name Optional
OFFSTATUSIS condition name Optional
SYMBOLICCHARACTERS clause
Data section
Working storage section
Record description section
77 layer description section
Data description section
BLANK WHEN ZERO clause
Data name clause
FILLER clause
GB/T 4092. 1—92
Level 1 Level 2
JUSTIFIED clause
Layer number clause
01 to 49; 1 or 2 digits
OCCURS clause
Integer TIMES
ASCENDING/DESCENDING KEY clause x
INDEXED BY phrase
Integer 1 to integer 2 TIMES DEPENDING ON phrase X
PICTURE clause
The character string can contain up to 30 characters
Data characters: X 9 A
Operation symbol: SVP
Fixed embedded characters: B+-, ¥0CRDB/X
Replace or float embedded characters, ¥+Z★x
Currency symbol substitution
Decimal point substitution
REDEFINES clause
Cannot be nested
Nesting is allowed
RENAMES clause
SIGN clause
SYNCHRONIZED clause
USAGE clause
BINARY
COMPUTATIONAL
DISPLAY
GB/T4092.1—92
Level 1Level 2
PACKED-DECIMAL
VALUE clause
Value sequence
Value 1THROUGH Value 2
Value range sequence
Procedure
Arithmetic expression
Arithmetic operator for even days+*/**
Arithmetic operator for even months+
Conditional expression
Simple condition
Relational condition
Relational operator
[NOT]GREATER THAN
ENOTI?
INOTJ LESS THAN
[NOT] FQUAL TO
「NOT]=
GREATER THAN OR EQUAL TO
LESS THEN OR EQUAL TO
Comparison of numeric operands
Comparison of non-numeric operands
Comparison of placeholder names and/or placeholder data items
Category conditions
NUMERIC
AL.PHABETH
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.