COBOL and Mainframe Database Programming

Test your knowledge of COBOL programming language and mainframe database technologies including ADABAS, VSAM, and QSAM file handling.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Data in IDENTIFICATION-TABLE IDENT-ID IDENT-NAME IDENT-AGE ----------------------------- 1234 AAAA 23 1234 ABCD 22 2345 ACDB 13 3456 ADSB 25 4567 DADS 15 5678 EDSC 20 FIND IDENTIFICATION-TABLE WITH IDENT-ID EQ '1234' DISPLAY IDENT-ID IDENT-NAME IDENT-AGE LOOP How many records will be displayed?

  1. 0
  2. 1
  3. 2
  4. 3
Question 2 Multiple Choice (Single Answer)

Data in IDENTIFICATION-TABLE IDENT-ID IDENT-NAME IDENT-AGE ----------------------------- 1234 AAAA 23 1234 ABCD 22 2345 ACDB 13 3456 ADSB 25 4567 DADS 15 5678 EDSC 20 FIND IDENTIFICATION-TABLE WITH SUPER-ID-NAME-AGE EQ '1234' DISPLAY IDENT-ID IDENT-NAME IDENT-AGE LOOP How many records will be displayed?

  1. 0
  2. 1
  3. 2
  4. 3
Question 3 Multiple Choice (Single Answer)

If a find statement returns with multiple records for a given descriptor value, in which order the records will be displayed in the output?

  1. ISN
  2. RABN
  3. Physically stored order
  4. Random
Question 4 Multiple Choice (Multiple Answers)

Indicate which of the following statements describe Bachman diagram

  1. Required for effective use of DML statements
  2. Used to help define the schema
  3. Shows area relationships
  4. Identifies the set name
Question 5 Multiple Choice (Multiple Answers)

What are the types of VSAM files that COBOL can handle?

  1. KSDS, ESDS
  2. ESDS, RRDS
  3. KSDS, ESDS, RRDS
  4. KSDS, RRDS
Question 6 True/False

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

  1. True
  2. False
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 (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 9 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 10 True/False

Indexes can be used as subscripts while subscripts cannot be used as indexes.

  1. True
  2. False
Question 11 True/False

The collating sequence can be controlled in VALUE...THRU clause either in ascending or descending order.

  1. True
  2. False
Question 12 True/False

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

  1. True
  2. False
Question 13 True/False

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

  1. True
  2. False
Question 14 True/False

JUSTIFIED clause cannot be used for data items defined with USAGE IS POINTER.

  1. True
  2. False
Question 15 True/False

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

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

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

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

The maximum size of a Tablespace can be

  1. 64 Gb
  2. 32 Gb
  3. 8 Kb
  4. 4 Kb
Question 20 Multiple Choice (Single Answer)

Which one is not a pre-compile parameter

  1. Level
  2. Host()
  3. APost
  4. Time