0% found this document useful (0 votes)
154 views6 pages

Mainframe COBOL Interview Questions Guide

The document contains a comprehensive list of frequently asked interview questions for mainframe COBOL positions, covering topics such as dynamic memory allocation, file handling, DB2 interactions, and error handling. It includes questions tailored for candidates with varying levels of experience, from basic to advanced concepts. The questions are designed to assess both technical knowledge and practical problem-solving skills in a mainframe environment.

Uploaded by

msnarayana933
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
154 views6 pages

Mainframe COBOL Interview Questions Guide

The document contains a comprehensive list of frequently asked interview questions for mainframe COBOL positions, covering topics such as dynamic memory allocation, file handling, DB2 interactions, and error handling. It includes questions tailored for candidates with varying levels of experience, from basic to advanced concepts. The questions are designed to assess both technical knowledge and practical problem-solving skills in a mainframe environment.

Uploaded by

msnarayana933
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

mainframe cobol interview questions

Comment your answer please

1)How do u handle dynamic memory allocations in cobol?


2)how do you perform sorting in cobol without using the sort verb?
3)how to load data into array in cobol?
4. how to search a particular record in cobol?
5. What kind of analysis we need if we are modifying a copybook?
6. What will happen if you use redefines with overlapping data items?
7. What is internal sort in cobol?
8. How to check the key is present in Ksds file?
9. Why should the occurs not be defined at 01 level!
10. How do u optimise a cobol program for performance,particularly when dealing with large
datasets?
11. How does cobol handle memory management,particularly with the use of working storage
and linkage section?
12. Explain the process of handling a file with variable length records in cobol?
13. How do u handle vsam file status codes in cobol pgms?
14. The system library from where the executable form of idcams is fetched?
15. An error in Jcl in stream data will be captured as a Jcl error?
16. How do u delete a record from indexed file?
17. What happens if the file is not found at runtime?how would you debug this?

1. what are the parameters who can use both the job and exec... which will override which
one
2. what is the runstat utility in DB2.
3. when you will get -904 error code in db2
4. what Will happen if you're not close the cursor in db2
5. what's the use of SQLERRD in SQLCA.

Questions asked in Mainframe interviews for a mid level experienced candidate-

1. What is checkpoint restart logic and how will you code it in your program?
2. What is file parallel processing in Cobol programs?
3. What is commit logic in programs?
4. Explain the use of Cursor.
5. Explain these abends- -305, -803,-904,-911.
6. What is real time use of GDG concept?
7. INREC FIELD ,INCLUDE COND Sort examples.
8. What is Array and how is it used, what are subscript and index?
9. What are search and search all and how are they coded?
[Link] is version control tool used? (next is how do you deploy a component from dev to
prod?)
[Link] do u schedule a job using job scheduling tool?
[Link] is your daily task and how do u get requirement?
[Link] u worked on a project from end to end?
[Link] you faced while delivering a project.
[Link] you interacted with stakeholders?
[Link] is SDLC process?
[Link] u ever done estimation of any requirement?
[Link] between continue and next sentence.
[Link] real time examples.

There are more but these are frequently asked questions-

Hope it helps!

Mainframe Interview Questions:

1) How to read the VSAM file if you don't know the full key?
2) what is MSG Level =(1,1) in JCL?
3) what is the difference between package and collection?
4) How do we handle -911 SQL abend in the Cobol db2 program?
5) what will happen when open the cursor?
6) what is the main difference when declaring the cursor in the working-storage section and
procedure division?
7) what are 'for update of' and 'where current of 'in cursor?
8) what is SOC4 and SOC7 abend?
9) write a query to find the 3rd highest salary from table?
10) what is class and msgclass in jcl?
11) How to create a map and map set in cics?
12) how to read the VSAM file in CICS?
13) what are TDQ and TSQ in CICS?
14) what is DB2 runstat utility?
15) How many ways pass the data from jcl to cobol?
16) what is search and searchall in cobol?
17) what are utilities used for the cobol db2 precompile process?
18) what is the importance of SQLCA in the cobol db2 program?
19) matched and unmatched logic using the cobol program?
20) how to find the unique values in the table?
21) How many types of VSAM files do we have? what is main difference between KSDS and
ESDS?
22) what is an alternate index ?
23) how to convert VB to FB by using JCL?
24 ) what is -911 and -913 SQL Abend?
25) what are static and dynamic calls in cobol?
26) how many ways pass data from one application to another application in CICS?
27) what is the linkage-section in cobol?
28) Difference between CALL and LINK?

