Lesson #2 - COBOL Programming

0.0(0)
Studied by 8 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/65

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:35 PM on 9/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

66 Terms

1
New cards

data name or variable

A user-defined name used to identify and store data in a COBOL program.

2
New cards

DATA DIVISION

Where are data names or variables declared?

3
New cards

30 characters

How long can a COBOL data name be?

4
New cards

one alphabetic character

What must a COBOL data name contain at least?

5
New cards

hyphen

What is the only special symbol allowed in a COBOL data name?

6
New cards

No

Are blanks allowed in COBOL data names?

7
New cards

IDENTIFICATION DIVISION

What is the first division of a COBOL program?

8
New cards

IDENTIFICATION DIVISION

To provide information about the program and identify it to users.

9
New cards

PROGRAM-ID

What is the only required paragraph in the IDENTIFICATION DIVISION?

10
New cards

AUTHOR, INSTALLATION, DATE-WRITTEN, DATE-COMPILED, SECURITY

Give examples of optional information in the IDENTIFICATION DIVISION.

11
New cards

ENVIRONMENT DIVISION

The computing environment where the COBOL program is written and run.

12
New cards

computing environment

The type of computer hardware/system on which the program is compiled and executed.

13
New cards

ENVIRONMENT DIVISION

The type of computer hardware/system on which the program is compiled and executed.

14
New cards

ENVIRONMENT DIVISION

Information about the computer equipment and data files used by the program.

15
New cards

CONFIGURATION SECTION

A section where it provides information about the computer on which the COBOL program is compiled and executed.

16
New cards

SOURCE-COMPUTER, OBJECT-COMPUTER, SPECIAL-NAMES

What are the three paragraphs of the CONFIGURATION SECTION?

17
New cards

SOURCE-COMPUTER

The computer used for compiling the program.

18
New cards

OBJECT-COMPUTER

The computer used for executing/running the program.

19
New cards

SPECIAL-NAMES

Special information used for reading or displaying data.

20
New cards

INPUT-OUTPUT SECTION

A section where it provides details about the input and output devices/files used by the program.

21
New cards

Terminals, printers, and disk drives

What devices can be described in the INPUT-OUTPUT SECTION?

22
New cards

FILE-CONTROL

What paragraph does the INPUT-OUTPUT SECTION start with?

23
New cards

SELECT

It defines a file and assigns it to a device.

24
New cards

input file

A file containing source data for processing.

25
New cards

output file

A file containing a report or result.

26
New cards

DATA DIVISION

Where are data names or variables defined and declared?

27
New cards

Data Name, Level Number, Picture Clause, Value Clause.

What four terms should be considered when describing data in COBOL?

28
New cards

Level Number

It specifies the level of data in a record.

29
New cards

Elementary items, Group items

What are the two types of data items based on their level?

30
New cards

elementary item

A data item that cannot be divided further.

31
New cards

group item

A data item consisting of one or more elementary items.

32
New cards

Level number, Data Name, PICTURE, and optionally VALUE

What clauses can describe an elementary item?

33
New cards

Level number, Data Name, and optionally the VALUE clause

What can be used to describe a group item?

34
New cards

Record description entry

What is level number 01 used for?

35
New cards

Group and elementary items

What are level numbers 02 to 49 used for?

36
New cards

RENAMES clause items

What is level number 66 used for?

37
New cards

Items that cannot be subdivided.

What is level number 77 used for?

38
New cards

Condition-name entries

What is level number 88 used for?

39
New cards

PICTURE CLAUSE

A clause to describe the format and characteristics of a data item.

40
New cards

PIC clause

The type of clause where it tells the compiler what type of data will be stored and how it will be displayed.

41
New cards

Data type, sign, decimal point position, and length

What four things does the PICTURE CLAUSE define?

42
New cards

any character

What does X represent in a PIC clause?

43
New cards

numeric character

What does 9 represent in a PIC clause?

44
New cards

alphabetic character

What does A represent in a PIC clause?

45
New cards

alphabetic with 10 characters

What does PIC A(10) mean?

46
New cards

numeric field with 5 digits

What does PIC 9(5) mean?

47
New cards

8 characters of any type.

What does PIC X(8) mean?

48
New cards

positive or negative numbers

What does the S indicate?

49
New cards

no

Does S, V and P use actual storage space?

50
New cards

implied decimal point

What does V represent?

51
New cards

numeric place holder

What does P represent?

52
New cards

P

What arithmetic positioning characters change the precision or represent assumed decimal positions in numeric values?

53
New cards

Zero Suppress

What does Z mean in COBOL numeric editing?

54
New cards

Z

It replaces leading zeros with blanks.

55
New cards

comma

It inserts a comma into the data item at that position.

56
New cards

Dollar sign

What does $ represent in numeric editing?

57
New cards

$

It inserts a dollar sign into the first position of the data item.

58
New cards

Asterisk (*)

It replaces leading zeros with asterisks.

59
New cards

Check writing

What is * commonly used for?

60
New cards

Credit

What does CR mean?

61
New cards

Debit

What does DB mean?

62
New cards

Placed at the end of a PICTURE clause, it displays CR or DB if the item is negative and remains blank if the item is positive.

What is the purpose of the CR (Credit) and DB (Debit) numeric editing character in a COBOL PICTURE clause?

63
New cards

inserts a slash into the specified position of the data item

How does the / (Slash) character function as a numeric editing character?

64
New cards

inserts a zero into the specified position of the data item

How does the 0 (Zero) character function as a numeric editing character?

65
New cards

VALUE clause

It is an optional clause used to initialize data items.

66
New cards

Numeric literals, alphanumeric literals, or figurative constants (SPACES)

What types of values can be specified in a VALUE clause?