Mainframe Developer

70+ Mainframe Developer Interview Questions and Answers

Updated 11 Jul 2025
search-icon

Asked in TCS

1d ago

Q. How will you use NULL indicator in your program? How will you use VSAM file in program?SOC7 abend reason and resolution.

Ans.

Explaining the use of NULL indicator and VSAM file in Mainframe development and resolving SOC7 abend.

  • NULL indicator is used to indicate the absence of data in a field

  • VSAM file is used to store and retrieve data in a program

  • SOC7 abend occurs due to invalid numeric data and can be resolved by identifying and correcting the error

  • NULL indicator can be checked using IF statement or COBOL verb SET

  • VSAM file can be accessed using COBOL verbs like READ, WRITE, START, etc.

Asked in EXL Service

2d ago

Q. What is the scripting language used on IBM mainframe operating systems? What are the steps in Job processing? What happens if an error is found in Job Queuing in JCL by JES? What is the Abend Code when you acce...

read more
Ans.

The scripting language used on IBM mainframe operating systems is JCL (Job Control Language).

  • JCL is used to define and control the execution of jobs on the mainframe.

  • It is a set of statements that specify the input, processing, and output requirements of a job.

  • JCL is used to submit batch jobs, which are sequences of programs and data that are processed without user interaction.

  • JCL statements are written in a specific format and are executed by the Job Entry Subsystem (JES).

Mainframe Developer Interview Questions and Answers for Freshers

illustration image

Asked in TCS

3d ago

Q. How will you use cursor in COBOL program? What is the difference between cursor and SQL? When will you use JOINKEYS ?

Ans.

Using cursor in COBOL program, difference between cursor and SQL, and when to use JOINKEYS.

  • Cursor is used to fetch data from a database table in COBOL program.

  • SQL is a language used to interact with databases, while cursor is a mechanism to fetch data from a database table.

  • JOINKEYS is used to join two or more files based on a common key.

  • JOINKEYS is used when the files are too large to fit in memory.

  • JOINKEYS is used when the files are sorted in ascending or descending order.

Asked in Infosys

2d ago

Q. What is the difference between COMP and COMP3?

Ans.

comp and comp3 are data types used in mainframe programming.

  • comp is a binary data type that uses one byte for each digit.

  • comp3 is a packed decimal data type that uses half a byte for each digit.

  • comp3 is more space-efficient but requires additional processing for arithmetic operations.

  • comp3 can store both positive and negative numbers, while comp can only store positive numbers.

Are these interview questions helpful?

Asked in Infosys

6d ago

Q. What is a cursor in the context of databases, and what purposes does it serve?

Ans.

A cursor in databases is a pointer that allows for traversal and manipulation of query results.

  • A cursor is used to retrieve and process individual rows returned by a query.

  • It allows for sequential access to query results, enabling operations like fetching, updating, and deleting rows.

  • Cursors are commonly used in programming languages like SQL to work with result sets.

  • For example, in a banking application, a cursor can be used to iterate through a list of customer transactions...read more

5d ago

Q. How would you ABEND the program by moving the error code to the return code?

Ans.

Abend the program by moving error code to Return code

  • To abend the program, set the return code to a non-zero value indicating an error

  • This can be done using a conditional statement to check for errors and then setting the return code accordingly

  • For example, in COBOL, you can use the ACCEPT statement to move the error code to the return code

Mainframe Developer Jobs

Wipro Limited logo
Mainframe Developer 3-5 years
Wipro Limited
3.7
₹ 3 L/yr - ₹ 10 L/yr
(AmbitionBox estimate)
Bangalore / Bengaluru
Capgemini Technology Services India Limited logo
Mainframe Developer | 4 To 9 years | Mumbai' Pune & Bangalore | 5-8 years
Capgemini Technology Services India Limited
3.7
Hyderabad / Secunderabad
Wipro Limited logo
Mainframe Developer 3-5 years
Wipro Limited
3.7
₹ 3 L/yr - ₹ 10 L/yr
(AmbitionBox estimate)
Bangalore / Bengaluru
1d ago

Q. What syntax do you use in PARM parameters to prevent a job from ABENDing when a subscript exceeds its limit?

Ans.

Use the COND parameter in the JCL to prevent job abend when subscript limit is reached.

  • Use COND parameter in JCL to check for subscript limit before executing subsequent steps

  • Set COND parameter to check for specific return code when subscript limit is reached

  • Add a condition to bypass subsequent steps if subscript limit is exceeded

Asked in TCS

4d ago

Q. How can I extract only two columns, age and salary, from an input file with three columns (age, salary, and employee ID) using the sort command?

Ans.

Use the sort command with specific options to extract age and salary columns from a file containing three columns.

  • Use the cut command: You can use 'cut -d' ' -f1,2 inputfile.txt' to extract the first two columns (age and salary) assuming space as a delimiter.

  • Using awk: 'awk '{print $1, $2}' inputfile.txt' will also extract the first and second columns.

  • If the columns are separated by commas, use 'cut -d',' -f1,2 inputfile.txt'.

  • To save the output to a new file, append '> output...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in Infosys

6d ago