******************Mainframe Interview Questions (Part 3)******************


COBOL- Types of Call
What are the types of Calls in COBOL?
How do you call a subprogram in COBOL?
Difference between StaticCall and DynamicCall?
Which is prefered in StaticCall or DynamicCall and when? Which is faster?Which StaticCall or
DynamicCall occupies more storage?why?
What is LinkageSection? How it is useful?What if I did not give data length variable first?
How do you pass data between a MainProgram and a SubProgram?
What happens if the number of variables passed to the subprogram doesn't match?
What is the impact of using CALL BY CONTENT vs. CALL BY REFERENCE?
What happens if the subprogram being called is missing or unavailable?
How would you implement error handling in a subprogram?
Difference between STOPRUN and GOBACK?
Scenario: You are asked to make changes to a subprogram that is being used by multiple
main programs in a production environment. How would you approach this situation?
Scenario: A dynamic call to a subprogram fails with an S806 abend in production. How would
you troubleshoot this issue?
Scenario: The subprogram you wrote is called by multiple main programs. Sometimes, it
processes incorrect data and abends. How would you handle this?
Scenario: A subprogram is required to read a file and return the first record matching a
specific condition. How would you design this?

Most Commonly Asked Mainframe Interview Questions for Experienced Professionals

If you're preparing for a mainframe interview, here’s a list of basic yet crucial questions you
should be ready to answer:

---

COBOL
What is the difference between REDEFINES and RENAMES?

Explain STATIC CALL vs. DYNAMIC CALL.

What is the difference between SUBSCRIPT and INDEX in COBOL?

How do STRING and UNSTRING operations work?

Explain COMP, COMP-1, COMP-2, and COMP-3 variables.

What is the file matching logic in COBOL?

JCL

What are the different sorting techniques in JCL?

Explain the use of the COND parameter in JCL.

What is a GDG base, and how do generations work?

DB2

What is DB2 restart logic?

Explain the different isolation levels in DB2.

How are JOINS handled in DB2, and what are JOIN KEYS?

Common DB2 abend codes and their solutions?

What is a CURSOR, and how is it used?

What is the purpose of a NULL INDICATOR?

Explain the COBOL-DB2 pre-compilation process.

What is the difference between a PLAN and a PACKAGE in DB2?


What is EXPLAIN in DB2, and how is it used?

General Concepts

What is the difference between a COPYBOOK and an INCLUDE?


soc 4 and soc7 abends ?

Questions (Part 2)******************


FILES
How to handle file operations in COBOL?
Difference between file status codes available in COBOL?
What are the different types of files in COBOL?
What is the purpose of the FILE-CONTROL paragraph in COBOL?
How is a file defined in the DATA DIVISION?
What is the role of the SELECT statement in COBOL?
What are the different file organizations supported in COBOL?
Explain the difference between sequential, indexed, and relative file organization.
What are the access modes available in COBOL, and how do they differ?
What are the basic file operations in COBOL, and what are their corresponding COBOL verbs?
How do you handle EOF (End of File) in COBOL?
What is the purpose of the START verb in COBOL?
Can you explain the difference between the WRITE and REWRITE operations?
What are the differences between fixed-length and variable-length records in COBOL?
What is the purpose of the ORGANIZATION clause in the SELECT statement?
Explain the COBOL syntax for creating and handling a relative file?
How would you concatenate two sequential files in COBOL?
Explain the process of reading a file and writing its content into another file?
How do you delete a record from an indexed file?
How would you update specific fields in a record stored in a file?
What happens if the file is not found at runtime? How would you debug this?
If you need to sort the file based on the department, how would you handle this?
How would you group the records by account number in COBOL?
What file operations would you use to write the report to an output file?
*******************************************************************************
Scenario: A large file contains student records. You need to split the file into two smaller
files: one for undergraduate students and another for postgraduate students.
Questions:
How would you define and open multiple output files in your COBOL program?
What criteria would you use to decide which file a record should go into?
How would you ensure all records are processed and written to the correct files?
What is the performance impact of writing to multiple files, and how can it be optimized?
*******************************************************************************
Scenario: A sequential file contains customer data. You need to filter out customers from a
specific city and sort the results by customer name.
Questions:
How would you use the SORT verb in COBOL for this task?
How would you handle filtering before or during the sorting process?
Explain the use of the INPUT PROCEDURE and OUTPUT PROCEDURE in the SORT statement.
What are the alternatives to using the SORT verb if performance is a concern?
*********************************************************************************

You might also like