COBOL Flashcards

(69 cards)

1
Q

In COBOL, who initiated the language development that was later sponsored by the Department of Defense?

A

Mary K. Hawes

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

The philosophy of separating data descriptions from procedural instructions in COBOL was heavily influenced by this person.

A

Grace Hopper

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

in what year when the landmark test proved COBOL’s machine independence by running the same program on RCA and Univac computers.

A

1960

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

This consortium developed COBOL to provide a portable, English-like standard for commercial data processing.

A

CODASYL

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

This computer scientist suggested the name “COBOL” during the initial development sprint.

A

Bob Bemer

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

Version of COBOL that introduced structured programming features like scope terminators to eliminate “spaghetti code.”

A

COBOL-85

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

This COBOL standard replaced portable arithmetic results with IEEE 754 data types.

A

COBOL 2014

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

This major U.S. government agency manages approximately 60 million lines of COBOL code as of 2025.

A

Social Security Administration (SSA)

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

This mandatory clause for elementary items in the Data Division defines the category, size, and format of the data.

A

PICTURE (PIC) Clause

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

This clause specifies the internal storage format, such as DISPLAY, BINARY, or POINTER.

A

USAGE Clause

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

In COBOL, this data type is strictly limited to letters and space characters.

A

Alphabetic (PIC A)

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

Specialized operator used for pattern matching that evaluates whether a data item matches a defined regular expression.

A

LIKE

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

This operator splits a single string into multiple substrings based on specific delimiters in COBOL.

A

UNSTRING

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

System-reserved words that represent specific fixed values, such as ZERO, SPACE, or NULL.

A

Figurative Constants

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

This division contains the executable instructions and execution logic in a COBOL program.

A

PROCEDURE DIVISION

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

This implicitly defined special register returns the declared size of an identifier in bytes at compile time.

A

LENGTH OF

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

This specific level number is used to define named constants for literal values or the results of constant expressions.

A

Level 78 (Constant-Names)

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

This file organization uses one or more indexes to locate data by identifying key values and their corresponding record locations.

A

Indexed Files

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

In fixed-format COBOL, this specific column contains an asterisk to mark a comment line.

A

Column 7

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

This specific section within the Data Division is used to limit variables locally to a subprogram.

A

LINKAGE SECTION

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

COBOL is inherently case-sensitive, meaning EMPLOYEE-NAME and employee-name are treated as completely different identifiers.
True or False

A

False (COBOL is not case-sensitive; identifiers are treated the same regardless of case)

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

The COMPUTE statement in COBOL allows for familiar algebraic syntax instead of using multiple procedural verbs.
True or False

A

True

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

COBOL supports abstract data types like sets, trees, and graphs natively as built-in structures. True or False

A

False (Sets, trees, and graphs are not natively supported and must be implemented using procedural logic and indexed files)

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

