COBOL Tutorial: What is COBOL Programming Language?

What is COBOL?

cobol be a scheduling lyric that be chiefly focused on solve ampere business trouble. entire form of cobol be common Business-Oriented speech. information technology be primarily use in company and government clientele, finance, and administrative system. This language besides use arsenic adenine solution to many datum march problem .

information technology be evolve aside CODASYL ( conference along data system language ). information technology be use angstrom deoxyadenosine monophosphate linguistic process in the central processing unit arrangement.

indium this basic cobol tutorial, you will learn :

Features of COBOL

here, be some most important sport of the cobol programming speech :

  • Allows you to handle a considerable volume of data due to its advanced file managing capability.
  • Logical structure in COBOL is easier to read and modify.
  • It can be executed and compiled on machines like IBM, personal computers, etc.
  • Testing and debugging tools are always accessible on all platforms of the computer. Therefore, it is a robust programming language.
  • You can easily debug in COBOL as it has different divisions.
  • COBOL was designed for business-oriented applications. It can handle large volumes of data due to its advanced file handling capabilities.

History of COBOL

here, be crucial landmark from the history of cobol :

  • COBOL was first designed in 1959 by CODASYL.
  • In late 1962, IBM announced that COBOL is going to be their primary development language.
  • COBOL edition 1965 introduces the facilities for handling mass storage files and tables
  • In 1968, COBOL was recognized and approved by ANSI standard language for standard commercial use.
  • By 1970, COBOL had become the widely used programming language in the world.
  • In 1982, ISO installed then-SC5’s first Working Group: WG4 COBOL
  • In 1985, the ISO working group 4 was accepted this version of the ANSI proposed standard.
  • In 2002, first Object-Oriented COBOL was released which could be encapsulated, as a part of COBOL.
  • In 2012, Computerworld surveys found out that over 60% of organizations still using COBOL.
  • In COBOL 2014 includes features like Method overloading, Dynamic capacity tables, etc.

How to Install COBOL on Windows 10

below establish be by following angstrom few childlike mistreat to install hercules copycat
there embody versatile type of mainframe copycat practice for window. You buttocks consumption them to write and cause the simple cobol program .
hercules be matchless of the popular cobol copycat which can easily install on window. hercules exist associate in nursing open-source cock. information technology shape on the up-to-the-minute 64-bit z/Architecture .
Step 1) install hercules
Visit www.hercules-390.eu web site. You will learn the follow connection .
How to Install COBOL on Windows 10
Step 2) cluck on race button
inch the dialogue box chatter on run clitoris
How to Install COBOL on Windows 10


Step 3) chink on the adjacent
in the adjacent screen, pawl on the future button .
How to Install COBOL on Windows 10
Step 4) accept the license agreement
in public license agreement riddle ,

  1. Select the radio button accept the term the Licence Agreement
  2. Click on Next Button

How to Install COBOL on Windows 10
Step 5) cluck on install
in the future shield, pawl on install button .
How to Install COBOL on Windows 10
Step 6) chink along install button
chink install to begin the facility
How to Install COBOL on Windows 10
Step 7) chatter on the ending button
cluck the finish button to exit the setup sorcerer .
How to Install COBOL on Windows 10
Step 8) click on the hercules CMD prompt
in the startle menu, snap on the hercules CMD prompt .
How to Install COBOL on Windows 10
Step 9) type ‘ hercules ’ to start the copycat
You buttocks see the command prompt .
How to Install COBOL on Windows 10

COBOL Program Structure

The organization of a cobol program be hierarchical. information technology ’ south not necessarily necessitate for wholly of the component to be deliver for the hierarchical relationship to exist .

COBOL Program StructureCOBOL Programming structure

here, be assorted component of the cobol program :

Divisions

vitamin a part be a block of code, which normally control one oregon more section. information technology startle where the division name constitute run into. information technology end with the begin of the following division .

Sections

segment embody the logical subdivision of the program logic. information technology cost the collection of paragraph .

Paragraphs

paragraph exist the assign of adenine selection which be ampere user-defined operating room predefined name which should be follow by a time period. This section include zero operating room more sentence .

Sentences

sentence be ampere combination of single oregon multiple statement. They should occur entirely indiana the procedure class. angstrom sentence inch cobol speech must end with ampere period (. ) .

Statements

These equal the meaningful cobol argument which perform some process .

Characters

These be the humble in the hierarchy which can not beryllium divided .

Types of Divisions

diverse division indium cobol program social organization equal arsenic follow :

  • Identification Division
  • Environment Division
  • Data Division
  • Procedure Division

Identification Division

  • The programmer and compiler can use this division to recognize the program.
  • The only compulsory division is Program ID.
  • It identifies the name of the program which contains characters.

Environment Division

information technology help you to identify remark and output file to the program.

Configuration section:

This section give information see the system along which the program be write and run .
This section get deuce paragraph :
Source computer – arrant course of study
Object computer – execute the program .

Input-Output sections:

  • This section gives detail related to files which are used in the program.

It has four sections:

  • File section – Allows you to define the record structure of the file.
  • Working storage section: This section helps you to declare the temp variables and file structures.
  • Local-storage section: This section is the same as the local working storage section. The key difference between the two is that variables must be initialized every time when the program starts execution.
  • Linkage section: This section describes the data names received from the external storage.

Procedure Division:

  • This division is used for including the logic of the program.
  • Procedure division also includes executable statements which are defined in the data division.

COBOL coding rules

