0% found this document useful (0 votes)
22 views14 pages

Mainframe Questions

The document discusses various concepts related to COBOL and DB2 programming, including precompilation, binding, and handling SQL abends. It also covers practical questions about file handling, JCL, CICS, and performance optimization in COBOL programs. Additionally, it includes behavioral questions and scenarios for assessing problem-solving and teamwork skills in a mainframe development context.

Uploaded by

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

Mainframe Questions

The document discusses various concepts related to COBOL and DB2 programming, including precompilation, binding, and handling SQL abends. It also covers practical questions about file handling, JCL, CICS, and performance optimization in COBOL programs. Additionally, it includes behavioral questions and scenarios for assessing problem-solving and teamwork skills in a mainframe development context.

Uploaded by

Namma ooru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

1) what is precompilation???

my view: pre compilation is used to separate both cobol code and db2 code.
The cobol code moved to the LOAD library and db2 code moved to the DBRM library.

2)what is bind?
my view:After the precompilation,Then we will bind the PGM with the DBRM code we compiled.
In the bind card we have to use PLAN to connect with tables involved in PGM.

Extras:(these are only applied if we have local bind and compile jobs)

*)In the job we have to correctly mention the compiled load library and plan or else it will be
through error.

*)In a PGM there is a chance of multiple tables involved with multiple qualifiers.