Q. How can null variables be handled in COBOL DB2 programs?

Ans.

Null variables in COBOL DB2 programs can be handled using NULL indicators and COALESCE function.

  • Use NULL indicators to check if a variable is null before processing it.

  • Use COALESCE function to replace null values with a default value.

  • Handle null variables carefully to avoid runtime errors.

Asked in Infosys

4d ago

Q. What is the difference between static and dynamic calls?

Ans.

Static calls are resolved at compile time, while dynamic calls are resolved at runtime.

  • Static calls are resolved at compile time based on the declared type of the object being called.

  • Dynamic calls are resolved at runtime based on the actual type of the object being called.

  • Static calls are faster but less flexible, while dynamic calls are slower but more flexible.

  • Example: In a static call, the method to be called is determined by the compiler. In a dynamic call, the method to ...read more

6d ago

Q. How would you read a file with different record structures?

Ans.

To read a file with different record structures, use a combination of file parsing techniques and data manipulation.

  • Identify the record structure of each section in the file

  • Use conditional logic to parse each record based on its structure

  • Implement error handling for unexpected record structures

  • Utilize tools like regular expressions or custom parsing functions

  • Consider using libraries or frameworks that support flexible file parsing

6d ago

Q. How can you improve the performance of a COBOL program that uses multiple cursors?

Ans.

To increase performance of a COBOL program using multiple cursors, consider optimizing the SQL queries, reducing the number of cursors, and using efficient data structures.

  • Optimize SQL queries to retrieve only necessary data

  • Reduce the number of cursors by combining multiple queries into one

  • Use efficient data structures like arrays or tables to store and manipulate data

  • Avoid unnecessary looping and processing within cursor operations

Asked in Mphasis

3d ago

Q. What are Db2 utilities, meaning of various SQL Codes, cursor application.

Ans.

Db2 utilities are tools used for database management, SQL Codes indicate status of SQL operations, and cursors are used for navigating through query results.

  • Db2 utilities are programs used for managing Db2 databases, such as LOAD, REORG, and RUNSTATS.

  • SQL Codes are numeric values that indicate the success or failure of SQL operations, with negative values indicating errors.

  • Cursors are used in database applications to navigate through query results row by row, allowing for proc...read more

3d ago

Q. What is the difference between call by value and call by reference?

Ans.

Call by value passes a copy of the value while call by reference passes the address of the value.

  • Call by value is used for simple data types like int, float, etc.

  • Call by reference is used for complex data types like arrays, structures, etc.

  • Call by value does not modify the original value while call by reference can modify the original value.

  • Call by value is faster than call by reference as it does not involve memory access.

  • Example of call by value: int a = 5; func(a);

  • Example ...read more

Asked in LTIMindtree

2d ago

Q. Is any condition mandatory to call a program in COBOL?

Ans.

No, there is no mandatory condition to call a program in COBOL.

  • In COBOL, a program can be called without any mandatory conditions.

  • The CALL statement is used to call a program in COBOL.

  • The called program can be executed based on the logic written within it.

  • Example: CALL 'PROGRAM-NAME' USING parameters.

Asked in Infosys

5d ago

Q. What is the waterfall model in software development?

Ans.

The waterfall model is a linear sequential software development process where progress flows in one direction like a waterfall.

  • Involves distinct phases such as requirements, design, implementation, testing, and maintenance.

  • Each phase must be completed before moving on to the next phase.

  • Changes are difficult to implement once a phase is completed.

  • Example: Traditional software development approach where requirements are gathered first, followed by design, coding, testing, and d...read more

5d ago

Q. How would you add a 10th record to a file using a COBOL program, and what is the process?

Ans.

To add the 10th additional record in a file using a Cobol program, you would need to read the file sequentially and write the new record at the appropriate position.

  • Read the file sequentially until you reach the 9th record

  • Write the 10th record at the current position in the file

  • Update the file with the new record

Asked in TCS

2d ago

Q. What are the different levels used in COBOL?

Ans.

COBOL has different levels such as level 01, level 77, etc. for defining data structures and variables.

  • Level 01 is used for defining record structures.

  • Level 77 is used for defining elementary data items.

  • Level 88 is used for defining condition names.

  • Level 66 is used for renaming data items.

  • Level 88 is used for defining condition names.

Asked in TCS

1d ago

Q. Why do we use the DISP parameter in COBOL, and what values can be passed to it?

Ans.

DISP parameter in COBOL specifies the dataset's disposition during job execution, controlling its status and actions.

  • DISP can take three values: (1) Status, (2) Normal, (3) Abnormal.

  • Example: DISP=(NEW,CATLG,DELETE) creates a new dataset, catalogs it, and deletes it if the job fails.

  • The first value indicates the dataset's status: NEW, OLD, or MOD.

  • The second value specifies what to do with the dataset after the job completes: CATLG, UNCATLG, or DELETE.

  • The third value is optiona...read more

Asked in TCS

3d ago

Q. What is the difference between rename and redefine?

Ans.

