Getting Started with COBOL language

Source: Internet
Author: User
Tags tutorialspoint

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.