but in the bind card we are able to mention only one qualifier, for the remaining qualifiers
tables ?
we have to directly hard code the table names with qualifiers in PGM itself.

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. Difference between package and collection in DB2?
4. How do we handle -911 SQL abend in COBOL DB2 programs?
5. What happens when we open a cursor?
6. Cursor declaration in Working-Storage vs Procedure Division – what’s the difference?
7. Role of ‘FOR UPDATE OF’ and ‘WHERE CURRENT OF’ in cursors?
8. What are SOC4 and SOC7 abends?
9. Query to find the 3rd highest salary in a table?
10. What is CLASS and MSGCLASS in JCL?
11. How to create a MAP and MAPSET in CICS?
12. How to read a VSAM file in CICS?
13. Difference between TDQ and TSQ in CICS?
14. What is the DB2 RUNSTATS utility?
15. Ways to pass data from JCL to COBOL?
16. What is SEARCH and SEARCH ALL in COBOL?
17. Utilities used in the COBOL-DB2 precompile process?
18. Importance of SQLCA in COBOL DB2 programs?
19. How to write matched and unmatched logic in COBOL?
20. Query to find unique values in a DB2 table?
21. Types of VSAM files? Difference between KSDS and ESDS?
22. What is an Alternate Index (AIX)?
23. How to convert VB to FB using JCL?
24. What are -911 and -913 SQL abends?
25. Difference between Static and Dynamic calls in COBOL?
26. How to pass data between applications in CICS?
27. What is the Linkage Section in COBOL?
28. Difference between CALL and LINK?
What is the purpose of the REWRITE statement in COBOL, and how is it different from WRITE?
Scenario: A COBOL program is giving incorrect results after a recent change. How would you
identify and fix the issue?
How do you handle date and time calculations in COBOL?
What is the difference between EXIT and GOBACK in COBOL?
Scenario: You need to process a hierarchical file (e.g., IMS DB). How would you design the COBOL
program?
How do you use COPYBOOKS in COBOL, and what are their advantages?
What is the purpose of the SET statement in COBOL, and how is it used with INDEX?
Scenario: A COBOL program is taking too long to sort a large dataset. How would you optimize
it?
How do you handle exception handling in COBOL-DB2 programs?
What is the purpose of the INITIALIZE statement in COBOL, and how does it work?
Scenario: You need to migrate a COBOL program from a mainframe to a cloud environment.
What challenges would you expect, and how would you address them?
2) 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?
1. ROWSET cursors and their uses.
2. Adding trailer records with total counts and sequence numbers to your datasets.
3. Static and dynamic subprogram calling from another COBOL program.
4. COBOL-DB2 program compilation process and the utilities used. IGYCRCTL/IEWL etc. Also
SQLCODE -818. Compilation parameters like OFFSET/LIST, DYNAM/NODYNAM etc.
5. Some small code snippet that might involve STRING/UNSTRING/INSPECT or a Julian to
Gregorian date/timestamp conversion.
6. If CICS is included, then pseudo-conversation programs. (Side note: asynchronous
programming using 'promise' in JavaScript uses the same concept)
7. TSQ and TDQ.
8. Physical and symbolic map
9. XCTL and LINK - differences
10. How to load the data into array in cobol?
11. How to define VSAM KSDS ?
12. How many types of VSAM files?
13. How to search particular record in cobol?
14. what is search and Search all?
15. I have a VSAM file record length 3200,type =VB, I have to load this data into sequential file ,
then how we can create sq file?
16. I have 25 steps in jcl , I want to execute only 5th step and 10th step?
17. what is s322 abend, how to resolve?
18. suppose I have record data input file, I want to write into output file twice, how can we
achieve this?
19. I have 25 steps in jcl, I want execute only 10th step, how to do that? If it is in proc ? how can
we achieve this?
20. I want to see the comp3 values, how can view this ?
21. what is cond parameter in JCL and Cond=Only
22. what is cursor and Cursor life cycle
22. SQL -803, how to resolve
23. SQL -805, how to resolve
24. SQL -811, how to resolve
25. How will identify if we update the table changes in db2?
26. what will happen when open cursor and fetch cursor?
What is the difference between COMP and COMP-3 in COBOL?
How does the REDEFINES clause work in COBOL?
What is the purpose of the OCCURS clause in COBOL?
Explain the difference between INDEX and SUBSCRIPT in COBOL.
How do you handle file errors in COBOL using the FILE STATUS clause?
What is the significance of the 88-level in COBOL?
How do you perform sorting in COBOL without using the SORT verb?
What is the difference between CALL BY REFERENCE and CALL BY CONTENT in COBOL?
How do you handle dynamic memory allocation in COBOL?
What is the purpose of the INSPECT statement in COBOL?
1. Can you explain the differences between a COBOL copybook and a working storage section?
2. Describe the purpose and usage of the FILE-CONTROL paragraph in COBOL.
3. How do you handle VSAM file status codes in COBOL programs?
4. Explain the significance of DSN in DB2. How is it used?
5. Discuss the significance of COMMIT and ROLLBACK statements in DB2.
6. How would you optimize a COBOL program for performance in a mainframe environment?
7. What are the various types of joins in DB2, and when would you use each one?
8. Explain how you would handle GDG (Generation Data Group) in JCL.
9. Describe the purpose and usage of EXEC statement in JCL.
10. How do you handle concurrency issues in a DB2 environment?
11. Can you explain the role of a plan and a package in DB2?
12. Discuss the significance of primary and secondary allocation in VSAM datasets.
13. How do you debug COBOL programs in a mainframe environment?
14. Explain the importance of the SQLCODE and SQLSTATE variables in DB2 programming.
15. Describe the process of error handling in COBOL programs using CICS (Customer Information
Control System).
Can you explain the different data access methods in mainframe systems?
What is the difference between VSAM and DB2?
How would you optimize the performance of a COBOL program running on a mainframe?
Can you describe the various types of mainframe storage and their purposes?
Explain the process of handling a file with variable-length records in COBOL.
What are the different types of CICS transactions, and how do they interact with the mainframe
system?
Can you discuss the importance of security in mainframe environments and describe some
common security measures?
How would you handle a deadlock situation in a DB2 database on a mainframe?
What is the purpose of a JCL (Job Control Language), and how would you create and submit a JCL
job?
Explain the concept of data sharing in a mainframe environment, and discuss the advantages
and challenges associated with it.
Can you describe the process of debugging and troubleshooting a mainframe program?
Discuss the role of IBM MQ (Message Queue) in mainframe systems and how it facilitates
communication between applications.
How would you handle a large volume of data processing in a mainframe environment? Are
there any specific techniques or tools you would use?
Can you explain the concept of online and batch processing in a mainframe system and provide
examples of each?
Describe the steps involved in migrating a mainframe application to a newer version of the
operating system or a different platform.
What is a mainframe computer, and what are its advantages?
Can you explain the concept of COBOL? What are its key features?
What is the purpose of JCL (Job Control Language) in mainframe programming?
How do you handle file processing in COBOL? Explain the different file organizations and access
methods.
What are the various types of data structures available in COBOL?
What are the differences between sequential and VSAM file processing?
How do you debug and troubleshoot COBOL programs?
Have you worked with any mainframe development tools, such as CICS or DB2? Explain your
experience with them.
How do you ensure the security and integrity of mainframe applications and data?
Have you worked on any mainframe modernization projects? If so, explain your role and the
tools/technologies used.
Behavioral Questions:
Describe a challenging situation you encountered while working on a mainframe project and
how you resolved it.
How do you manage your time and prioritize tasks when working on multiple projects
simultaneously?
Tell me about a time when you had to work as part of a team to achieve a common goal. How
did you contribute to the team's success?
How do you stay updated with the latest trends and advancements in mainframe technology?
Describe a situation where you made a mistake or encountered a setback. How did you handle
it, and what did you learn from it?
Can you give an example of a time when you had to learn a new programming language or
technology quickly? How did you approach it?
How do you handle tight deadlines and work under pressure?
Describe a situation when you had to explain a technical concept to a non-technical person. How
did you ensure effective communication?
What motivates you to pursue a career as a mainframe developer?
How do you ensure the quality and maintainability of your code when working on mainframe
projects?
. What is MAP & MAPSET?