Rename is used to change the name of a data item while redefine is used to change the structure of a data item.

  • Rename is used to change the name of a data item without changing its structure

  • Redefine is used to change the structure of a data item without changing its name

  • Example: In COBOL, renaming a data item involves using the RENAMES clause, while redefining a data item involves using the REDEFINES clause

4d ago

Q. How would you pass data from COBOL to JCL?

Ans.

Data from Cobol can be passed to JCL using file handling techniques like writing data to a dataset or passing parameters through PROCs.

  • Use file handling techniques to write data from Cobol program to a dataset that can be accessed by JCL.

  • Pass parameters from Cobol program to JCL using PROCs.

  • Use symbolic parameters in JCL to reference data from Cobol programs.

Asked in Capgemini

4d ago

Q. How does the CALL command differ from LINK?

Ans.

CALL command transfers control to a program and returns control back, while LINK command transfers control to a program and does not return control back.

  • CALL command is used to invoke a program and returns control back to the calling program.

  • LINK command is used to invoke a program and does not return control back to the calling program.

  • CALL command is used for subroutines, while LINK command is used for main programs.

  • CALL command is faster than LINK command.

  • Example: CALL MYP...read more

2d ago

Q. How will you resolve a division by zero error in SOCB?

Ans.

To resolve division by zero error, check for zero before performing division operation.

  • Check if the denominator is zero before performing division operation

  • Handle the error by displaying a message or returning a default value

  • Use conditional statements or try-catch blocks to prevent division by zero

Q. What are the different divisions in a COBOL program?

Ans.

A COBOL program consists of four main divisions: Identification, Environment, Data, and Procedure.

  • Identification Division: Contains the program name and author information. Example: IDENTIFICATION DIVISION. PROGRAM-ID. SampleProgram.

  • Environment Division: Specifies the environment in which the program will run. Example: ENVIRONMENT DIVISION. CONFIGURATION SECTION.

  • Data Division: Defines all the variables and data structures used in the program. Example: DATA DIVISION. WORKING-S...read more

Asked in TCS

2d ago

Q. What is the process of precompilation in DB2?

Ans.

Precompilation in DB2 translates SQL statements into host language code for efficient execution.

  • Precompilation converts SQL statements in application programs into a format that can be processed by DB2.

  • It generates a DBRM (Database Request Module) that contains the SQL statements and their associated metadata.

  • The precompiled code is then compiled with the host language code (e.g., COBOL, C) to create an executable program.

  • Example: A COBOL program with embedded SQL is precompi...read more

Asked in IBM

5d ago

Q. What is the difference between an index and a subscript?

Ans.

Index is the position of an element in an array, while subscript is the variable used to access elements in an array.

  • Index is a fixed value that represents the position of an element in an array.

  • Subscript is a variable that is used to access elements in an array.

  • Example: arr[2] - '2' is the index, while '2' is the subscript.

Q. How did you integrate the COBOL-DB2 programs?

Ans.

I integrated COBOL-DB2 programs by using embedded SQL statements within the COBOL code.

  • Used EXEC SQL statements to embed SQL code within COBOL programs

  • Declared SQL communication area (SQLCA) for error handling

  • Used precompiler to generate the SQL statements

  • Executed SQL queries to interact with DB2 database tables

Asked in Infosys

5d ago

Q. How do you control job execution?

Ans.

Control over job execution can be achieved through job scheduling, monitoring, and automation.

  • Use job scheduling tools like Control-M or CA Workload Automation to manage job execution.

  • Monitor job progress and status using tools like IBM Tivoli Monitoring or Nagios.

  • Automate job execution and error handling with scripts or custom programs.

  • Implement job dependencies to ensure proper sequencing and execution.

  • Set up alerts and notifications for job failures or delays.

Asked in TCS

4d ago

Q. What is call by value and call by reference in COBOL?

Ans.

Call by value passes a copy of the variable, while call by reference passes the variable itself, allowing modifications.

  • Call by Value: A copy of the variable is passed to the subprogram.

  • Example: If 'A' is 5, passing 'A' means the subprogram works with a copy of 5.

  • Call by Reference: The actual variable is passed, allowing changes to affect the original.

  • Example: If 'A' is 5, passing 'A' allows the subprogram to modify 'A' directly.

Asked in TCS

3d ago

Q. What are the different ways to pass input into COBOL programs?

Ans.

Input in COBOL can be passed through files, user input, and databases, enabling versatile data handling.

  • 1. File Input: COBOL can read data from sequential or indexed files using the INPUT-OUTPUT section.

  • Example: OPEN INPUT myFile.

  • 2. User Input: COBOL programs can accept input from users via the ACCEPT statement.

  • Example: ACCEPT userInput FROM CONSOLE.

  • 3. Database Input: COBOL can interact with databases using embedded SQL or DB2.

  • Example: EXEC SQL SELECT * FROM myTable INTO :...read more

1
2
3
Next

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Infosys Logo
3.6
 • 7.9k Interviews
Cognizant Logo
3.7
 • 5.9k Interviews
Capgemini Logo
3.7
 • 5.1k Interviews
HCLTech Logo
3.5
 • 4.1k Interviews
View all

Top Interview Questions for Mainframe Developer Related Skills

interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Mainframe Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits