Mainframe Developer

50+ Mainframe Developer Interview Questions and Answers

Updated 23 Oct 2024

Popular Companies

search-icon

Q1. 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.

Q2. 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

Q3. 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.

Q4. What is the difference between comp 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?

Q5. How will you abend the program? by moving error code to 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

Q6. How will you increase performance of cobol program when its using number of 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

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Q7. How will you read your file in different record structure ?

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

Q8. what syntax you give in Parm parameters to not be abend job when Subscript had ended his 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

Mainframe Developer Jobs

Mainframe Developer 3-5 years
Capgemini Technology Services India Limited
3.8
Pune
Mainframe Developer 5-10 years
Infosys
3.7
Hyderabad / Secunderabad
Mainframe Developer 3-5 years
Capgemini Technology Services India Limited
3.8
Pune

Q9. 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

Q10. How you will add 10 th additional record in file using Cobol program , what is the path.

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

Q11. 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

Q12. 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.

Q13. How will you give 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.

Q14. how is call command different 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

Q15. How will you resolve division by zero error 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

Q16. 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.

Q17. 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

Q18. How will you check if file is empty ?

Ans.

To check if a file is empty, you can use file size or read the file and check for any content.

  • Check the file size using system functions like stat() or file length property

  • Read the file and check if there is any content present

  • Use file handling functions to determine if the file is empty

Q19. is SQLCA EXEC SQL is mandatory ?

Ans.

No, SQLCA EXEC SQL is not mandatory for Mainframe Developer.

  • SQLCA EXEC SQL is not mandatory but can be used for error handling and status checking in COBOL programs.

  • It is used to retrieve information about the most recent SQL operation.

  • Developers can choose to use SQLCODE and SQLSTATE instead of SQLCA EXEC SQL.

Q20. Redefine clause of COBOL

Ans.

Redefine clause in COBOL allows a data item to be referenced by different names and formats.

  • Redefine clause is used to save memory space by sharing the same memory location for different data items.

  • It is used to define a new data item that shares the same storage area as an existing data item.

  • The new data item can have a different data type, length, or picture clause than the original data item.

  • Example: 01 EMPLOYEE-DETAILS. 05 EMPLOYEE-NAME PIC X(20). 05 EMPLOYEE-ID PIC 9(5)....read more

Q21. Which utility is used for creating GDG

Ans.

IDCAMS utility is used for creating GDG (Generation Data Group)

  • IDCAMS utility is used to define, alter, and delete GDGs

  • Syntax for defining GDG: DEFINE GDG(NAME(dataset.name) LIMIT(n) SCRATCH)

  • Example: DEFINE GDG(NAME(TEST.GDG) LIMIT(5) SCRATCH)

Q22. What is COND parameter?

Ans.

COND parameter is used to specify the condition code value of the previous step to determine the execution of the current step.

  • It is used in JCL statements like IF, ELSEIF, and COND.

  • It can be used to execute a step conditionally based on the return code of the previous step.

  • It can also be used to skip a step based on the return code of the previous step.

  • The syntax for COND parameter is COND=(code, operator, stepname).

Q23. Which methodology is your using ?

Ans.

I am using Agile methodology for software development.

  • Agile methodology focuses on iterative development and collaboration between cross-functional teams.

  • It emphasizes adaptability to changes in requirements and continuous improvement.

  • Examples of Agile practices include Scrum, Kanban, and Extreme Programming (XP).

Q24. Ways of passing data to the Cobol program.

Ans.

Data can be passed to a Cobol program through parameters, files, and environment variables.

  • Parameters: Data can be passed to a Cobol program through parameters in the PROCEDURE DIVISION.

  • Files: Data can be read from or written to files using INPUT-OUTPUT sections in the Cobol program.

  • Environment variables: Data can be passed through environment variables like JCL symbols or system variables.

Q25. What is diff between index and 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.

Q26. Explain DB2 program execution process Sort keys Isolation levels Cics

Ans.

DB2 program execution involves sort keys, isolation levels, and integration with CICS.

  • DB2 program execution involves processing SQL statements to interact with the database.

  • Sort keys are used to organize data in a specific order for efficient retrieval.

  • Isolation levels determine the level of data visibility and concurrency control in transactions.

  • CICS (Customer Information Control System) is an online transaction processing system that integrates with DB2 for mainframe applic...read more

Q27. SORT operations in JCL

Ans.

SORT operations in JCL

  • SORT is used to arrange data in a specific order

  • SORT can be used to remove duplicates from data

  • SORT can be used to merge multiple files into one

  • SORT can be used to select specific records based on a condition

Q28. Difference between static and dynamic call

Ans.