2. What is BMS?
3. How do you set the cursor position on a CICS screen?

4. How do you dynamically set the CURSOR position to a specific field?

5. What is the Skipper and Stopper technique?

6. What is FSET, FRSET, and MDT?

7. How do you set the MDT option to ON, even if data is not entered?

8. Do we use the Environment Division in a CICS program?

9. How do you read a VSAM file in CICS?

10. Explain the steps in COBOL DB2-CICS program compilation.

11. How many ways can you execute a CICS transaction?

12. What are the control tables available in CICS?

13. How is a CICS program executed? Explain the flow from transaction initiation.

14. What is COMMAREA, and how many bytes can it pass?

15. What are the conversation techniques available in CICS?

16. How can we achieve pseudo-conversation in CICS?


17. What is a Symbolic Map?

18. What is the difference between Symbolic and Physical Map?

19. What is the difference between ERASE, MAPONLY, and DATAONLY options in SEND MAP?

20. What is the RETURN command in CICS?

21. What is EIBAID, and how is it used?

22. What is EIBCALEN?

23. What is DFHEIBLK in CICS?

24. What is EIBRESP in CICS?

25. How many types of Queues are there in CICS?

26. What is the difference between TSQ and TDQ?

27. What is the difference between Intra-partitioned TDQ and Extra-partitioned TDQ?

28. What is the difference between XCTL and LINK commands in CICS?

29. What is the CICS command used to access the current date and time?

30. How do you handle errors in CICS?


31. What is the difference between getting the system time with EIBTIME and ASKTIME?

32. What is the difference between re-entrance and quasi re-entrance?

33. What ABENDS have you encountered in CICS?

34. What are ASRA, AEIS, and ABENDS in CICS?

35. What is the MAPFAIL condition?

COBOL Interview Questions (30-40):


What is the purpose of the REWRITE statement in COBOL, and how is it different from WRITE?
Scenario: A COBOL program is giving incorrect results after a recent change. How would you
identify and fix the issue?
How do you handle date and time calculations in COBOL?
What is the difference between EXIT and GOBACK in COBOL?
Scenario: You need to process a hierarchical file (e.g., IMS DB). How would you design the COBOL
program?
How do you use COPYBOOKS in COBOL, and what are their advantages?
What is the purpose of the SET statement in COBOL, and how is it used with INDEX?
Scenario: A COBOL program is taking too long to sort a large dataset. How would you optimize
it?
How do you handle exception handling in COBOL-DB2 programs?
What is the purpose of the INITIALIZE statement in COBOL, and how does it work?
Scenario: You need to migrate a COBOL program from a mainframe to a cloud environment.
What challenges would you expect, and how would you address them?
2. 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?
3.
4. 1. What is MAP and MAPSET?

2. What is BMS?

3. How do you set a cursor position on a CICS screen?

4. How do you dynamically set the CURSOR position to a specific field?

5. What is the Skipper technique and Stopper technique?

6. What are FSET, FRSET, and MDT?

7. How do you set the MDT option to ON, even if no data is entered?
8. Do we use the Environment Division in a CICS program?

9. How do you read a VSAM file in CICS?

10. Explain the steps involved in the COBOL-DB2-CICS program compilation process.

11. How many ways can we initiate or execute a CICS transaction?

12. What are the control tables available in CICS?

13. How is a CICS program executed? Explain the flow starting from transaction initiation on the
CICS screen.

14. What is the COMMAREA, and how many bytes can we pass through it?

15. What are conversational techniques, and what is pseudo-conversation in CICS?

16. How can we achieve pseudo-conversation in CICS?

17. What is a Symbolic Map?

18. What is the difference between a Symbolic and Physical Map?

19. What is the difference between ERASE, MAPONLY, and DATAONLY options in the SEND MAP
command?

20. What is the RETURN command in CICS?


