Mainframe Developer
60+ Mainframe Developer Interview Questions and Answers
Popular Companies
Q1. How will you use NULL indicator in your program? How will you use VSAM file in program?SOC7 abend reason and resolution.
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 moreThe 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
Q3. How will you use cursor in COBOL program? What is the difference between cursor and SQL? When will you use JOINKEYS ?
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
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.
Q5. How will you abend the program? by moving error code to Return code
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. what syntax you give in Parm parameters to not be abend job when Subscript had ended his limit?
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
Share interview questions and help millions of jobseekers 🌟
Q7. What is a cursor in the context of databases, and what purposes does it serve?
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
Q8. How will you increase performance of cobol program when its using number of cursors?
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
Mainframe Developer Jobs
Q9. How will you read your file in different record structure ?
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
Q10. Difference between call by value and call by reference
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
Q11. How you will add 10 th additional record in file using Cobol program , what is the path.
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
Q12. What are Db2 utilities, meaning of various SQL Codes, cursor application.
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
Q13. How can null variables be handled in COBOL DB2 programs?
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.
Q14. What is the difference between static and dynamic calls?
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
Q15. What is the waterfall model in software development?
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
Q16. Is any condition mandatory to call a program in COBOL?
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.
Q17. How will you give data from Cobol to JCL ?
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.
Q18. how is call command different from link ?
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
Q19. How will you resolve division by zero error Socb
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
Q20. How did you integrate the COBOL-DB2 programs?
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
Q21. What are the different levels used in cobol
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.
Q22. What is the difference between rename and redefine
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
Q23. How to get control over job execution?
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.
Q24. How will you check if file is empty ?
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
Q25. is SQLCA EXEC SQL is mandatory ?
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.
Q26. Redefine clause of COBOL
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
Q27. Which utility is used for creating GDG
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)
Q28. What is COND parameter?
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).
Q29. Which methodology is your using ?
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).
Q30. Ways of passing data to the Cobol program.
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.
Q31. What is diff between index and subscript
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.
Q32. SORT operations in JCL
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
Q33. Explain DB2 program execution process Sort keys Isolation levels Cics
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
Q34. Difference between static and dynamic call
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.
Q35. What is the Agile framework?
Agile framework is a project management approach that emphasizes flexibility, collaboration, and incremental development.
Agile framework involves breaking down projects into smaller tasks called sprints
It promotes frequent communication and collaboration among team members
Allows for flexibility and adaptability to changes in requirements
Examples of Agile frameworks include Scrum, Kanban, and Extreme Programming
Q36. What is imsdb . Plz explain
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.
Q37. Sort command to search a string
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)
Q38. Diff between static and dynamic call
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
Q39. What is cobol explaining
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.
Q40. What is jcl explanation
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
Q41. what is explanation for SPUFI
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
Q42. Difference between package and. Plan?
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
Q43. Tell me about Cobol basics.
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!'
Q44. Utility used to create a GDG.
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)
Q45. Abend SOC4 how to resolve
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
Q46. Mainframe Modernization Process
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
Q47. Sort JCL utilities and scenarios
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
Q48. Diff between index and subscript
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.
Q49. What is db2? Explain
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
Q50. What is SQL CA?
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
Interview Questions of Similar Designations
Top Interview Questions for Mainframe Developer Related Skills
Interview experiences of popular companies
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
Reviews
Interviews
Salaries
Users/Month