Introduction to COBOL

0.0(0)
studied byStudied by 1 person
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

29 Terms

1
New cards

COBOL

  • stands for Common Business-Oriented Language

  • one of the oldest high-level programming languages

  • primarily used for business, finance, and administrative systems

  • designed to be easily understood and used by non-technical people

2
New cards

Key COBOL Features

  • global business language

  • easy readability

  • seamless integration with modern systems

  • portable language

  • evolving language

3
New cards

COBOL Program Structure

knowt flashcard image
4
New cards

Sections (Program Structure)

logical subdivision of program logic

  • a collection of paragraphs

5
New cards

Paragraphs (Program Structure)

subdivision of a section or division

  • either a user defined or a predefined name followed by a period, and consists of zero or more sentences/entries

6
New cards

Sentences (Program Structure)

combination of one or more statements

  • appear only in the Procedure division

  • must end with a period

7
New cards

Statements (Program Structure)

performs some processing

8
New cards

Characters (Program Structure)

lowest in the hierarchy and cannot be divisible

9
New cards

Identification Division

  • mandatory division

  • this division is used to identify the program

  • PROGRAM-ID is mandatory in this division

    • program name

    • consist of 1 to 30 characters

<ul><li><p>mandatory division</p></li><li><p>this division is used to identify the program</p></li><li><p>PROGRAM-ID is mandatory in this division</p><ul><li><p>program name</p></li><li><p>consist of 1 to 30 characters</p></li></ul></li></ul>
10
New cards

Environment Division

  • specify input and output files to the program

  • consist of two sections:

    • Configuration section

    • Input-Output Section

11
New cards

Configuration Section (Environment Division)

provides information about the system on which the program is written and executed

Consist of two paragraphs:

  • Source Computer - system used to compile the program

  • Object Computer - system used to execute the program

12
New cards

Input-Output Section (Environment Division)

provides information about the files to be used in the program

Consist of two paragraphs:

  • File Control - provides information of external data sets used in the program

  • I-O control - provides information of files used in the program

13
New cards

Data Division

used to define the variables used in the program

14
New cards

File Section (Data Division)

used to define the record structure of the file

15
New cards

Working-Storage Section (Data Division)

used to declare temporary variables and file structure which are used in the program

16
New cards

Local-Storage Section (Data Division)

  • similar to Working-Storage section

  • variables will be allocated and initialized every time a program starts execution

17
New cards

Linkage Section (Data Division)

used to describe the data names that are received from an external program

18
New cards

Procedure Division

  • used to include the logic of the program

  • consists of executable statements using variables defined in the data division

  • last statement to end the execution should be STOP RUN or EXIT PROGRAM

19
New cards

Position 1-6

  • column numbers

  • reserved for line numbers

20
New cards

Position 7

  • indicator

  • can have an asterisk * indicating comments

  • can have hyphen - indicating continuation

  • can have slash / indicating from feed

21
New cards

Position 8-11

  • area A

  • COBOL divisions, sections, paragraphs and special entries begins in this area

22
New cards

Positions 12-72

  • area B

  • COBOL statements must begin in this area

23
New cards

Positions 78-80

  • identification area

  • can be used as needed by the programmer

24
New cards

Symbol 9

used for declaring numeric data type

25
New cards

Symbol A

used for declaring alphabet

26
New cards

Symbol X

used for declaring alphanumeric

27
New cards

Symbol V

used for declaring Implicit Decimal

28
New cards

Symbol S

used for declaring sign

29
New cards

Symbol P

used for declaring assumed decimal