1. How many comparisons can a single COBOL if statement make? |
1 |
2 |
There is no limit |
COBOL if statements are not used to compare variable values
|
2. Which of the following errors are possible within a COBOL if statement? |
Infinite loop |
Logical Error |
Runtime Error |
All of the above
|
3. The COBOL perform loop is the equivalent of which of the following structures found in other languages, such as Java or C++ |
For loop |
Do-While loop |
Method |
None of the Above
|
4. If someone wanted a COBOL perform "loop" to execute once before the condition is checked, which of the following would they do? |
Use a standard perform statement |
Use an in line perform |
Skillful use of the COBOL reserved word "AFTER" |
This is not possible in COBOL
|
5. A = 0, B = 9�.. Perform until a > b Add 2 to a End-perform How many additions are performed? |
3 |
4 |
5 |
6
|
6. If an IF statement is true, what�s the first thing it does? |
Exits the statement |
Executes the function |
Exits the Program |
Executes the If statement again
|
7. Not negative means |
Equal to 0 |
Greater than or equal to 1 |
Less than or equal to 0 |
Greater than or equal to 0
|
8. Which of the following is NOT a valid symbol to use in an IF condition |
= |
=< |
=> |
>
|
9. Which is the correct ASCII collating sequence? |
spaces, special characters, 0-9, A-Z, a-z |
spaces, a-z, A-Z, 0-9, special characters |
a-z, A-Z, 0-9, spaces, special characters |
0-9, special characters, spaces, a-z, A-Z
|
10. The word COBOL is an acronym for what? |
It is not an acronym. |
COmputer Basic Operating Language |
COmmon Business Oriented Language |
Common OBservation Official Language
|
11. There are 4 divisions in a cobol program. Which of the following is not one of them? |
Identification Division |
Linkage Division |
Data Division |
Procedure Division
|
12. Cobol is self-documenting. |
True |
False |
|
|
13. User defined names must follow which one of the following rules? |
Multiple word names must be separated with an underscore |
Names must be 10 or less characters |
Names must contain at least 1 alpha character in any position. |
Names must be lower case
|
14. Cobol paragraphs contain sentences. A sentence must end in a period and can contain multiple statements. |
True |
False |
|
|
15. Sentences and statements must start on a new line. |
True |
False |
|
|
16. When defining a file layout it is placed in the file section of the data division. Each record begins with an "01", a space, and the record name. Fields within a record traditionally began with 05? |
All of these answers. |
This is an alternate name for the 05 name. |
This is a breakdown of the 05 field. |
This is another format for the field.
|
17. Condition names are names associated with a field that take on a true/false status depending on whether their value is equal to the field value. They are indicated by a level number of what? |
05 |
66 |
88 |
77
|
18. If a field is defined as Pic s9(6)v99 comp-3, it uses 5 bytes of storage. |
True |
False |
|
|
19. If we are limited to 5 bytes of storage, is there be a way to store a complete 8 digit date? |
Yes |
No |
|
|
20. You store it as YYYYMMDD in 8 bytes. What is the COBOL definition of this field? |
Pic Y(4)M(2)D(2) |
Pic date(yyyymmdd) |
Pic date(8) |
Pic X(8)
|