COBOL Programming Fundamentals

Quiz covering COBOL programming concepts including data types, file handling, program structure, and special registers for mainframe systems

19 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Level for Group or elementary items is

  1. 00-49
  2. 02-49
  3. 01-49
  4. 05-49
  5. 10-49
Question 2 Multiple Choice (Single Answer)

What are the different data types available in COBOL?

  1. Numeric
  2. Alphabetic
  3. Alpha-numeric
  4. Numeric Edited
  5. 01-03
  6. ALL
Question 3 Multiple Choice (Single Answer)

What are all the figurative constants available in COBOL?

  1. Zero, Zeroes, Zeros
  2. Quote, Quotes
  3. Space, Spaces
  4. High-Value, Highest-Value
  5. 01-03
  6. ALL
Question 4 Multiple Choice (Single Answer)

Mutually Exclusive PIC Clauses

  1. CR and DB
  2. $ + _ Z *
  3. V.
  4. Only 1
  5. Only 1 & 2
  6. 1, 2 & 3
Question 5 Multiple Choice (Single Answer)

Can JUSTIFIED be used for all the data types?

  1. YES
  2. NO
  3. DEPENDS ON SITUATIONS
  4. NONE
Question 6 Multiple Choice (Single Answer)

PERFORM & GOTO are

  1. Conditional Transfer statements
  2. Unconditional Transfer statements
  3. Preconditional Transfer statements
  4. Postconditional Transfer statements
  5. Preunconditional Transfer statements
  6. Postunconditional Transfer statements
Question 7 True/False

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

  1. True
  2. False
Question 8 True/False

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

  1. True
  2. False
Question 9 True/False

CONFIGURATION SECTION in COBOL must be present.

  1. True
  2. False
Question 10 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 11 Multiple Choice (Single Answer)

For successful execution of REWRITE stmt, the direct access file must be opened in ____ mode. (Fill in the blank with the right answer from the options)

  1. INPUT
  2. OUTPUT
  3. INPUT-OUTPUT
  4. OUT-INPUT
Question 12 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 13 Multiple Choice (Multiple Answers)

Which all among the following are the Special Registers?

  1. PR
  2. PSW
  3. PC
  4. SP
Question 14 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. 01
  2. Will not change
  3. Will change
  4. 56
Question 15 True/False

The SYNCHRONIZED LEFT / RIGHT clause which specifies alignment of elementary data item on storage boundary can be specified for data items defined with USAGE IS INDEX.

  1. True
  2. False
Question 16 True/False

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

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

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

  1. True
  2. False
Question 19 True/False

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

  1. True
  2. False