In COBOL, what are the typical sorting criteria you can specify while using the SORT verb?
- One or more keys from the record
- Only alphabetic fields
- Only literal values
- Only numeric fields
The SORT verb in COBOL allows you to specify one or more keys from the record as sorting criteria. These keys determine the order in which the records are sorted.
_____ is the process of creating a new object from a class in Object-Oriented COBOL.
- CREATION
- GENERATION
- INSTANTIATION
- OBJECTIFICATION
In Object-Oriented COBOL, the process of creating a new object from a class is known as "INSTANTIATION." It involves creating an instance of a class with its own set of data and behavior.
Which COBOL file control verb is used to establish a connection between a COBOL program and an external file?
- FILE
- OPEN
- READ
- WRITE
The OPEN verb in COBOL is used to establish a connection between a COBOL program and an external file. It prepares the file for subsequent READ or WRITE operations.
A ____________ array is one where the OCCURS clause is nested within another OCCURS clause in COBOL.
- Dynamic
- Hierarchical
- Multidimensional
- Nested
A nested array in COBOL is created when the OCCURS clause is used within another OCCURS clause. This allows for the creation of more complex data structures, such as tables of tables or matrices.
Your COBOL application needs to create a new file and write data to it. Which file access mode should be used for this purpose?
- EXTEND
- I-O
- INPUT
- OUTPUT
For creating a new file and writing data to it, the correct file access mode is OUTPUT. This mode is used to write records to a file and create a new file if it does not exist. It does not allow reading or updating existing records.
The REDEFINES clause is used to __________ a group data item with another data item.
- Concatenate the data of
- Copy the data of
- Separate the storage of
- Share the storage of
The REDEFINES clause in COBOL is used to separate the storage of a group data item and another data item. It allows the same area of storage to be referenced using different data descriptions, providing versatility in data usage.
Which COBOL data type is appropriate for representing fixed-point decimal numbers?
- PIC 9(5)V9(2)
- PIC S9(5)V9(2)
- PIC S9(5)V9(2) COMP
- PIC S9(5)V9(2) COMP-3
The data type PIC S9(5)V9(2) COMP-3 in COBOL is used to represent fixed-point decimal numbers. The COMP-3, or packed decimal, format is suitable for efficient storage of decimal data, with each digit represented by half a byte.
The _____ clause in COBOL allows you to declare a variable as a subordinate item of another variable.
- GROUP
- OCCURS
- REDEFINES
- RENAMES
The GROUP clause in COBOL is used to declare a variable as a subordinate item of another variable. It helps in organizing related data items under a common name, making the structure of the data more readable and manageable.
To access a specific element within a table, you typically use an _____ variable.
- INDEX
- OCCURS
- RANGE
- SIZE
To access a specific element within a table in COBOL, you typically use an INDEX variable. The INDEX variable represents the position of the element within the table and is used to navigate and retrieve data from the array.
What is the purpose of a "core dump" in COBOL debugging?
- A log of input/output operations
- A report of compilation errors
- A snapshot of the program's memory contents
- A summary of executed COBOL statements
In COBOL debugging, a "core dump" refers to a snapshot of the program's memory contents at a specific point in time. It helps developers analyze the state of the program's variables and memory structures, aiding in identifying the cause of issues.
_____ is the file access mode used when you only need to read records from a file in COBOL.
- EXTEND
- I-O
- INPUT
- OUTPUT
"INPUT" is the file access mode used in COBOL when you only need to read records from a file. This mode allows the program to read data from the specified file but does not allow writing or updating records.
In Object-Oriented COBOL, _____ allows a class to provide different implementations of a method based on the specific object type.
- Abstraction
- Encapsulation
- Inheritance
- Polymorphism
Polymorphism in Object-Oriented COBOL allows a class to provide different implementations of a method based on the specific object type. It enhances flexibility by enabling a single method name to have different behaviors in different classes.