Some standard content:
1.1 Function
National standard of the People's Republic of China
Programming language COBOL
Core module
Programming tanguage COBOL
Nucleus module
GB/T 4092.2—92
Replaces GB4092.283
In the four-part structure of the program, the core module provides the language functions for internal data processing. At the same time, the core module also provides the functions of defining a table of adjacent data items and accessing data items according to their positions in the table. The core module also provides debugging functions, which include a compile-time switch and several debugging lines. 1.2 Level characteristics
Core level 1 provides local functions for the SPECIAL-NAMES segment and the data description section. In the procedural part, Core Level 1 provides partial functionality for AC-CEPT, ADD, ALTER, DISPLAY.DIVIDE, IF.MOVE, MULTIPLY.PERFORM, and SUBTRACT statements, and full functionality for CONTINUE, ENTER, EXIT, GODTO, and STOP statements. Core Level 1 does not provide full functionality for qualifiers, data name formation, and symbolic constants. Core Level 1 provides functionality for accessing entries in fixed-length tables with a dimension not exceeding 3. The debugging functionality provided by Core Level 1 includes a compile-time switch and several debugging lines. Core Level 2 provides full functionality for SPECIAL-NAMES sections and data description sections. In the procedural part, Core Level 2 provides complete functionality for ACCEPT, ADD, AI.TERCOMPUTE, DISPLAY, DIVIDE, EVALUATE, IF, INITIALIZE, INSPECT, MOVE, MULTIPLY, PERFORM, SEARCH, SET, STRING, SLBTRACF and UN-STRING statements. Core Level 2 provides complete functionality for qualification, data name formation and symbolic constants. Core Level 2 provides the ability to access table entries in up to seven dimensions. 1.3 Language Level Limitations
1.3.1 Character Set
COBOI. The character colon (:) is not included in Level 1. Include the COBOL character colon (:) in level 2. 1.3.2 Features of names
Do not include qualifiers in level 1. Except for layer and segment numbers, all user-defined words in level 1 must be unique when referenced. 50 qualifiers are allowed in level 2. User-defined words in level 2 do not have to be unique. 1.3.3 Symbolic constants
The symbolic constants that can be used in level 1 are, ZERO, ZEROS, ZEROES, SPACE, SPACES, HIGH-VALUE, HIGH-VALUES, LOW-VALUE, LOW-VALUES, QUOTE and QUOTES. The symbolic constants available in level 2 are ZERO, ZEROS, ZEROES, SPACE, SPACES, HIGH-VALUE, HIGHVALUES, LOW-VALUE, LOW-ALUES, QUOTE, QUOTES, symbolic characters, word values ALI.. Symbolic constants ALL and symbolic characters ALL:
1. 3. 4 Subscripts
Approved by the State Administration of Technical Supervision on August 4, 1992 and implemented on May 1, 1993
GB/T4092.2—92
One, two or three subscripts are allowed in level 1. From one to seven subscripts are allowed in the text. 1.3.5 Reference modification
Reference modification is only allowed in level 2.
1.3.6 Reference format
In level 1, a word, numeric value or P cannot be used as a subscript. A word or numeric value or PICTURE string can be broken so that part of it appears on a continuation line. In level 2, a word or numeric value or PICTURE string can be broken so that part of it appears on a continuation line. 2COBOL source program
2.1 General description
A COBOL source program is a collection of syntactically correct COBOL statements. 2.2 Organization
Except for the COPY and REPLACE statements and the program header, the statements, clauses, segments, and sections that appear in a COBOL source program can be divided into four parts, which are in the following order: Identification section
Environment section
Data section
Procedure section
If specified, the end of a COBOL source program can be marked by a program end header or by no additional source program lines.
2.3 Structure
The general format of the clauses and statements that make up a COBOL source program and the order in which they appear are given below. 2.3 .1 General format
Identifier
[Environment]
[Data]
[Procedure]
[End of program header
2.3.2 Syntax rules
(1) The general terms identifier, environment, data, procedure, and end of program header represent the COBOL identifier, COBOL environment, COBOL data, COBOL procedure, and COBOL end of program header, respectively. 2.3.3 General rules
(1) The beginning of a section in a program is marked by an appropriate radical. The end of a section is marked by one of the following:. The radical of the next section in the same program:
b. The end of program header;
e The physical position after which there are no more source program lines. GB/T 4092. 2--92
(2) In a program sequence, all separately compiled source programs except the last program must be terminated by a program end header.
2.4 Program end header
2.4.1 Function
The program end header marks the end of a named COBOL source program. 2.4.2 General format
ENDPOGRAM program name.
2.4.3 Syntax rules
(1) The program name must conform to the construction rules for user-defined words. (2) The program name must be consistent with the program name specified in the previous program design section (see section 3.3 PROGRAM-ID). 2.4.4 General Rules
(1) The program end header marks the end of the COBOL source program. (2) If the next source statement that appears after the program terminated by the program end header is a COEBOL statement, it must be the radical of the identification section of another program, and the program and the program terminated by the program end header are compiled separately. 3 Identification Section of Core Modules
3.1 General Description
The identification section is used to identify the program. Every COBOL source program must contain an identification section. In addition, the user can include the date the program was written and some other information as desired. This information should be placed below the section in the general format given below. 3-2 Organization
The paragraph header indicates the type of information contained in the paragraph. The program name must be given in the first paragraph, the PROGRAM ID paragraph. The other sections are optional and may be included in this section at the option of the user and shall be given in the order indicated in the general format below. The AUTHOR section, the INSTALLATION section, the DATE-WRITTEN section, the DATE-COMPILEH section, and the SECURITY section are obsolete elements in this version of Standard COBOL, as they will be deleted in later revisions of Standard COBOL.
3.2.1 Structure
The following is the general format of the sections in the identification section and specifies the order in which they are written in the source program. The PROGRAM-ID section and the DATE-COMPILED section are defined in 3.3 and 3.4, and although the other sections are not defined, their general format is structured in the same manner.
3.2. 1. 1~General format
IDENTIFICATION DIVISION.
PROGRAM-ID.Program name.
[AUTHOR.[Note]]
[INSTALIL.ATION, [Note}.. [DATE-WRITTEN.[Note]]
[DATE-COMPILED.[Note]]
[SECURITY.[Note]
3.2.1.2 Syntax rules
(1) Comments can be any combination of characters in the computer character set. It is not allowed to use hyphens written in the indicator area to connect comments; however, comments can be distributed on one or more lines. 3.3 PROGRAM-ID segment
3. 3. 1 Function
GB/T 4092.2-92
PROGRAM.M-II) segment gives the name that identifies the program. 3.3.2 General format
PROGRAM-ID program name.
3.3.3 Syntax rules
The program name must comply with the rules for the composition of user-defined characters. 3.3.4 General Rules
(1) The program name is used to identify source programs, subprograms, and all sheets belonging to a particular program. 3.4 DATE-COMFILED SEGMENT
3.4.1 Function
The DATE-COMPILED.FD segment provides the date in the identification section of the source program sheet. The DATE-COMPILED segment is considered obsolete in this version of Standard COBOL because it will be deleted in future revisions of Standard COBOL. 3.4.2 General format
DATE-COMPILED.FD, "Comment section".
3.4.3 Syntax rules
(1) Comment sections can be any combination of computer character set symbols. It is not allowed to use hyphens written in the indicator area to connect comment sections, but comment sections can be distributed on one or more lines. 3.4.4
-General rules
(1) When the program is compiled, the segment name DATE-COMPILED causes the current date to be inserted. If the DATE-COMPILED segment appears in the program, it is replaced by a segment of the form: DATE-COMPILED. Current date.
during compilation.
4 Environment section of the core module
--General description
The environment section provides a standard method for describing those aspects of data processing problems that depend on the physical characteristics of a particular computer. The environment section is in C(O)BOL The configuration section is optional in the source program. 4.2 Configuration Section
The configuration section is located in the environment section of the source program. The configuration section deals with the characteristics of the source computer and the target computer. This section also provides a way to specify a currency symbol; select a decimal point; specify a sign character; pair an implementation name with a user-defined mnemonic name; pair an alphabet name with a character set or collation sequence; and pair a class name with a character set. The configuration section is optional in the environment section of the source program.
The general format of the configuration section is as follows:
CONFIGURATION SECTION.
[SOURCE-COMPUTER.L Source computer description]] [OBJECT-COMPUTER.[Target computer description]] [SPECIAL-NAMES.[Special name description]] A program that is directly or indirectly included in another program must not have a configuration section. The items explicitly or implicitly stated in the configuration section of a program apply equally to other programs that are included by that program. 4.3 SOURCE-COMPUTER 4.3.1 Function The SOURCE-COMPUTER section provides a means of describing the computer on which the source program was compiled. 4.3.2 General format SOURCE-COMPUTER.L computer name [WITH DEBUGGINGMODE]. 4.3.3 Syntax rules (1) The computer name is the system name. 4.3.4 General rules (1) All clauses explicitly or implicitly specified in a SOURCE-COMPUTER section of a program apply to that program and any programs it contains. (2) If the SOURCE-COMPUTER section is not given and the program is not contained in a program with a SOURCE COMPUTER section, then the source computer is the computer on which the source program was compiled. (3) If the OBJECT-COMPUTER section is given but no source computer description is given, then the source computer is the computer on which the source program is compiled.
(4) If the program is given with the WITH DEBUGGING MODE clause, all debugging lines are compiled as specified by the kernel description (see Debugging in Kernel Modules in Chapter 7). (S) If the program is not given with the WITH DEBUGGING MODE clause and the program is not contained in a program with the WITH DEBUGGING MODE clause, all debugging lines are compiled as comment lines. 4.4 OBJECT-COMPUTER SEGMENTwww.bzxz.net
4.4.1 Function
The OBJECT-COMPUTER section is used to identify the computer on which the target program is executed. This version of the COBOL Standard considers the MEMORY SIZE clause to be obsolete, as it will be deleted in future revisions of the COBOL Standard. 4.4.2 General format
FOBJECT-COMPUTER.L Computer name "WORDS
MEMORY SIZE integer 1↓CHARACTERSMODULES
SEQUENCEIS alphabetic name 1.]
4.4-3 Syntax rules
(1) Computer name is a system name
4.4.4 General rules
PROGRAM COLI.ATING
(1) The computer name may provide a means of identifying the device configuration. In this case, it is up to each implementor to specify the computer name and the configuration it implies. The specification of the configuration contains specific information about the memory size. If the subset specified by the user is less than the minimum configuration required to run the standard program, the implementor shall define what action should be taken. (2) All subsections of an OBJECT-COMPUTER section, either explicitly or implicitly, in a program apply to that program and to any programs contained within it.
(3) If no OBJECT-COMPUTER section is given in a program and the program is not contained in a program with an OBJECT-COMPUTER section, the target computer is defined by the implementer.
(4) If an OBJECT-COMPUTER section is given but no target computer description is given, the target computer is defined by the implementer.
(5) If a PROGRAM'COLLATINGSEQUENCE clause is specified, the program collating sequence is the collating sequence associated with alphabetic name 1 specified in that clause.
(6) If no PROGRAMCOLLATINGSEQUENCE clause is specified, the program collating sequence uses the primitive collating sequence.
(7) The collating sequence established in the OBJECT-COMPUTER section is used to determine the logical values of numeric comparisons. These comparisons are those explicitly specified in the relational condition (see 6.3.1. 1 Relational conditions). a
GB/T4092.2—92
b. Explicitly specified in the condition name condition (see 6.3.1, 3 Condition name condition (condition variable)). c. Implicitly specified by the CONTROL clause in the report description (see report compilation module 3.7 CONTROL clause). (8) The program comparison sequence established in the OBJECT-COMPUTER segment applies to any non-numeric merge or sort chain, except when the COLLATING SEQUENCE phrase of each MERGE or SORT statement is specified respectively (see sort-merge module 4.1 MERGE statement and 4.4 SORT statement). 4. 5 SPECIAL-NAMES segment
4.5-1 Function
SPECIAL NAMES The section provides a means to specify a currency symbol; select a decimal point; specify a sign character; associate an implementation name with a user-defined mnemonic name; associate an alphabet name with a character set or collating sequence; and associate a class name with a character set. 4.5.2 General Format
SPECIAL-NAMES.[Limplementation name 1
IS mnemonic name 1 [ON STATUS IS condition name 1 [OFF STATUS IS condition name 2]TIS mnemonic name 2[OFF STATUS IS condition name 2[ON STATUS IS condition name IJ ON STATUS IS condition name 1 [OFF STATUS IS condition name 2]OFF STATUS IS condition name 2[ON STATUS IS condition name 1][ALPHABET alphabet name 1 IS
(STANDARD-1
STANDARD-2
NATIVE
implementation name 2
THROUGH
word value 1
L(ALSOword value 3}
SYMBOLIC CHARACTERS(((symbol characters ISARE
[IN Alphabetic name 2
CLASS class name 1 IS (word value 4
{THROUGH
[CURRENCY SIGN IS word value 6]
[DECIMAL-POINT IS COMMAJ]
4.5.3 Syntax rules
(number 1
(1) If implementation name 1 refers to an external switch, the mnemonic name associated with it can only be specified in a SET statement. (2) If implementation name 1 does not refer to an external switch, the mnemonic name associated with it can only be specified in an ACH, DISPLAY, SEND, or WRITE statement. A condition name cannot be associated with such an implementation name. GB/T 4092.2—92
(3) If the word value phrase of the ALPHABET clause is specified, a given character cannot be specified more than once in that clause. (4) The word value specified in the word value phrase of the ALPHABET clause: 8. If it is numeric, it must be an unsigned integer; and it must be between 1 and the maximum number of thousands of characters in the native character set. b. If it is a non-numeric ear and is associated with the THROUGH or ALSO phrase, each word value is a character. (5) Word value 1, word value 2, word value 3, word value 4, and word value 5 cannot be symbolic constants. (6) TH The words RU and THROUGH are equivalent. (7) The same symbol character 1 can only appear once in the SYMBOLICCHARACTERS clause. (8) The correspondence between each symbol character 1 and the integer 1 is determined by the position in which they appear in the SYMIOLICCHARACTERS clause. The first symbol character 1 corresponds to the first integer 1, the second symbol character 1 to the second integer 1, and so on.
(9) The occurrences of symbol characters 1 and integer 1 are in a one-to-one correspondence. (10) The ordinal position specified by integer 1 must exist in the native character set. If the IN phrase is given, the position must exist in the character set specified by alphabet name 2. (11) The word value specified by the value 4 phrase:
8. If it is numeric, it must be a signed integer and must be between 1 and the maximum number of characters in the native character set. b: If it is non-numeric and is associated with the THROUGH phrase, each word value is a character. (12) Word value 6 cannot be a symbolic constant.
4.5.4—General Rules
(1) All clauses that appear in a SPECIAL-NAMES section apply to programs in an included program. Any included program can refer to the condition names defined in the SPECIAL-NAMES section of the including program. (2) If implementation name 1 is an external switch, the condition name indicates the on and/or off state of the switch. The state of the switch is queried by testing the condition name (see 6.3.1.4 Switch state conditions). (3) If implementation name 1 is an external switch, the state of the switch can be changed by a SET statement of form 3 in which a mnemonic name associated with the switch is defined as an operand (see 6.235 ET statement). The implementation name indicates the external switch that can be referenced by the SET statement.
(4) The ALPHABET clause provides a means for establishing an association between a name and a specified character encoding set and/or collating sequence. When alphabetic table name 1 is referenced in the PROGRAMCOLLATINGSEQUENCE clause (see 4.4 OBJECTCOMPUTER paragraph) or in the COLLATINGSEQUENCE phrase of a SORT or MERGE statement, the ALPHABET clause identifies a collating sequence. When alphabetic table name 1 is referenced in the CODE-SET clause or SYMBOLICCHARACTERS clause of the document description, the ALPHABET clause identifies a character code set (see 3.4 CUDE-SET clause of GB/T 4092.4). If the STANDARD-1 phrase is specified, the character code set or collating sequence identified is the Chinese national standard "7-bit coded character set for information processing and information interchange". If the STANDARD-2 phrase is specified, the character code set identified is the reference character set defined in the international standard ISO) 646 "7-bit coded character set for information processing and information interchange". Each character in the standard character set is associated with the corresponding character in the native character set. The implementer defines the correspondence between the standard character set and the native character set, but there is no otherwise defined correspondence between the two character sets. h: If the NATIVE short circuit is specified, the native character encoding set or native collating sequence is used. If the implementation name 2 phrase is specified, the character encoding set or collating sequence identified is specified by the implementer. The implementer shall also C
specify the correspondence between the characters in the character encoding set specified by implementation name 2 and the characters in the native character set. GB/T4092.292
d. If the word value phrase is specified, the alphabet name cannot be used in the CODE-SET clause (see sequence module 3.4 CODESET clause). The identified collating sequence is defined according to the following rules: 1) For each word value value:
-a) If it is a numeric word value, it indicates the ordinal number of the character in the native character set. This value must not exceed the number of characters in the native character set:
b) If it is a non-numeric value, it specifies an actual character in the native character set. If the value of the non-numeric value contains multiple characters, each character in the value, starting with the last character, is assigned an increasing position in the specified collating sequence. 2) The order in which the values appear in the ALTERNATIVE clause (in increasing order) specifies the sequence of characters in the collating sequence. 3) Any characters in the native collating sequence that are not explicitly specified in the value phrase are assumed to be in the same position in the specified collating sequence as any characters that are explicitly specified. The relative order of all unspecified characters remains unchanged according to the order of the native collating sequence.
4) If the THROUGH phrase is specified, the characters in the native character set starting with the character specified by value1 and ending with the character specified by value2 are assigned increasing positions in the specified collating sequence. In addition, a contiguous string of characters specified by a given THROUGH phrase may specify characters from the native character set in ascending or descending order.
5) If the AI.SO phrase is specified, the characters from the native character set specified by word value 1 and word value 3 are assigned the same order of positions in the specified collation sequence or in the character encoding set used to represent the data. If alphabetic name 1 is used in the SYMBOLICCHARACTERS clause, only word value 1 is used to represent characters from the native character set. (5) The character with the highest order in the specified program collation sequence is associated with the constant HIGH-VALUE as long as the symbolic constant is not a word value specified in the SPECIAL-NAMES segment. If there are several characters with the highest order in the program collation sequence, the last character specified is associated with the constant HIGH-VALUE. 6) The character with the lowest order in the specified program comparison sequence is associated with the symbol constant LOW-VALUE as long as the symbol constant is not a value specified in the SPECIAL-NAMES segment. If there are several characters with the lowest order in the program comparison sequence, the first character specified is associated with the symbol constant LOW-VALUE. (7) If the symbol constants HIGH-VALUE and LOW-VALUE are word values that appear in the SPECIAL-NAMES segment.Then they correspond to the characters with the highest and lowest order in the primitive collation sequence, respectively. (8) If the IN phrase is not specified, the order of the character represented by symbol character 1 in the primitive character nest is specified by integer 1. If the IN phrase is specified, integer 1 gives the order of the character in the character set specified by alphanumeric name 2. (9) The internal representation of symbol character 1 is the internal representation of the character in the primitive character set. (10) CLASS clauses provide a way to associate a name with the character set specified in the clause. Class name 1 can only be referenced in class conditions. The characters specified by the value of the word value in this clause define the unique character set composed of class name 1. For each word value value:
a: If it is numeric, its value represents the character's ordinal number in the primitive character set. This value cannot exceed the number of characters in the primitive character set.
If it is non-numeric, its value represents the actual character in the primitive character set. If the non-numeric word value contains several characters, then each character in the word value is contained in the character set specified by category name 1. If the THROUGH phrase is given, then the characters in the native character set from the character specified by word value 4 to the character specified by word value 5 are all contained in the character set specified by category name 1. In addition, the adjacent characters specified by the given THR(UGH phrase can represent characters in the original character set in ascending or descending order. (1I) The character value 6 that appears in the CURRENCY SIGN clause represents the currency symbol in the PICTURE clause. The character value must be non-numeric and limited to a single character. It can be any character in the computer character set, but it cannot be one of the following characters: 8. Numbers 0 to 9;
b. Uppercase letters A, B, C, D, P, R, S, V, X, Z; lowercase letters a to z or space; GB/T 4092.2-92
c. Special characters ★, ten, one,,,),\,. If this clause does not appear, only the currency symbol defined in the COBOL character set is used in the PICTURE clause. (12) The meaning of the DECIMAL-POINT ISCOMMA sub-claim is that the role of this sign and the period are interchangeable in the PICTURE sentence string and the numeric character value.
5 Data section of the core module
5. 1--General description
The data section describes the data processed in the target program. The data section in the COBOI source program is optional. 5.2 Working storage section
The working storage section is located in the data section of the source program. This section describes those records and subordinate data items that are not woven into the data file. The working storage section consists of a section header, followed by a record description clause and; or an independent data description clause. The general format of the working storage section is as follows:
WORKING STORAGESECTION
F77 Layer description clause
L Record description clause"
5.2.1 Working storage independent items
In the working storage section, data items and constants that do not have a hierarchical relationship with each other do not need to be subdivided. There is no need to group them into records. Instead, they are classified and defined as independent elementary items. Each such data item is defined in a separate data description clause starting with a special layer number 77.
The following data clauses are required in each data description clause: Layer number 77
Data name
PICTURE clause or USAGEISINDEX clause Other data description clauses are optional and can be used to make the description of the data item more complete if necessary. 5.2.2 Working storage records
In the working storage section, data elements that have a definite hierarchical relationship with each other must be grouped into records according to the composition rules of the record description. Data elements that do not have a hierarchical relationship in the working storage section are grouped into records according to the composition rules of the record description. Elements can be described as records consisting of a single elementary item. All clauses used for record descriptions in the file section can be used in record descriptions in the working storage section. 5.2.3 Record Description Clause Structure
A record description clause consists of a set of data description clauses that give the characteristics of a particular record. Each data description clause consists of a layer number followed by a data name or a FIL1ER clause, if specified, followed by a series of independent clauses as required. Record description clauses have a hierarchical structure, so the clauses in a clause vary greatly depending on whether a clause is followed by subordinate clauses. The structure of record descriptions and the elements allowed in a record description clause are explained in "The Concept of Layers" and "Data Description Clauses". 5.2.4 Initial Values
The initial value of any data item in the working storage section, except for indexed data items, is provided by the VALUE clause associated with the data item. The initial value of indexed data items and the initial value of data items without a VALUE clause are both technically defined. 5.3 Data Description Clauses
5. 3.1 Function
Data description clause specifies the characteristics of a particular data item. 5.3.2 General format
Format 1:
[Data name 1
LFILLER
[REDEFINES
PICTURE
FUSAGE
OCCURS
Data name 2
String
BINARY
GB/T 4092. 2—92
COMPUTATIONAL
PACKED-DECIMALJ
LEADING
TRAILING
[SEPARATE CHARACTER]
Integer 2TIMES
ASCENDING
DESCENDING
KEYIS{data name 3}·
[INDEXED BY(bit name 1}-]
OCCURS integer 1TO integer 2TIMES
DEPENDING ON data name 4
[ASCENDING
IDESCENDING
KEYIS(data name 3!
INDEXED BY
1bit name 1}---]
[SYNCHRONIZEDILEFT
LRIGHT
JUSTIFIED
[VALUE
Format 2:
WIIEN ZEROJ
word value 1]-
data name 1RFNAMES
Format 3:
88Condition name
YALUES
5.3.3Syntax rules
data name
THROUGH
THROUGH
data name 3
(1) The level number in format 1 can be any number from 01 to -49 or 77. (2) In format 1, if data name 1 or a FILLER clause is specified, they must follow the level number. If a REDEFINES clause is specified, it must follow the specified data name 1 clause or FILLER clause. In other cases, the RE-DEFINES clause must follow the level number. The other clauses can be written in any order. (3) A PICTURE clause must be specified for each primary item, except for positional data items and the main item in a RENAME statement, for which a PICTURE clause is not allowed. (4) The words THRU and THROUGH are equivalent. 5. 3.4 General rules
(1) The SYNCHRONIZED, PICTURE, JUSTIFIEI) and BIANKWHENZERO clauses may only be specified if there are primary data items.
GB/T4092.2—92
(2) Format 3 is used for each condition name. Each condition name requires a single description item with level number 88. Format 3 contains the condition name and a value, multiple values, or a range of values associated with the condition name. Each condition name description item for a particular condition variable must immediately follow the data item description item associated with the condition name. A condition name can be associated with a data item description that contains a level number; however, the following exceptions apply:
. Another condition name.
b A data item with level number 66.
C A group of data items described by a JUSTIFIED, SYNCHR()NIZED, or USAGF (not USAGEISDISPLAY) clause.
d.
(3) A multi-01 layer description clause subordinate to any given layer indicator implicitly represents a redefinition of the same region, while a multi-01 layer description clause subordinate to the layer indicator RD of the report description clause has no such meaning. 5.4 BLANKWHENZERO clause
5.4.1 Function
The function of the BLANKWHENZERO clause is to set the data item to blank when the value of the data item is zero. 5.4.2 General format
BLANKWHEN2
5.4.3 Syntax rules
(1) The BLANKWHENZERO clause can only be used with primary items, and its PICTURE clause should indicate a numeric type or a numeric edit type (see 5.9 PICTURE clause). (2) A numeric or numeric-definition data item to which the BLANKWHENZERO clause applies must be described as USAGE IS DISPLAY, either implicitly or explicitly.
5.4.4 General Rules
(1) When the BLANKWHENZERO clause is used, if the value of a data item is a list, the data item may contain only spaces. (2) If the BLANKWHENZERO clause applies to a numeric data item, the data item is treated as a numeric-definition data item.
5.5DATA-NAMEORFILLER Clause
5.5-1 Function
The data name specifies the name of the data item to be described. The base word FI1.1,ER can be used to specify a data item that is not explicitly referenced. 5.5.2 General format
【dataname1
LFILLER
5.5.3 Syntax rules
(1) In the file description, working storage, communication and connection sections, if either dataname1 or the baseword FILLER is specified, then they must be the first word following the layer number in each data description clause. 5.5.4 General rules
(1) If either is omitted, the data item to be described is treated as a FILLER data item. (2) The baseword FILLER can be used to name a data item. In any case, explicit reference to FILLER data items is not allowed. However, the baseword FILLER can be used as a conditional variable because such use does not require explicit reference to the data item itself but only to its value.
5.6 JUSTIFIED clause
5.6. 1 Function
The JUSTIFIED clause specifies nonstandard positioning of data within a received data item. 5.6.2
-Just format
(JUSTIFIED
5.6-3 Syntax rules
GB/T 4092.2—92
(1) The JUSTIFIED clause can only be used at the elementary level. (2) JUST is the abbreviation of JUSTIFIED.
(3) The JUSTIFIED clause cannot be used for any data item described as a numeric type or indicating editing requirements. (4) The JUSTIFIED clause cannot be used for placeholder data items. 5.6.4 General rules
(1) When the received data item is described with the JUSTIFIED clause and the length of the sent data item is greater than the length of the received data item, the extra characters on the left are truncated. When the receive data item is described with the JUSTIFIED clause and its length is greater than the send data item length, the data is aligned to the last character position of the data item and any remaining character positions at the left end are filled with spaces. (2) When the JUSTIFIED clause is omitted, the standard rules for alignment are used for primary items. 5.7 Level Numbers
5.7.1 Function
The level number indicates the position of the data item in the logical record hierarchy. In addition, it is used to identify the description items of working storage data items, connection items, condition names, and RENAMES clauses. 5.7.2 General Format
5.7.3 Syntax Rules
(1) In each data description item, the level number must be its first component. (2) The level number of a data description item belonging to FI), SD), or CD must be a number between 01 and 49 or 66 or 88. (3) The layer number of the data description item in the working storage section and the connection section must be a number between 01-49 or 6677 or 885.7.4 General Rules
(1) In each record description, layer number 01 is used to identify its first description item. (2) Some special layer numbers are assigned to certain capture items, but the true meaning of the layer has been lost. 8. Layer number 77 is used to identify independent L. work storage data items and independent connection data items, and can only be used according to the format 1 of the data capture description item (see 5.3.2 Data Description Item). b. Layer number 66 is used to identify the RENAMES data description item; and can only be used according to the format 2 of the data description item (see 5.3.2 Data Description Item).
c Layer number 88 is assigned to such a description clause, which defines the condition name associated with the condition variable; and can only be used in accordance with format 3 of the data description clause (see 5.3.2 Data Description Clause) (3) For any given layer indicator other than the subordinate layer indicator RD of the report description clause, multiple 01 layer description clauses indicate intermittent redefinition of the same storage area.
5.8 (OCCURS clause
5.8. 1 Function
CCIR This clause eliminates the need for repeated descriptions of repeated data items and provides the required information for subscript applications. 5.8.2 General format
Format 1:
OCCLRS integer 2
ASCENDING
DESCENDING
KEY IS (data name 2)-(2) JUST is an abbreviation for JUSTIFIED.
(3) The JUSTIFIED clause cannot be used for any data item described as a numeric type or indicating editing requirements. (4) The JUSTIFIED clause cannot be used for positional data items. 5.6.4 General rules
(1) When the receiving data item is described with the JUSTIFIED clause and the length of the sending data item is greater than the length of the receiving data item, the leftmost excess characters are truncated. When the receiving data item is described with the JUSTIFIED clause and its length is greater than the length of the sending data item, the data is aligned according to the last character position of the data item, and the leftmost excess character position is filled with spaces. (2) When the JUSTIFIED clause is omitted, the standard rules for alignment are used for elementary items. 5.7 Level number
5.7.1 Function
The level number indicates the position of the data item in the logical record hierarchy. In addition, it is used to identify the description items of working storage data items, connection items, condition names and RENAMES sub-items. 5.7.2 General format
5.7.3 Syntax rules
(1) In each data description item, the level number must be its first component. (2) The level number of the data description item belonging to FI), SD) or CD must be a number between 01 and 49 or 66 or 88. (3) The level number of the data description item in the working storage section and the connection section must be a number between 01 and 49 or 6677 or 885.7.4 General rules
(1) In each record description, the level number 01 is used to identify its first description item. (2) Some special level numbers are assigned to some description items, but the real meaning of the level has been lost. 8. Layer number 77 is used to identify independent L. storage data items, independent connection data items, and can only be used in accordance with format 1 of the data capture description clause (see 5.3.2 Data Description Clause). b. Layer number 66 is used to identify the RENAMES data description clause; and can only be used in accordance with format 2 of the data description clause (see 5.3.2 Data Description Clause).
c. Layer number 88 is assigned to such a description clause, which defines the condition name associated with the condition variable; and can only be used in accordance with format 3 of the data description clause (see 5.3.2 Data Description Clause) (3) For any given layer indicator other than the subordinate layer indicator RD of the report description clause, multiple 01 layer description clauses represent intermittent redefinition of the same storage area.
5.8 (OCCURS clause
5.8. 1 Function
CCIR clause makes repeated data items unnecessary to be described repeatedly and provides the required information for subscript application. 5.8.2 General format
Format 1:
OCCLRS integer 2
ASCENDING
DESCENDING
KEY IS (data name 2)-(2) JUST is an abbreviation for JUSTIFIED.
(3) The JUSTIFIED clause cannot be used for any data item described as a numeric type or indicating editing requirements. (4) The JUSTIFIED clause cannot be used for positional data items. 5.6.4 General rules
(1) When the receiving data item is described with the JUSTIFIED clause and the length of the sending data item is greater than the length of the receiving data item, the leftmost excess characters are truncated. When the receiving data item is described with the JUSTIFIED clause and its length is greater than the length of the sending data item, the data is aligned according to the last character position of the data item, and the leftmost excess character position is filled with spaces. (2) When the JUSTIFIED clause is omitted, the standard rules for alignment are used for elementary items. 5.7 Level number
5.7.1 Function
The level number indicates the position of the data item in the logical record hierarchy. In addition, it is used to identify the description items of working storage data items, connection items, condition names and RENAMES sub-items. 5.7.2 General format
5.7.3 Syntax rules
(1) In each data description item, the level number must be its first component. (2) The level number of the data description item belonging to FI), SD) or CD must be a number between 01 and 49 or 66 or 88. (3) The level number of the data description item in the working storage section and the connection section must be a number between 01 and 49 or 6677 or 885.7.4 General rules
(1) In each record description, the level number 01 is used to identify its first description item. (2) Some special level numbers are assigned to some description items, but the real meaning of the level has been lost. 8. Layer number 77 is used to identify independent L. storage data items, independent connection data items, and can only be used in accordance with format 1 of the data capture description clause (see 5.3.2 Data Description Clause). b. Layer number 66 is used to identify the RENAMES data description clause; and can only be used in accordance with format 2 of the data description clause (see 5.3.2 Data Description Clause).
c. Layer number 88 is assigned to such a description clause, which defines the condition name associated with the condition variable; and can only be used in accordance with format 3 of the data description clause (see 5.3.2 Data Description Clause) (3) For any given layer indicator other than the subordinate layer indicator RD of the report description clause, multiple 01 layer description clauses represent intermittent redefinition of the same storage area.
5.8 (OCCURS clause
5.8. 1 Function
CCIR clause makes repeated data items unnecessary to be described repeatedly and provides the required information for subscript application. 5.8.2 General format
Format 1:
OCCLRS integer 2
ASCENDING
DESCENDING
KEY IS (data name 2)-
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.