COBOL Flashcards

(72 cards)

1
Q

What does COBOL stand for?

A

Common Business Oriented Language

COBOL is primarily designed for business applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

COBOL is mainly used for what type of applications?

A

Business applications like payroll and inventory

COBOL is not typically used for gaming or scientific computing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which of the following best describes COBOL’s nature?

A

English-like and business-oriented

This makes COBOL more accessible for business users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Who developed COBOL in 1959?

A

CODASYL Committee

The development was a collaborative effort to create a standard programming language for business.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The 1985 version of COBOL known for efficiency and standardization is called:

A

COBOL-85

This version introduced many enhancements over previous iterations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does ‘Machine Independent’ mean in COBOL?

A

COBOL can run on various computer systems

This feature allows for greater flexibility in deployment.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

COBOL is said to be ‘English-like.’ What does that mean?

A

Uses natural language words

This characteristic aids in readability and understanding of the code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

COBOL is known for handling:

A

Voluminous data

It is particularly effective for processing large amounts of business data.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the correct order of COBOL’s four divisions?

A

Identification, Environment, Data, Procedure

This order is essential for the structure of a COBOL program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

The division that contains the program’s name and author is:

A

Identification Division

This division is crucial for documentation and identification of the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which division defines the system setup and I/O devices?

A

Environment Division

This division specifies the environment in which the program operates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

In COBOL, the main logic or steps of a program are found in:

A

Procedure Division

This division contains the executable code of the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What column range holds the COBOL source code?

A

8–72

This range is where the actual code is written in the source file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does column 7 in the COBOL coding form represent?

A

Indicator area

This area is used for special indicators such as comments.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which symbol in column 7 marks a line as a comment?

A

This symbol indicates that the line is not executable code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What columns define ‘Area A’?

A

8–11

Area A is used for level numbers and other important indicators.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Which area (column range) is for FD entries and level 01 records?

A

Area A (8–11)

This area is specifically designated for defining records.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Area B (Columns 12–72) usually holds:

A

Source statements and clauses

This area is where the main coding occurs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

The COBOL character set includes:

A

Letters A–Z and digits 0–9

This character set is essential for writing COBOL programs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Which arithmetic operator is used for multiplication in COBOL?

A

This operator is standard for multiplication in many programming languages.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What symbol ends COBOL statements?

A

Period (.)

This punctuation is crucial for indicating the end of a statement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Which is a valid relational operator in COBOL?

A

NOT =

This operator is used for comparisons in COBOL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Logical operators include:

A
  • NOT
  • AND
  • OR

These operators are fundamental for control flow in programming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which punctuation marks are used for strings?

A

Single or double quotation marks

