COBOL program format

xiaoxiao2021-03-06  62

The format of the COBOL source program is as follows: There are 6 characters in each line. You can enter 000010, 000020, etc., or may not be lost. The serial number zone is an indicator area of ​​a character (5th), as shown in the first line. You can use * and / to comment, _ means continuation, D represent debugging. The indicator area is behind 4 characters (8 ~ 11) A zone. You can put in portions, segments, segments, segment names, layers indicators, and layers 01 and 77, keywords Declaratives, and End Declaratives, the program ends the title. The A zone is behind (after 12 digits) is a statement, called a zone. The statement of the process department must start from the B zone. The B region is usually 72 or 80 characters. This example is 70 characters. Each zone of the blank line is a space identification unit (2 ~ 4 line), and the Program-ID section contains the program name, which is necessary for each program. Other sections such as Author can be available. The Ministry of Environment (5 ~ 15 lines) provides items related to the outside of the program, specifically, is the file used by the program. If you don't need to be omitted. The environment has a configuration festival (6 ~ 10 rows) and input output fees (11 to 15 lines). Chain 7 represents the computer of the compiler. If you specify with debugging mode, you will be compiled. Chapter 8 represents the computer running. The 9th, 10 lines contain a set of specified output styles. Here is the standard output and can be customized. The input and output section is only used for files. Sections 13 to 15 indicate that this segment contains an item for each file if the program uses the file. The format of the file control project depends on the type of document. Data units (16-22 rows), providing the storage location of program variables, divided into different data types into different sections: file section, static data, parameters, communication ( Communication Section, Report. Document Festival (18 ~ 21 line), each file description contains the definition of files contained in the file, data in the file section or from the file, or the program of write files. Chapter 22 represents the work storage festival, which contains the temporary results required for the program and the data initialized static data. Linkage Section contains data transferred by the call (called parameters in other languages). Communication Section, process messages between COBOL programs and communication devices. Report Section, the Report section implements the data required by the COBOL report writing tool system. The PIC of the 20th, 21 line is the abbreviation of the Picture, indicating the defined data format. X (12) represents a string of 12 characters, 9 (09) represents 9-bit integers. The basic items can be formed into hierarchies, called group data items or groups.

转载请注明原文地址:https://www.9cbs.com/read-83138.html

New Post(0)