Mainframe Technologies: COBOL, JCL, and DB2

Test your knowledge of mainframe computing including COBOL programming, Job Control Language (JCL), and DB2 database management.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What will happen when a file that doesnt exist is opened in I-O mode?

  1. The file will be created and will be opened for reading and writing
  2. The open fails and error occurs
  3. File will be created and opened for writing only
  4. The file will be created and opened for reading only
Question 2 Multiple Choice (Single Answer)

What is an 88 level used for in COBOL?

  1. Elementary level
  2. For condition names
  3. Initialize
  4. Renames
Question 3 Multiple Choice (Single Answer)

What happens when the access mode of an indexed file is DYNAMIC?

  1. The records will be accessed one after the other in order of primary key
  2. The file will be accessed one record at a time and for each access an exact value for the primary key will be specified
  3. Both 1 and 2
  4. None of the above
Question 4 Multiple Choice (Single Answer)

What is the number of characters in COBOL-85 character set?

  1. 51
  2. 52
  3. 53
  4. 54
Question 5 Multiple Choice (Single Answer)

What is the name of the area from character positions 73 to 80?

  1. Area C
  2. Area AB
  3. Identification area
  4. Modification area
Question 6 Multiple Choice (Multiple Answers)

What does a disposition of (MOD,KEEP,) mean?

  1. Dataset is created if not available
  2. Dataset will deleted on abnormal termination
  3. Dataset will not be deleted on abnormal termination
  4. job will abend if the data is not available
Question 7 Multiple Choice (Multiple Answers)

Temporary datasets are created by

  1. DSN=*
  2. DSN=##TEMP
  3. DSN=&&TEMP
  4. By not specifying any DSNAME
Question 8 Multiple Choice (Single Answer)

What is COND=EVEN ?

  1. Execute next step even if the current step terminates abnormally.
  2. Execute this step even if any of the previous steps, terminated abnormally.
  3. Execute next step even if the current step terminates normally.
  4. Execute this step even if any of the previous steps, terminated normally.
Question 9 Multiple Choice (Multiple Answers)

What is COND=ONLY ?

  1. Execute this step only if any of the previous steps terminates normally
  2. Execute this step only if any of the previous steps terminates abnormally
  3. Execute next step only this step terminates abnormally
  4. Execute next step only this step terminates normally
Question 10 Multiple Choice (Multiple Answers)

What happens if both JOBLIB & STEPLIB is specified ?

  1. STEPLIB will be ignored
  2. JOBLIB will be ignored
  3. Both are referred
  4. JOBLIB overrides the STEPLIB
Question 11 Multiple Choice (Multiple Answers)

The DISP in the JCL is MOD, the dataset is already available and the program opens the file in OUTPUT mode. What happens ?

  1. Records will be appended at the end
  2. Records will be overwritten
  3. Dataset will be deleted and records will be written by creating a new file
  4. Job will abend
Question 12 Multiple Choice (Single Answer)

Maximum number of steps in a job

  1. 16
  2. 255
  3. 256
  4. No limit
Question 13 Multiple Choice (Single Answer)

Which of the following DB2 data types CANNOT be used to contain the date an employee was hired?

  1. TIMESTAMP
  2. VARCHAR
  3. TIME
  4. CLOB
Question 14 Multiple Choice (Single Answer)

Which of the following is defined on the dependent table to implement a referential constraint?

  1. Primary Key
  2. Check constraint
  3. Foreign Key
  4. Update trigger
Question 15 Multiple Choice (Single Answer)

Given the DDL statement: CREATE TABLE newtab LIKE tab. Which of the following would occur as a result of the statement execution?

  1. NEWTAB would have the same column names, attributes and referntial integrity as TAB.
  2. NEWTAB would have the same column names and attributes as TAB.
  3. NEWTAB would have the same column names, attributes, indexes and constraints as TAB.
  4. NEWTAB would have the same column names, attributes and data as TAB.
Question 16 Multiple Choice (Single Answer)

Which of the following occurs if an application ends abnormally during an active unit of work?

  1. The unit of work moves to pending status
  2. The unit of work moves to CHECK_PENDING
  3. The unit of work is rolled back
  4. The unit of work remains active
Question 17 Multiple Choice (Multiple Answers)

Given the table: COUNTRY NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?

  1. ORDER BY 2,1
  2. ORDER BY 2 ASC, 1 ASC
  3. ORDER BY 1,2
  4. ORDER BY 1 ASC, 2 ASC
Question 18 Multiple Choice (Multiple Answers)

Given the table COUNTRY: NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?

  1. ORDER BY 2,1
  2. ORDER BY 2 ASC, 1 ASC
  3. ORDER BY 1,2
  4. ORDER BY 1 ASC, 2 ASC
Question 19 Multiple Choice (Multiple Answers)

Given the table COUNTRY: NAME CITIES PERSON Argentina 30 1 Cuba 20 2 Canada 10 2 Germany 40 1 Given the statement: SELECT name,cities FROM country Which of the following clauses must be added to the statement for it to return rows sorted by NAME ascending and then sorted by CITIES ascending?

  1. ORDER BY 2,1
  2. ORDER BY 2 ASC, 1 ASC
  3. ORDER BY 1,2
  4. ORDER BY 1 ASC, 2 ASC
Question 20 True/False

Use OCCURS clause at 01 level

  1. True
  2. False