21. What is EIBAID, and how can it be used?
1. ROWSET cursors and their uses.
2. Adding trailer records with total counts and sequence numbers to your datasets.
3. Static and dynamic subprogram calling from another COBOL program.
4. COBOL-DB2 program compilation process and the utilities used. IGYCRCTL/IEWL etc. Also
SQLCODE -818. Compilation parameters like OFFSET/LIST, DYNAM/NODYNAM etc.
5. Some small code snippet that might involve STRING/UNSTRING/INSPECT or a Julian to
Gregorian date/timestamp conversion.
6. If CICS is included, then pseudo-conversation programs. (Side note: asynchronous
programming using 'promise' in JavaScript uses the same concept)
7. TSQ and TDQ.
8. Physical and symbolic map
9. XCTL and LINK - differences
10. How to load the data into array in cobol?
11. How to define VSAM KSDS ?
12. How many types of VSAM files?
13. How to search particular record in cobol?
14. what is search and Search all?
15. I have a VSAM file record length 3200,type =VB, I have to load this data into sequential file ,
then how we can create sq file?
16. I have 25 steps in jcl , I want to execute only 5th step and 10th step?
17. what is s322 abend, how to resolve?
18. suppose I have record data input file, I want to write into output file twice, how can we
achieve this?
19. I have 25 steps in jcl, I want execute only 10th step, how to do that? If it is in proc ? how can
we achieve this?
20. I want to see the comp3 values, how can view this ?
21. what is cond parameter in JCL and Cond=Only
22. what is cursor and Cursor life cycle
22. SQL -803, how to resolve
23. SQL -805, how to resolve
24. SQL -811, how to resolve
25. How will identify if we update the table changes in db2?
26. what will happen when open cursor and fetch cursor?

hashtag
5. 1. Have you worked on VSAM?

2. How do you define a VSAM file in COBOL?


3. How do you define the record structure of a VSAM file in COBOL?

4. How many types of VSAM files are there, and what is the difference in each?

5. How do you create a KSDS VSAM file?

6. How do you define a KSDS VSAM file in COBOL?

7. How do you copy data from a VSAM file to another VSAM file or a PS file?

8. What is the VERIFY option in IDCAMS for VSAM files?

9. What is Control Interval and Control Area in VSAM?

10. What is control area split and control interval split in VSAM?

11. How do you update a VSAM file with today’s transactions if yesterday’s transactions are in a
VSAM file?

12. How do you browse a VSAM file?

13. What are file status codes 22, 23, 90, 91, and 92 in VSAM?

1)how to load the data into array in cobol?


2)how to define VSAM KSDS ?
3)how many types of VSAM files?
4)How to search particular record in cobol?
5)what is search and Search all?
6)I have a VSAM file record length 3200,type =VB, I have to load this data into sequential file ,
then how we can create sq file?
7)I have 25 steps in jcl , I want to execute only 5th step and 10th step?
8)what is s322 abend, how to resolve?
9)suppose I have record data input file, I want to write into output file twice, how can we
achieve this?
10)I have 25 steps in jcl, I want execute only 10th step, how to do that? If it is in proc ? how can
we achieve this?
11)I want to see the comp3 values, how can view this ?

1. Can you explain the differences between a COBOL copybook and a working storage section?
2. Describe the purpose and usage of the FILE-CONTROL paragraph in COBOL.
3. How do you handle VSAM file status codes in COBOL programs?
4. Explain the significance of DSN in DB2. How is it used?
5. Discuss the significance of COMMIT and ROLLBACK statements in DB2.
6. How would you optimize a COBOL program for performance in a mainframe environment?
7. What are the various types of joins in DB2, and when would you use each one?
8. Explain how you would handle GDG (Generation Data Group) in JCL.
9. Describe the purpose and usage of EXEC statement in JCL.
10. How do you handle concurrency issues in a DB2 environment?
11. Can you explain the role of a plan and a package in DB2?
12. Discuss the significance of primary and secondary allocation in VSAM datasets.
13. How do you debug COBOL programs in a mainframe environment?
14. Explain the importance of the SQLCODE and SQLSTATE variables in DB2 programming.
15. Describe the process of error handling in COBOL programs using CICS (Customer Information Control
System).
Can you explain the main components of a typical mainframe system?
What programming languages and tools have you used for mainframe development?
Describe the process you follow for debugging and troubleshooting mainframe programs.
How do you ensure the efficiency and optimization of mainframe programs?
Can you explain the different types of data sets in a mainframe environment?
Have you worked with COBOL? If so, describe your experience and the projects you've worked on.
What techniques do you use to optimize the performance of COBOL programs?
Explain the concept of VSAM (Virtual Storage Access Method) and its usage in mainframe systems.
How do you handle large volumes of data processing in a mainframe environment?
Have you worked with any mainframe transaction processing systems? Describe your experience.
How do you ensure the security and integrity of mainframe data?
Describe a time when you had to integrate a mainframe system with other technologies or platforms.
Have you worked with any mainframe batch processing systems? Explain your experience.
How do you handle data sharing and synchronization in a mainframe environment?
Can you explain the different types of mainframe storage systems and their characteristics?
Describe a challenging mainframe development project you've worked on and how you overcame the
challenges.
How do you approach mainframe system maintenance and upgrades?
Have you worked with any mainframe testing tools or frameworks? If yes, describe your experience.
How do you stay updated with the latest trends and technologies in the mainframe development field?
Can you provide an example of a successful mainframe system implementation or migration project you
were involved in?

You might also like