COBOL Programming Fundamentals

Test your knowledge of COBOL programming including file operations, table handling, data types, compiler directives, and program structure.

20 Questions Published

Questions

Question 1 True/False

BLANK WHEN ZERO must not be specified for 66 or 88 level variables or signed fields.

  1. True
  2. False
Question 2 True/False

Computational fields defined with COMP picture clause cannot be reference modified.

  1. True
  2. False
Question 3 Multiple Choice (Single Answer)

Internal storage used to store S9(n) COMP-3 variable is ____ bytes.

  1. n+1
  2. (n+1)/2
  3. (n+1)/3
  4. n/2 + 1
Question 4 Multiple Choice (Multiple Answers)

RECORDING MODE FOR QSAM files can be:

  1. F,V
  2. U,S
  3. F,R
  4. F,V,U,R
Question 5 Multiple Choice (Multiple Answers)

Which COBOL division(s) is(are) mandatory in a COBOL program?

  1. Identification Division
  2. Environment Division
  3. Data Division
  4. Procedure Division
Question 6 Multiple Choice (Multiple Answers)

Which COBOL division(s) is(are) mandatory in a COBOL program?

  1. Identification Division
  2. Environment Division
  3. Data Division
  4. Procedure Division
Question 7 Multiple Choice (Multiple Answers)

RECORDING MODE FOR QSAM files can be:

  1. F,V
  2. U,S
  3. F,R
  4. F,V,U,R
Question 8 Multiple Choice (Single Answer)

Internal storage used to store S9(n) COMP-3 variable is ____ bytes

  1. n+1
  2. (n+1)/2
  3. (n+1)/3
  4. n/2 + 1
Question 9 True/False

Computational fields defined with COMP picture clause cannot be reference modified.

  1. True
  2. False
Question 10 True/False

BLANK WHEN ZERO must not be specified for 66 or 88 level variables or signed fields.

  1. True
  2. False
Question 11 True/False

EJECT is used for creating a new page in the compiler listing.

  1. True
  2. False
Question 12 Multiple Choice (Multiple Answers)

For successful execution of REWRITE stmt, the direct access file must be opened in _____ mode.

  1. I
  2. O
  3. I-O
  4. O-I
Question 13 Multiple Choice (Single Answer)

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?

  1. Will not change
  2. 01
  3. 56
  4. Will change
Question 14 True/False

For VSAM files, the LABEL RECORDS clause has no effect on the execution of the program.

  1. True
  2. False
Question 15 True/False

Computational fields defined with COMP picture clause cannot be reference modified.

  1. True
  2. False
Question 16 True/False

Indexes defined for an array cannot be displayed in a COBOL program.

  1. True
  2. False
Question 17 True/False

ASCENDING/DESCENDING KEY data item cannot be floating point items.

  1. True
  2. False
Question 18 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.

  1. True
  2. False
Question 19 True/False

Is the following Evaluate clause with no WHEN phrase coded syntactically valid?? (True-YES/False-No) EVALUATE A ALSO B END-EVALUATE.

  1. True
  2. False
Question 20 True/False

The file access methods in COBOL are: INPUT and OUTPUT only.

  1. True
  2. False