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.
Questions
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, 3 and 4
- 2, 3 and 4
- 2, 3 and 6
- 1, 3 and 5
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);
- A B Z E F Z X
- A B X Z E F G H Z X
- A B X Z E F Z G H Z
- A B X Z G H Z
How to use host variables in DB2 queries while they accessed through cobol programs.
- A. A colon (:) must precede all host variables in an SQL statement
- B. A semi colon (;) must precede all host variables in an SQL statement
- C. We can use any variable directly
- D. None
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
- A. 1B, 2E, 3A, 4C, 5D
- B. 1D, 2A, 3E, 4C, 5B
- C. 1E, 2D, 3B, 4A, 5C
- D. 1C, 2D, 3E, 4A, 5B
What is the maximum Program Name length can be given in a Cobol Program.
- 10
- 20
- 30
- 40
In the Procedure Division of a COBOL program, which of the following is Optional?
- (A) Sections
- (B) Paragraphs
- (C) Sentences
- (D) Statements.
While Search in a VSAM file, if Return Code 23 is thrown, what it means.
- (A) Valid Key
- (B) Duplicate Key
- (C) Invalid Key
- (D) Empty VSAM file.
What can be the maximum number of digits declared in a variable?
- (A) 16
- (B) 17
- (C) 18
- (D) 19
Which of the below cannot be used in a JCL.
- (A) StartIF
- (B) Then
- (C) Goto
- (D) Else.
What is the maximum value can be stored in S9(8) COMP
- (A) 9999
- (B) 999999
- (C) 9999999
- (D) 99999999
Please identify the utility to kill DB2 utilities, which is running / existing on table.
- A.KILL(Utilityname)
- B. TERM(UTILITY NAME)
- C.TERM
- D.KILL
DB2 query to get the bind plans attached with the tables.
- A. SELECT * FROM DB2P.SYSIBM.SYSPLANDEP WHERE BCREATOR = 'DBNAME' AND BTYPE = 'T' ORDER BY BNAME, DNAME
- B. SELECT BNAME, BQUALIFIER, BTYPE, DCOLLID, DNAME FROM DB2P.SYSIBM.SYSPACKDEP WHERE BQUALIFIER = 'DATABASE NAME' AND BTYPE = 'T' ORDER BY BNAME, DNAME
- C. (A) or (B)
- D. Neither (A) nor (B)
What is the use of DB2 utility RUNSTAT
- A. To take the copy of table
- B. To load the table
- C. To get the structure of the table
- D. NONE
What mode the file should be opened,if it should be Rewritten?
- (A) Input
- (B) I-O
- (C) Output
- (D) A or B or C
The maximum versions of GDG limit can be given till
- (A) 255
- (B) 155
- (C) 256
- (D) 156
How to check the success of your binding job
- A. Check the bind plan job run success in JMR
- B. Checking in the table SYSIBM.SYSPLAN
- C. (A) and (B)
- D. None
Which of the following is not DATABASE privilege?
- A. REPAIR
- B. UPDATE
- C. LOAD
- D. IMAGCOPY
When we are updating a particular field in a record we have to give:
- A. With Update
- B. Updating
- C. To Update
- D. For Update Of
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.
- (A) SELECT (File Name) [OPTIONAL] ASSIGN (FILE)
- (B) SELECT (File Name) [ALTERNATE] ASSIGN (FILE)
- (C) SELECT (File Name) [ELECTIVE] ASSIGN (FILE)
- (D) SELECT (File Name) [DISCRETIONARY] ASSIGN (FILE)
Which of the following is NOT a COBOL verb?
- (A) Start
- (B) Rewrite
- (C) Delete
- (D) Update.