Cobol Examples

We explain that what are the examples of Cobol programming language? One of the oldest programming languages ​​that exists is COBOL , short for Common Business Oriented Language. This computer language was developed in 1959 with the purpose of having a Programming Language that was very close to the English language and that was oriented to administrative processes, since the languages ​​of the time were very oriented to scientific processes and mathematical calculations. .

This feature of the COBOL language made it very popular and large systems were developed with it, to such an extent that when other languages ​​emerged it was too expensive to migrate all existing applications in COBOL . From this, a great boost was given to the degree that there are current versions of this language such as Microsoft COBOL, Rm / COBOL 11 and COBOL 650 to name a few.

In the version of COBOL 85, its compiler standards included local variables, recursion, support for structured programming and dynamic memory reserve in order to compete with the modern computing languages ​​that were emerging.

The computers in which this language is most used are the large computers known as Mainframe such as the IBM System 390. COBOL is used either to develop online applications or batch processes (BATCH). The main applications developed in COBOL are payroll, accounting and a large number of banking and financial systems.

COBOL Example

Program that displays a message.

IDENTIFICATION DIVISION.
PROGRAM-ID. ExampleCOBOL.

ENVIRONMENT DIVISION.

DATA DIVISION.
WORKING-STORAGE SECTION.

PROCEDURE DIVISION.

DISPLAY “Cobol sample program”.
STOP RUN
COBOL CICS example:

***********

* CICS-COBOL EXAMPLE PROGRAM
*
************

IDENTIFICATION DIVISION.
PROGRAM-ID.Example CICSCOBOL

ENVIRONMENT DIVISION.

DATA DIVISION.
WORKING-STORAGE SECTION.

01 EXAMPLE PL PIC X (1000).
01 EXAMPLEOPI REDEFINES EXAMPLEOMP.
02 FILLER PIC X (12).
01 EXAMPLE REDEFINES EXAMPLE MPI.
02 FILLER PIC X (12).
*
PROCEDURE DIVISION.
*

Unfold-MAP.
EXEC CICS SEND MAP (‘CICS COBOL Sample’)
MAPONLY
ERASE
NOHANDLE
END-EXEC.
FIN-PGM.
EXEC CICS RETURN
END-EXEC.
GOBACK.

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also
Close
Back to top button