In free-format COBOL, continuation of lines is done with a hyphen at the end of the line.
True or False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
COBOL evaluation of arithmetic expressions processes addition and subtraction prior to multiplication and division. True or False
False (Multiplication and division have higher precedence and are evaluated prior to addition and subtraction)
26
The INITIALIZE statement in COBOL is an executable assignment statement used to reset a variable to its default values. True or False
True
27
Parameters passed BY CONTENT in COBOL allow the subprogram to directly modify the original variable. True or False
False (BY CONTENT passes a copy; BY REFERENCE allows direct modification)
28
The EXIT PROGRAM statement terminates the entire COBOL program and stops execution completely. True or False
False (EXIT PROGRAM ends a subprogram and returns to the caller; STOP RUN terminates the entire program)
29
Recursive subprograms were natively supported in all versions of COBOL starting from COBOL 60. True or False
False (Traditional COBOL did not support recursion; it was introduced in COBOL 2002+ with the RECURSIVE keyword)
30
COBOL achieves modular decomposition through the use of sections, paragraphs, and PERFORM statements. True or False
True
31
In COBOL, the PICTURE (PIC) clause is considered a Noise Word. True or False
False (PIC is a Descriptive Keyword, not a Noise Word)
32
A period is the mandatory terminator for every COBOL sentence. True or False
True
33
COBOL 2002 launched Object-Oriented COBOL, introducing classes and encapsulated objects. True or False
True
34
The PERFORM VARYING statement in COBOL functions similarly to a FOR loop in other programming languages. True or False
True
35
Parallel processing and coroutines are natively supported in traditional batch-processing COBOL. True or False
False (Neither parallel processing nor coroutines are supported in traditional COBOL)
36
What is the output of the following program snippet in COBOL? MOVE 10 TO COUNT. PERFORM UNTIL COUNT > 12 DISPLAY "Count: " COUNT ADD 1 TO COUNT END-PERFORM.
Count: 10 Count: 11 Count: 12
37
What is the output of the following program snippet in COBOL? MOVE 20 TO AGE. IF AGE >= 18 THEN DISPLAY "Eligible" ELSE DISPLAY "Minor" END-IF.
Eligible
38
What is the output of the following program snippet in COBOL? MOVE "B" TO GRADE. EVALUATE GRADE WHEN "A" DISPLAY "Excellent" WHEN "B" DISPLAY "Good" WHEN OTHER DISPLAY "Unknown" END-EVALUATE.
Good
39
What is the output of the following program snippet in COBOL? COMPUTE RESULT = (2 + 3) * 4. DISPLAY RESULT.
20
40
What is the output of the following program snippet in COBOL? PERFORM VARYING I FROM 1 BY 2 UNTIL I > 5 DISPLAY I END-PERFORM.
1 3 5
41
42
43
Create a statement in COBOL that defines a variable named TOTAL-AMOUNT as a numeric type with 8 digits and an implied 2 decimal places.
01 TOTAL-AMOUNT PIC 9(8)V99.
43
Create a statement in COBOL using the COMPUTE verb to calculate TAX as 15% (0.15) of GROSS-SALARY.
COMPUTE TAX = GROSS-SALARY * 0.15.
44
Create a statement in COBOL that defines an array named MONTH-SALARY that occurs 12 times and holds a 5-digit numeric value.
05 MONTH-SALARY OCCURS 12 TIMES PIC 9(5).
45
Create a conditional statement in COBOL that checks if BALANCE is less than 0, and if so, displays the string "Overdrawn".
IF BALANCE < 0 THEN DISPLAY "Overdrawn".
46
Create a statement in COBOL that calls an external subprogram named "CALC-BONUS" passing the variable EMPLOYEE-ID by reference.
CALL "CALC-BONUS" USING BY REFERENCE EMPLOYEE-ID.
47
This implicitly defined temporary storage is created by the compiler for statements like INSPECT, STRING, or UNSTRING.
Temporary Storage
48
49
This IBM mainframe operating system is highly optimized for COBOL, wrapping it as RESTful APIs using z/OS Connect.
z/OS
50
This specific symbol is used to indicate a floating comment anywhere on a line in free-format COBOL.
*>
51
In fixed-format COBOL, this specific area spans columns 8-11 and is used for division, section, and paragraph headers.
Area A
52
This category of keywords refers to words like IS, OF, THE, and IN that make COBOL resemble natural language but do not affect program execution.
Noise Words
53
- The specific text format COBOL uses which requires explaining zones or areas.
Fixed Text Format (specifically mentioning zones/areas)
54
- The category of keywords used in COBOL to improve readability without affecting the logic (e.g., "IS").
Noise Words (keywords used for readability like "IS")
55
- The type of program used to translate COBOL source code into machine-readable format.
Compiler
56
- The data structure used to handle ordered lists of data, often defined in the Data Division.
Arrays
57
- The section of the manuscript that covers hardware implementations like IBM or VAX.
Hardware Implementation
58
- COBOL is considered a "Free Format" language where indentation and zones do not matter. True or False
False – COBOL traditionally uses a Fixed Format with specific zones, though the outline mentions both.
59
- A COBOL manuscript must include a table of contents and a cover page. True or False
True
60
- COBOL supports complex data structures such as Trees and Graphs. True or False
True
61
- "Implicit" and "Explicit" are two ways to declare constants and variables in a programming language. True or False
True
62
Parallel processes and Coroutines are types of control-level structures. True or False
True
63
- If you need to store a person's name that is exactly 20 characters long, what "Data-Level Structure" would you use (e.g., Array, String, or Record)?
Strings
64
- In an expression like IF AGE > 18 AND STATUS = 'ACTIVE', identify the Boolean Operators being used.
AND (Boolean Operator).
65
- Look at the following snippet: ADD 1 TO COUNTER. Identify the Action Keyword and the Identifier.
Action Keyword: ADD; Identifier: COUNTER
66
- You want a program to repeat a calculation until a user types 'QUIT'. Which iteration type from the outline is best suited for this (Pre-test or Post-test)?
Iteration (Post-test) – Typically used when the loop must run at least once before checking the "QUIT" condition.
67
- If a large COBOL program is broken down into smaller, manageable parts to hide complex information, what "Program Abstraction" principle is being applied?
Information Hiding (or Modular Decomposition)
68
COBOL stands for
Common Business-Oriented Language