Static call is resolved at compile time, while dynamic call is resolved at runtime.

  • Static call is determined at compile time based on the declared type of the object.

  • Dynamic call is determined at runtime based on the actual type of the object.

  • Static call is faster but less flexible, while dynamic call is slower but more flexible.

Q29. What is imsdb . Plz explain

Ans.

IMSDB stands for Information Management System Database. It is a hierarchical database management system used for mainframe applications.

  • IMSDB is a hierarchical database management system used on mainframe computers.

  • It organizes data in a tree-like structure with parent-child relationships.

  • IMSDB is commonly used in large organizations for handling high volumes of data efficiently.

  • It is often used in conjunction with COBOL programming language for mainframe applications.

Q30. Sort command to search a string

Ans.

The SORT command in Mainframe can be used to search for a string.

  • Use the SORT command with the FIND keyword followed by the string you want to search for.

  • Specify the input file and output file for the search operation.

  • Example: SORT FILE(INPUT) USING(CTL1) COPY FIND FIRST 'SEARCHSTRING' OUTPUT FILE(OUTPUT)

Q31. Diff between static and dynamic call

Ans.

Static call is resolved at compile time, while dynamic call is resolved at runtime.

  • Static call is determined at compile time based on the code structure.

  • Dynamic call is determined at runtime based on the actual object being referenced.

  • Static call is faster as it does not require runtime resolution.

  • Dynamic call allows for flexibility and polymorphism in programming.

  • Example: In Java, static method calls are resolved at compile time, while dynamic method calls using interfaces a...read more

Q32. What is cobol explaining

Ans.

COBOL is a programming language used primarily for business, finance, and administrative systems.

  • COBOL stands for Common Business-Oriented Language.

  • It is known for its readability and self-documenting nature.

  • COBOL is used in industries such as banking, insurance, and government.

  • It is designed for processing large volumes of data efficiently.

  • COBOL programs are typically structured into divisions, sections, and paragraphs.

Q33. What is jcl explanation

Ans.

JCL (Job Control Language) is a scripting language used on IBM mainframe operating systems to instruct the system on how to run batch jobs.

  • JCL is used to define and control the execution of programs in a batch environment.

  • It specifies the input, output, and processing requirements for each job step.

  • JCL statements are written in a specific format and are interpreted by the operating system.

  • Example: //JOBNAME JOB (ACCOUNT), 'DESCRIPTION',CLASS=1,MSGCLASS=H

Q34. what is explanation for SPUFI

Ans.

SPUFI stands for SQL Processing Using File Input. It is a tool used to execute SQL queries in DB2 databases.

  • SPUFI is a menu-driven tool provided by IBM for executing SQL queries in DB2 databases.

  • It allows users to interactively execute SQL queries and view the results.

  • SPUFI can be used to test SQL statements before embedding them in application programs.

  • It is commonly used by developers and database administrators for ad-hoc querying and testing.

  • Example: Using SPUFI, a develo...read more

Q35. Difference between package and. Plan?

Ans.

A package is a collection of related modules or programs, while a plan is an execution strategy for those modules.

  • Package is a logical grouping of related modules or programs.

  • Plan is an execution strategy for the modules in a package.

  • Packages are created first, then plans are created to specify how the modules in the package will be executed.

  • Example: A package may contain modules for customer management, while a plan specifies the order in which these modules will be executed...read more

Q36. Utility used to create a GDG.

Ans.

IDCAMS is the utility used to create a GDG.

  • IDCAMS is a utility program used in z/OS to define and manage VSAM datasets, including GDGs (Generation Data Groups).

  • To create a GDG using IDCAMS, you would typically write a JCL job that includes IDCAMS statements to define the GDG base and generations.

  • Example: //STEP1 EXEC PGM=IDCAMS //SYSIN DD * DEFINE GDG(NAME(TEST.GDG) LIMIT(10) SCRATCH)

Q37. Tell me about Cobol basics.

Ans.

COBOL is a high-level programming language used for business applications on mainframe computers.

  • COBOL stands for Common Business-Oriented Language.

  • It was designed in 1959 by CODASYL and is primarily used in finance, insurance, and government sectors.

  • COBOL programs are divided into four divisions: Identification, Environment, Data, and Procedure.

  • It uses English-like syntax and is known for its readability and self-documenting nature.

  • Example: DISPLAY 'Hello, World!'

Q38. Abend SOC4 how to resolve

Ans.

Abend SOC4 is a system completion code indicating a protection exception error in a mainframe program.

  • Check for invalid data or address in the program

  • Review the program logic for any potential issues

  • Ensure proper handling of data and memory allocation

  • Use debugging tools like IPCS to analyze the error

Q39. Mainframe Modernization Process

Ans.

