Mainframe Programming: COBOL, JCL, DB2, VSAM, and PL/I

Comprehensive quiz covering mainframe technologies including COBOL programming, JCL statements, DB2 database operations, VSAM files, and PL/I procedures.

20 Questions Published

Questions

Question 1 Multiple Choice (Multiple Answers)

Assume a PL/I program that wants to execute a call to an external procedure. This procedure expects 1 parameter and returns 1 parameter. Which instructions do you have to provide in the main program? (1) DCL MYSUB ENTRY (CHAR(5)) EXTERNAL; (2) DCL MYSUB ENTRY (CHAR(5)) RETURNS (CHAR(5)) EXTERNAL; (3) DCL MYPARAMETER,MYRESULT CHAR(5); (4) CALL MYSUB (MYPARAMETER); (5) MYRESULT = MYSUB; (6) MYRESULT = MYSUB(MYPARAMETER);

  1. 1, 3 and 4
  2. 2, 3 and 4
  3. 2, 3 and 6
  4. 1, 3 and 5
Question 2 Multiple Choice (Multiple Answers)

Take a look at the following PL/I program. Assume A, B, C, ... being PL/I instructions. In which order will they be executed?MYPROG : PROCEDURE OPTIONS (MAIN);

  1. A B Z E F Z X
  2. A B X Z E F G H Z X
  3. A B X Z E F Z G H Z
  4. A B X Z G H Z
Question 3 Multiple Choice (Single Answer)

How to use host variables in DB2 queries while they accessed through cobol programs.

  1. A. A colon (:) must precede all host variables in an SQL statement
  2. B. A semi colon (;) must precede all host variables in an SQL statement
  3. C. We can use any variable directly
  4. D. None
Question 4 Multiple Choice (Single Answer)

Match the below SQL CODE (1,2,3,4,5) Cause (A,B,C,D,E) 1)904 A)The string representation of a date time value is not a valid 2)818 B) Resource unavailable 3)181 C)Duplicate key on insert or update 4)803 D)Deadlock or timeout. Rollback has been done 5)911 E)Plan and program: timestamp mismatch

  1. A. 1B, 2E, 3A, 4C, 5D
  2. B. 1D, 2A, 3E, 4C, 5B
  3. C. 1E, 2D, 3B, 4A, 5C
  4. D. 1C, 2D, 3E, 4A, 5B
Question 5 Multiple Choice (Single Answer)

What is the maximum Program Name length can be given in a Cobol Program.

  1. 10
  2. 20
  3. 30
  4. 40
Question 6 Multiple Choice (Single Answer)

In the Procedure Division of a COBOL program, which of the following is Optional?

  1. (A) Sections
  2. (B) Paragraphs
  3. (C) Sentences
  4. (D) Statements.
Question 7 Multiple Choice (Single Answer)

While Search in a VSAM file, if Return Code 23 is thrown, what it means.

  1. (A) Valid Key
  2. (B) Duplicate Key
  3. (C) Invalid Key
  4. (D) Empty VSAM file.
Question 8 Multiple Choice (Single Answer)

What can be the maximum number of digits declared in a variable?

  1. (A) 16
  2. (B) 17
  3. (C) 18
  4. (D) 19
Question 9 Multiple Choice (Single Answer)

Which of the below cannot be used in a JCL.

  1. (A) StartIF
  2. (B) Then
  3. (C) Goto
  4. (D) Else.
Question 10 Multiple Choice (Single Answer)

What is the maximum value can be stored in S9(8) COMP

  1. (A) 9999
  2. (B) 999999
  3. (C) 9999999
  4. (D) 99999999
Question 11 Multiple Choice (Single Answer)

Please identify the utility to kill DB2 utilities, which is running / existing on table.

  1. A.KILL(Utilityname)
  2. B. TERM(UTILITY NAME)
  3. C.TERM
  4. D.KILL
Question 12 Multiple Choice (Single Answer)

DB2 query to get the bind plans attached with the tables.

  1. A. SELECT * FROM DB2P.SYSIBM.SYSPLANDEP WHERE BCREATOR = 'DBNAME' AND BTYPE = 'T' ORDER BY BNAME, DNAME
  2. B. SELECT BNAME, BQUALIFIER, BTYPE, DCOLLID, DNAME FROM DB2P.SYSIBM.SYSPACKDEP WHERE BQUALIFIER = 'DATABASE NAME' AND BTYPE = 'T' ORDER BY BNAME, DNAME
  3. C. (A) or (B)
  4. D. Neither (A) nor (B)
Question 13 Multiple Choice (Single Answer)

What is the use of DB2 utility RUNSTAT

  1. A. To take the copy of table
  2. B. To load the table
  3. C. To get the structure of the table
  4. D. NONE
Question 14 Multiple Choice (Single Answer)

What mode the file should be opened,if it should be Rewritten?

  1. (A) Input
  2. (B) I-O
  3. (C) Output
  4. (D) A or B or C
Question 15 Multiple Choice (Single Answer)

The maximum versions of GDG limit can be given till

  1. (A) 255
  2. (B) 155
  3. (C) 256
  4. (D) 156
Question 16 Multiple Choice (Single Answer)

How to check the success of your binding job

  1. A. Check the bind plan job run success in JMR
  2. B. Checking in the table SYSIBM.SYSPLAN
  3. C. (A) and (B)
  4. D. None
Question 17 Multiple Choice (Single Answer)

Which of the following is not DATABASE privilege?

  1. A. REPAIR
  2. B. UPDATE
  3. C. LOAD
  4. D. IMAGCOPY
Question 18 Multiple Choice (Single Answer)

When we are updating a particular field in a record we have to give:

  1. A. With Update
  2. B. Updating
  3. C. To Update
  4. D. For Update Of
Question 19 Multiple Choice (Single Answer)

20.In a program if two input files are being used and one of them will be created in Predeccesor job(it's not mandatory that the file should be created).Irrespective of the file creation if the job has to be run with out abend then what is the command used in COBOL program File division.

  1. (A) SELECT (File Name) [OPTIONAL] ASSIGN (FILE)
  2. (B) SELECT (File Name) [ALTERNATE] ASSIGN (FILE)
  3. (C) SELECT (File Name) [ELECTIVE] ASSIGN (FILE)
  4. (D) SELECT (File Name) [DISCRETIONARY] ASSIGN (FILE)
Question 20 Multiple Choice (Single Answer)

Which of the following is NOT a COBOL verb?

  1. (A) Start
  2. (B) Rewrite
  3. (C) Delete
  4. (D) Update.