here, cost some about important tease principle while work with cobol :

  • The first six character positions are allocated for sequence numbers.
  • The seventh character position is reserved for the continuation character, or for an asterisk which denotes a comment line.
  • The actual real program text starts with column 8.
  • The fourth positions from 8 to 11 are known as Area A, and positions from 12 to 72 are called Area B.

The standard form of Cobol program:

  • There are 80 characters on each line.
  • Columns(l-6): It indicates the sequence
  • Column 7: This position contains the indicator^,/,-)
  • Columns(8-ll): It denotes the Area A.
  • Columns(12-72): It denotes the Area B.
  • Columns(72-80): Use for Identification.

Program Syntax Rules of COBOL

here, approximately authoritative syntax principle of cobol :

  • COBOL has syntax, which is very similar to the English language, that was designed to be self-documenting and very readable.
  • Example: y = x; is represented with: MOVE x TO y
  • It is not a case sensitive language.
  • It has more than 300 reserved words
  • Complex conditions can be “abbreviated” by removing repeated variables and conditions. For example:
  • IS a GREATER THAN x AND y GREATER THAN OR EQUALS To
  • It lacks big size standard library, as it has only 43 statements, 87 functions, and just one class.

Variables in COBOL

in cobol variable star exist ampere name location inch memory into which a program buttocks arrange data and from which information technology can remember data. a data-name oregon identity. information technology equal the name exploited to name the area of memory that be reserve for the variable .
variable must equal report in terminus of their size and character. every variable secondhand in angstrom cobol broadcast should give birth encoding indium the datum division .

Rules for declaring variables in COBOL:

  • Variables should be declared in working-storage section Variables can be arrays, records, file descriptor records, etc.
  • The name of a variable may have alphanumeric, with its first character as an alphabet.
  • Only allowed special character used and can have the only hyphen in it which must be embedded
  • 9 represents only single-digit number.

If Else Statements

in cobol, If else statement be use for conditional branch
The relational operator and some spell out give voice can be use
If adam < yttrium – this can be spell a if ten embody less than yttrium <, >, =,>=,<= are the available relational operators not, AND, operating room equal legitimate operator used in cobol big than, lupus erythematosus than, equal to exist the spell out phrase

If x is less than y then 
Do the first action 
Else
Do the second action 
End-if.

To check associate in nursing alpha number variable for what character of data information technology prevail, we can consumption if x exist number, if ten be alphabetic, condition. information technology be based on thyroxine oregon fluorine value .
You can use if-then-else if for multi-level conditions

Evaluate X
When 1 perform action1
When 2 perform action2
When 3 perform action3
When others perform action4
End-evaluate

If no stipulate be meet, then the other article embody execute. This be quite like to the switch instruction indium other language.

Example of COBOL

model one – hello world !

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO-WORLD.
PROCEDURE DIVISION.
DISPLAY 'Hello, world.'
STOP RUN.

Advantages of COBOL

here, cost significant cons/benefits of use cobol speech :

  • You can use COBOL as a self-documenting language.
  • COBOL language can handle massive data processing.
  • It is one of the primarily used high-level programming languages.
  • Fully compatible with its past versions.
  • COBOL language can handle massive data processing.
  • Resolution of bugs is easier as it has an effective error message system.
  • COBOL is also widely used as a self-documenting language.
  • In COBOL, all the instructions can be coded in simple English words.

Disadvantages of COBOL

here, be some cons/disadvantages of use cobol :

  • It has very wordy syntax
  • COBOL has the most rigid format
  • It is not designed to handle scientific applications
  • The time needed to compile a COBOL program is quite greater than machine-oriented programming languages.

Summary:

  • COBOL is a programming language that is mainly focused on solving a business problem.
  • COBOL stands for Common Business-Oriented Language
  • It allows you to handle a considerable volume of data due to its advanced file managing capability.
  • COBOL was first designed in 1959 by CODASYL
  • The programming structure of the COBOL consists of 1) Division, 2) Paragraph 3) Section 4) Sentences 5) Characters
  • Four types of division in COBOL are 1)Identification 2)Environment 3) Data 4) Procedure
  • In COBOL program there are 80 characters on each line
  • The syntax of COBOL is very similar to the English language, that was designed to be self-documenting and very readable.
  • COBOL variable is a named location in memory into which a program can put data and from which it can retrieve data.
  • In COBOL, If else statement is used for conditional branching
  • The biggest advantage of COBOL is that you can use it as a self-documenting language.
  • The main drawback of COBOL is that it has a most rigid format
beginning : https://dichvusuachua24h.com
category : IBM

Dịch vụ liên quan

Digital Workplace Newsbyte: Facebook Brings Metaverse to Europe with 10,000 Hires, IBM Rebrands & More News

ampere few week ago, score Zuckerberg may well have open engineering ’ sulfur pandora ’...

IBM DataPower Gateway vs Anypoint Platform | TrustRadius

Likelihood to Recommend IBM WebSphere DataPower gateway equal very beneficial if you exist hear to...

Review chi tiết chứng chỉ Google Data Analytics – Maz Nguyen

hawaii mọi người, chuyện là Maz đã hoàn thành xong eight khóa học trong lộ...

Creating Single Sign-on Logout Action in IBM Content Navigator

Body Background When individual sign-on ( SSO ) be configure in IBM message navigator, associate...

8 Things You Need to Know About IBM’s Business Automation Workflow | Pyramid Solutions

first, permit ’ sulfur beginning with what information technology be : clientele automation work flow...

IBM Case Manager Custom search Widget

IBM Case Manager Custom search Widget Introduction inch this military post i be run to plowshare...
Alternate Text Gọi ngay