COBOL Programming Fundamentals
Test your knowledge of COBOL programming including file operations, table handling, data types, compiler directives, and program structure.
Questions
BLANK WHEN ZERO must not be specified for 66 or 88 level variables or signed fields.
- True
- False
Computational fields defined with COMP picture clause cannot be reference modified.
- True
- False
Internal storage used to store S9(n) COMP-3 variable is ____ bytes.
- n+1
- (n+1)/2
- (n+1)/3
- n/2 + 1
RECORDING MODE FOR QSAM files can be:
- F,V
- U,S
- F,R
- F,V,U,R
Which COBOL division(s) is(are) mandatory in a COBOL program?
- Identification Division
- Environment Division
- Data Division
- Procedure Division
Which COBOL division(s) is(are) mandatory in a COBOL program?
- Identification Division
- Environment Division
- Data Division
- Procedure Division
RECORDING MODE FOR QSAM files can be:
- F,V
- U,S
- F,R
- F,V,U,R
Internal storage used to store S9(n) COMP-3 variable is ____ bytes
- n+1
- (n+1)/2
- (n+1)/3
- n/2 + 1
Computational fields defined with COMP picture clause cannot be reference modified.
- True
- False
BLANK WHEN ZERO must not be specified for 66 or 88 level variables or signed fields.
- True
- False
EJECT is used for creating a new page in the compiler listing.
- True
- False
For successful execution of REWRITE stmt, the direct access file must be opened in _____ mode.
- I
- O
- I-O
- O-I
Consider the following piece of code: IF NOT INPUT-EOF IF INPUT-REC-TYPE = '55' PERFORM 2100-PROCESS-WTN ELSE NEXT SENTENCE END-IF ADD +1 TO INPUT-COUNT. PERFORM TEST-1 If the value INPUT-REC-TYPE = '00' then what will happen to the value of INPUT-COUNT?
- Will not change
- 01
- 56
- Will change
For VSAM files, the LABEL RECORDS clause has no effect on the execution of the program.
- True
- False
Computational fields defined with COMP picture clause cannot be reference modified.
- True
- False
Indexes defined for an array cannot be displayed in a COBOL program.
- True
- False
ASCENDING/DESCENDING KEY data item cannot be floating point items.
- True
- False
The result of SEARCH ALL is predictable only when the table is defined with ASCENDING or DESCENDING KEY and the key should uniquely identify an occurrence of the table entry.
- True
- False
Is the following Evaluate clause with no WHEN phrase coded syntactically valid?? (True-YES/False-No) EVALUATE A ALSO B END-EVALUATE.
- True
- False
The file access methods in COBOL are: INPUT and OUTPUT only.
- True
- False