These marks are necessary for defining string literals.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
A valid COBOL variable name must:
Start with an alphabetic character ## Footnote This rule ensures that variable names are properly recognized.
26
The maximum length of a COBOL variable name is:
30 characters ## Footnote This limit helps maintain clarity and manageability in code.
27
Which of the following is NOT allowed in variable names?
Reserved words ## Footnote Reserved words cannot be used as variable names to avoid conflicts.
28
What is a reserved word example for alphanumeric data?
X ## Footnote This reserved word is used to define alphanumeric data types.
29
The level number that defines a record is:
01 ## Footnote This level number indicates the highest level of a record structure.
30
Which clause defines the data type and size?
PICTURE ## Footnote The PICTURE clause is essential for specifying data formats.
31
What does PIC 9(3) mean?
3 numeric digits ## Footnote This indicates that the variable can hold three digits.
32
Which PICTURE clause represents a decimal number?
9V99 ## Footnote The 'V' indicates the position of the decimal point.
33
The symbol 'V' in a PICTURE clause stands for:
Virtual Decimal Point ## Footnote This symbol is crucial for defining decimal values in COBOL.
34
Which clause assigns an initial value to a variable?
VALUE ## Footnote This clause is used to set default values for variables.
35
What is the purpose of figurative constants like ZERO and SPACE?
Substitute special default values ## Footnote These constants provide predefined values for variables.
36
In the example 05 MORE-RECORDS PICTURE X(3) VALUE 'YES'., what does 05 represent?
Level number ## Footnote This indicates the hierarchy of the data structure.
37
In the same example, what does 'YES' represent?
Literal constant ## Footnote This is the initial value assigned to the variable.
38
The symbol that ends a COBOL statement is:
Period (.) ## Footnote This punctuation is essential for statement termination.
39
What is the only required entry in the Identification Division?
PROGRAM-ID ## Footnote This entry identifies the program uniquely.
40
The PROGRAM-ID should appear in which area?
Area B ## Footnote This area is designated for the program's name.
41
What is the maximum length of a program name in COBOL?
8 characters ## Footnote This limit ensures consistency in program identification.
42
Which entry indicates who wrote the program?
AUTHOR ## Footnote This entry is important for documentation purposes.
43
What entry in the Identification Division shows where the program was created?
INSTALLATION ## Footnote This entry provides context about the program's origin.
44
The DATE-COMPILED field is usually filled:
Automatically by the compiler ## Footnote This ensures accurate tracking of the program's compilation date.
45
The SECURITY entry indicates:
Program’s confidentiality level ## Footnote This entry helps manage access to the program.
46
Which division specifies the computer and devices used?
Environment Division ## Footnote This division outlines the operational environment for the program.
47
The CONFIGURATION SECTION belongs to which division?
Environment ## Footnote This section details the configuration of the program's environment.
48
Which entry specifies the computer where the code runs?
OBJECT-COMPUTER ## Footnote This entry is crucial for defining the target execution environment.
49
What entry defines the computer where the code is compiled?
SOURCE-COMPUTER ## Footnote This entry indicates the environment used for compilation.
50
The INPUT-OUTPUT SECTION contains:
Device assignments ## Footnote This section is essential for managing file input and output.
51
In the syntax SELECT INFILE ASSIGN TO 'D:\COBOL\IN.TXT', what does 'INFILE' represent?
Logical file name ## Footnote This name is used to reference the file within the program.
52
The FILE-CONTROL paragraph is used to:
Assign logical files to devices ## Footnote This paragraph is critical for managing file operations.
53
Which section defines special devices or constants?
SPECIAL-NAMES ## Footnote This section allows for the definition of non-standard devices.
54
Which section defines input and output files?
INPUT-OUTPUT SECTION ## Footnote This section is vital for specifying file operations.
55
The correct order inside the Environment Division is:
CONFIGURATION, INPUT-OUTPUT ## Footnote This order is necessary for proper program structure.
56
What is the main purpose of the Data Division?
To describe and define data used by the program ## Footnote This division is essential for data management.
57
The Data Division is divided into which two main sections?
File Section and Working-Storage Section ## Footnote These sections organize data definitions and storage.
58
What does the FILE SECTION describe?
File structures used for input/output ## Footnote This section outlines how files are structured.
59
What entry defines file attributes in the FILE SECTION?
FD (File Description) ## Footnote This entry is crucial for specifying file characteristics.
60
What does 'LABEL RECORDS ARE OMITTED' mean?
File excludes label records ## Footnote This indicates that label records are not included in the file.
61
The clause 'RECORD CONTAINS 80 CHARACTERS' means:
Each record is 80 characters long ## Footnote This specifies the length of individual records.
62
Which clause specifies the name of the data structure for records?
DATA RECORD IS ## Footnote This clause defines the structure of the records.
63
What is the purpose of the WORKING-STORAGE SECTION?
Stores temporary or constant values ## Footnote This section is used for variables that retain values during program execution.
64
Variables declared in WORKING-STORAGE retain values:
Between program executions ## Footnote This allows for data persistence across runs.
65
What is a '77-level description entry' used for?
Independent elementary items ## Footnote This level is used for defining standalone data items.
66
Example: 01 EMPLOYEE-RECORD. What does '01' mean?
Level number indicating a record ## Footnote This level number signifies the highest level of the record structure.
67
In 05 EMP-ID PICTURE 9(5)., what does 9(5) represent?
5 numeric digits ## Footnote This indicates that the variable can hold five digits.
68
In the same example, EMP-ID is a:
Variable name ## Footnote This is the identifier for the data being defined.
69
In 77 TEMP-VALUE PICTURE 9(4) VALUE 0., what is the purpose of 'VALUE 0'?
Assigns an initial numeric value ## Footnote This sets the starting value for the variable.
70
'DATA DIVISION.' is always followed by:
Either A or B ## Footnote This indicates that the FILE SECTION or WORKING-STORAGE SECTION follows.
71
Which keyword defines the structure and format of records?
RECORD DESCRIPTION ENTRY ## Footnote This keyword is essential for defining how records are structured.
72
In COBOL, the statement DATA RECORD IS EMPLOYEE-RECORD. means:
Record structure is called EMPLOYEE-RECORD ## Footnote This defines the format of the data being processed.