Mainframe modernization process involves updating legacy systems to newer technologies while preserving critical business logic.

  • Assess current mainframe environment and identify areas for modernization

  • Develop a modernization strategy, including choosing the right technology stack

  • Migrate data and applications to the new platform while ensuring minimal disruption to business operations

  • Test the modernized system thoroughly to ensure functionality and performance

  • Train staff on th...read more

Q40. Sort JCL utilities and scenarios

Ans.

Sort JCL utilities are used to sort data in Mainframe environment based on specific criteria.

  • Use SORT utility in JCL to sort data in ascending or descending order

  • Specify the key fields to sort on in the SORT statement

  • Use INCLUDE and OMIT statements to filter data before sorting

  • Use JOINKEYS utility to merge two or more sorted datasets based on key fields

Q41. Diff between index and subscript

Ans.

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

  • Index starts from 0 in most programming languages.

  • Subscript is the value enclosed in square brackets used to access an element in an array.

  • Example: In array arr = [10, 20, 30], arr[1] has index 1 and subscript value 20.

Q42. What is db2? Explain

Ans.

db2 is a relational database management system developed by IBM.

  • Developed by IBM

  • Used for managing relational databases

  • Supports SQL queries and commands

  • Commonly used in mainframe environments

Q43. What is SQL CA?

Ans.

SQL CA stands for SQL Communications Area, which is a data structure used in mainframe programming to communicate between programs and the DB2 database.

  • SQL CA contains information about the SQL statement being executed, such as SQLCODE, SQLSTATE, and error messages.

  • It is used to pass information between the application program and the DB2 database.

  • SQL CA is typically defined in the working storage section of a COBOL program.

  • Example: EXEC SQL INCLUDE SQLCA END-EXEC

Q44. what's the use of repro

Ans.

REPRO is a utility program used in mainframe systems to copy or replicate datasets.

  • Used to copy datasets from one location to another

  • Can be used to replicate datasets for backup purposes

  • Helps in transferring datasets between different systems or environments

Q45. Restart logic in db2

Ans.

Restart logic in db2

  • Restart logic is used to recover from system or application failures

  • It involves identifying the point of failure and restarting from that point

  • In DB2, restart logic is implemented using the RESTART and CONTINUE options

  • RESTART option starts the application from the beginning of a unit of work

  • CONTINUE option resumes the application from the point of failure

Q46. Explain oops concept

Ans.

OOPs is a programming paradigm based on the concept of objects that interact with each other.

  • OOPs stands for Object-Oriented Programming.

  • It focuses on creating objects that have properties and methods.

  • Encapsulation, Inheritance, Polymorphism, and Abstraction are the four main pillars of OOPs.

  • Example: A car is an object that has properties like color, model, and methods like start, stop, and accelerate.

Frequently asked in, ,

Q47. Differentiate between Comp vs Comp3

Ans.

Comp is a binary data type with fixed length, while Comp3 is a packed decimal data type with variable length.

  • Comp is binary and fixed length, while Comp3 is packed decimal and variable length

  • Comp stores data in binary format, while Comp3 stores data in packed decimal format

  • Comp uses 4 bytes for each field, while Comp3 uses variable length depending on the precision required

  • Example: Comp field with value 1234 will be stored as x'00000004D2' in hexadecimal, while Comp3 field wi...read more

Q48. Types of utilities in mainframe

Ans.

Mainframe utilities are software programs used for various tasks like data management, job scheduling, and system maintenance.

  • IEFBR14 - used for creating empty datasets

  • IEBCOPY - used for copying datasets

  • IEBGENER - used for generating datasets

  • IDCAMS - used for defining and managing VSAM datasets

  • DFSORT - used for sorting and merging datasets

Q49. Complex situations in project

Ans.

Handling complex situations in projects requires problem-solving skills, communication, and collaboration.

  • Identify the root cause of the complexity

  • Break down the problem into smaller tasks

  • Collaborate with team members to brainstorm solutions

  • Communicate effectively with stakeholders to manage expectations

  • Prioritize tasks based on urgency and impact

Q50. Temporary files in JCL

Ans.

Temporary files in JCL are used to store intermediate data during job execution.

  • Temporary files are defined using DD statements in JCL.

  • They are typically used to store data that needs to be processed or manipulated before being written to permanent files.

  • Temporary files are often allocated with DISP=(MOD,DELETE) to ensure they are deleted after job completion.

1
2
Next
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions for Mainframe Developer Related Skills

Interview experiences of popular companies

3.7
 • 9.9k Interviews
3.7
 • 7.2k Interviews
3.8
 • 5.4k Interviews
3.8
 • 4.6k Interviews
3.6
 • 3.6k Interviews
4.1
 • 2.3k Interviews
3.5
 • 2.3k Interviews
3.7
 • 782 Interviews
3.4
 • 760 Interviews
3.9
 • 485 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

Mainframe Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

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

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter