COBOL language Introduction
COBOL Introduction--Business computing preferred Language COBOL is the acronym for the Common Business oriented Language (general commercial language). Widely used in the field of data management, such as accounting work, statistical reports, planning, personnel management. is referred to as the "language for Administration".
Characteristics of data processing:
The arithmetic computation quantity is few and the logic processing is many;
Large input and output volume;
There is a certain logical relationship between data;
A large number of sorting sorts.
The main function is to describe the data structure and analyze the processing of large quantities.
The vast majority of banks, which complete all their trading functions, are implemented using COBOL.
1. Basic knowledge
The COBOL program is divided into four departments: from the top to the bottom of the program structure, the Identification department , the Environment department , the Data department and the process department .
From the structure level, COBOL is composed of four levels: Department, section, segment and sentence.
Example:
Department Identification Division.
Section input-output.
Segment Program-id. EXAMPLE.
MOVE A to B.
Logo Department:
Identification Division.
Program-id. EXAMPLE.
Ministry of Environment:
Environment Division.
CONFIGURATION section.
Input-output section.
Data department:
DATA Division.
FILE section.
Working-storage section.
Process Department:
PROCEDURE section.
Main-procedure.
DISPLAY ' HELLO world! '.
STOP RUN.
A simple example:
******************************************************************* Author:kevin Yang*Date: 2015/6/20* Purpose:this is an example of COBOL program* tectonics:cobc***************************************************** Identification Division.*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-program-id. EXAMPLE.Environment Division.*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-configuration Section.*-----------------------input-output section.*-----------------------DATA Division.*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-file Section.*-----------------------working-storage section.*-----------------------PROCEDURE Division.*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-main-procedure.* * * The Main procedure of the Program**display"Hello World"STOPRUN.* * Add other procedures hereENDProgram EXAMPLE.
View Code
2. Development tools
Because COBOL programs generally run on large hosts, and large host resources are rare, beginners do not have so many opportunities to practice the program directly above. But it's hard to think of someone who really wants to learn. Here I offer several workarounds (only under Windows).
Recommendation: Opencobolide is an open-source COBOL development tool that works better.
Tutorialspoint IDE Online is an on-line COBOL IDE
Visual COBOL Visual Studio is a plug-in that can be used to write COBOL programs that need to be purchased, but can be tried (personally feeling far less than the previous two easy to use)
3. Learning website
3.1 Manframestechhelp (recommended)
3.2 Tutorialspoint
3.3 CSIS (good example)
Getting Started with COBOL language