Mainframe Interview Questions and Answers

Mainframe Interview Questions and Answers

Last updated on 25th Sep 2020, Blog, Interview Question

About author

Karthik (Head/ Director Command Center )

High level Domain Expert in TOP MNCs with 8+ Years of Experience. Also, Handled Around 24+ Projects and Shared his Knowledge by Writing these Blogs for us.

(5.0) | 14028 Ratings 738

The mainframe is a high-performance computer used for large-scale computing purposes that require greater availability and security than a smaller-scale machine can offer. It has the most user-friendly connectivity, single thread performance, and reliability factors. Traditionally, mainframes were related to instead of distributed computing. So If you are looking for a job that is related to Mainframe, you need to prepare for the 2020 Mainframe Interview Questions. Though every interview is different and the scope of a job is also different, we can help you out with the top Mainframe Interview Questions and Answers, which will help you take the leap and get your success in your interview.

1.What is a mainframe?

Ans:

A mainframe is also known as “big iron”. It is a large and multi-user computer device that helps to perform TIPS per second. Traditionally, mainframes were related to instead of distributed computing, Distinction is blurring smaller between traditional centralized computing and distributed computing because small computers become additional powerful and mainframes become additional multi-purpose.

2.What are the various data types in COBOL?

Ans:

Alpha-numeric (fx), alphabet (a) and number (9).

3.Define how the LIKE table could be created?

Ans:

  • The usage of LIKE parameter could create the LIKE table by the CREATE statement. 
  • These tables are usually required during the testing of the production environment.

4.Define DRDA?

Ans:

DRDA means Distributed Relational Database Architecture. It is a connection protocol that is used for local database processing. IBM and other vendor databases use it. It contains a set of rules which is used for communication between an application and a DBMS distant relation.

5.What is 77 level?

Ans:

Startup item. Do not have subdivisions of other objects (can not qualify), or they can not separate themselves.

6.Define WHERE and its usage?

Ans:

The clause “WHERE” isolates a row or an element during the usage of a related system.

7.What Is Use Of Linkage Section?

Ans:

Linkage section is used to accept data from outside the program.Either it’s part of Jcl or Call from any other programs,they pass data into called program thru linkage section only.

8.How To Get The Last Record In Vsam File In Cluster? And How Can U Get The Ksds File Records Into Ur Cobol Program?

Ans:

Move high values to the key of the VSAM file and the issue Readnext record command. Then give the Readprev command. This will read the last record. In VSAM, there is one command HURBA, Using that we can read the last record, If you want to know more about it go to IBM RED BOOKS. You will get the solution. by using the HURBA we can get the max records by using the CKD count key data we will get the last record.

9.Name the units in the COBOL project.

Ans:

Identification Division, Environmental Division, Data Division, Practical Division.

10.What is Mainframe Testing?

Ans:

Mainframe Testing is the testing of computer code services and applications supported by Mainframe Systems. Mainframe testing plays an energetic role in application development, overall development price and quality. Mainframe checking may be a part of end-to-end test coverage spanning platforms.

  • Mainframe Testing is sometimes performed on the deployed code victimization varied information combos set into the input data.
  • Applications that run on the mainframe are accessed through terminal somebody. The somebody is that the sole computer code that has to be put in on the shopper machine.
  • While activity Mainframe testing, the tester solely has to realize the navigations of the CICS screens. they’re custom-designed for specific applications.
Subscribe For Free Demo

Error: Contact form not found.

11.How are HIDAM and HDAM databases different?

Ans:

HIDAM has its separate index file based on the root segment. This file stores information about the pointer that denotes the position of data. Whereas, HDAM does not have a separate index file. The key field of each record is accessed through a randomizer that positions the record in the correct place in the database.

12.What is referential integrity?

Ans:

Referential integrity rule states that consistency needs to be maintained between primary and foreign keys. In other words, each foreign key needs to have a primary key.

13.What is mainframe development?

Ans:

Mainframe development is software development, on a unique operating system, using obsolete tools and languages. A mainframe developer must know more than a programming language, he must know mainframe tools listed below and be comfortable working in the mainframe culture.

14.What is mainframe CICS?

Ans:

Customer Information Control System (CICS) is a family of mixed language application servers that provide online transaction management and connectivity for applications on IBM mainframe systems under z/OS and z/VSE. CICS is middleware designed to support rapid, high-volume online transaction processing.

15.What is DRDA?

Ans:

DRDA (Distributed Relational Database Architecture) is a set of protocols or rules that enables the user to access distributed data regardless of where it is physically stored.

  • It is an architecture developed by IBM.
  • It enables relational data to distribute among multiple platforms.
  • In DRDA, both like and unlike platforms can communicate with one another. Example DB2 subsystem can communicate with DB2 as well as RDBMS.
  • It provides an open, robust heterogeneous and distributed database environment.
  • DRDA provides techniques of coordinating communication among distributed locations.

16.Describe the benefits of DRDA?

Ans:

The key benefits of DRDA are as follows.

  • DRDA is the only protocol that supports distributed RDBMS.
  • One significant benefit provided by DRDA is its clearly stated set of rules for supporting distributed data access.
  • It is available today, and many vendors are stepping up on the DRDA.

17.What is IMS?

Ans:

The term IMS stands for Information Management System. It’s a database and transaction management system for Mainframe. IBM introduced it in 1968. Since then, it has gone through several upgrades and adapted some new programming tools and environments. IMS is one of two key legacy databases and transaction management subsystems from IBM that run on mainframe operating systems, and the other is CICS.

18.Is Control Interval Descriptor Field present for each Control Interval?

Ans:

Yes, Control Interval Descriptor Field present for each Control Interval.

19.Which of the following are attributes of the index component of the VSAM Control area?

Ans:

Options:

    1. 1.Index set
    2. 2.Sequence set
    3. 3.Both a and b
    4. 4.Control set

20.What do you understand by lock contention?

Ans:

As the DBD allows access to only one object at a given time, the concept of lock contention is said to come into the picture when more than one object tries to get access for simultaneous execution.

21.What is WHERE used for?

Ans:

When an element or row needs to be isolated especially if used in conjunction with a relational statement, that is when WHERE is used.

22.What is the code for a deadlock?

Ans:

The code used for a deadlock is 911 and 913. These are the SL code for a deadlock.

23.What is the full form of SPUFI?

Ans:

The full form of SPUFI is SL Processing Using  File Input. This is a tool used by developers to create objects in the existing database. This is a menu-oriented tool.

24.Which are all the file OPEN modes?

Ans:

The file OPEN modes are as follows… INPUT, OUTPUT, I-O and EXTEND

25.What is COMP-1? COMP-2?

Ans:

COMP-1 – Single precision floating point. Uses 4 bytes.

COMP-2 – Double precision floating point. Uses 8 bytes.

26.What does the INITIALIZE verb do?

Ans:

  • Alphabetic, Alphanumeric fields & alphanumeric edited items are set to SPACES.
  • Numeric, Numeric edited items set to ZERO.
  • FILLER , OCCURS DEPENDING ON items left untouched.

27.What Is The Basic Difference Between “Directory” And “pds” In Ibm Mainframe?

Ans:

A PDS or Partitioned Data Set is a dataset containing multiple members, each of which holds a separate sub-data set, similar to a directory in other types of file systems. This type of dataset is often used to hold executable programs (load modules), source program libraries (especially Assembler macro definitions). A PDS is most somewhat analogous to a Zip file on microcomputers, except the files stored in a PDS are not compressed.

The Partitioned Data Set can only allocate on a single volume with the maximum size of 65536 tracks. Besides members, a PDS consists also of their directory. Each member can be accessed directly using the directory structure. Once a member is located, the data stored in that member is handled in the same manner as a PS (sequential) data set.

28.What is COBOL?

Ans:

COBOL is common business oriented language. It was a language used by the US military named CODALYS. The language is a business language and is still in existence because of its ease and power to process huge data.

29.File1 has 100 records and file2 has 200 records. I want to copy 50 records which are in both files into file3?

Ans:

  • First need to sort both files
  • READ FILE1
  • READ FILE2
  • PERFORM UNTIL EOF = ‘Y’
  • IF FILE1-ID > FILE2-ID THEN
  • READ FILE2 AT END MOVE ‘Y’ TO EOF
  • ELSE IF FILE1-ID < FILE2-ID
  • READ FILE1 AT END MOVE ‘Y’ TO EOF
  • ELSE IF FILE1-ID = FILE2-ID
  • WRITE FILE3
  • READ FILE1 AT END MOVE ‘Y’ TO EOF
  • READ FILE2 AT END MOVE ‘Y’ TO EOF
  • END-PERFORM

30.What is the distinction amongst INCLUDE and COPY?

Ans:

A minimal distinction is there in the way they work. They both help to extend design in a program. The central contrast is that INCLUDE gets extended at PRE-COMPILATION and is the motivation behind why all DCLGEN individuals are extended utilizing INCLUDE.

Course Curriculum

Get Hands-On Practical Mainframe Training & Advance Your Career

  • Instructor-led Sessions
  • Real-life Case Studies
  • Assignments
Explore Curriculum

31.Define the necessity of run stats among the environment test?

Ans:

It is used for the clearing of the different values of the catalog columns. Since this column is already equipped with default values, the result may not be as expected.

32.What Is Label Record Is Standard Or Omitted In File Description Of Data Division?

Ans:

Label record is standard means it will use disk files. But tape files can have a standard label too. If the label record is omitted it should be a tape file without any begin and end blocks on the tape.

33.Name and explain the type of locks?

Ans:

There are three types of lock, namely:

Shared: This type of lock permits two or more programs to read from the locked space but does not allow them to change it.

Update: This lock is more lenient. It permits the program to read and change the locked space.

Exclusive: This lock restricts all users from accessing the locked space.

34.How are composite and multiple indexes different?

Ans:

Multiple indexes is two indexes, one each for a column of the same table. A composite index is only one index, which consists of combined values of 2 columns of a table.

35.What is SPUFI?

Ans:

First of all, SPUFI stands for SL Processore Using File Input. This is a type of database provision, developed by the well-known IBM for the system that they provide, known as DB2. With the help of this users get to put the SL commands directly into the TSO environment. This way they do not have to embed the commands of SL into the program.

36.How do you define the variable of COMP-1? COMP-2?

Ans:

You have to give a picture. Example 01 WS-VAR Application COMP-1.

37.How many bytes are occupied by an S9 (7) COMP-3 field?

Ans:

4 bytes will take. The hex value is stored as a symbol in the last nibble.

  • General form INT ((n / 2) + 1)), where n = 7 in this example.

38.How many bytes a S9 (7) SIGN TRAILING SEPARATE Field Occupied?

Ans:

8 bytes (one extra byte sign) will occupy.

39.How many bytes a S9 (8) COMP field invades?

Ans:

4 bytes.

40.What is the maximum value that can be saved in S9 (8) COMP?

Ans:

  • 99999999

41.What is COMP SYNC?

Ans:

Reasons for the item to change the natural boundaries. LEFT or RIGHT can be SYNCHRONIZED.

For binary data objects, if they are in word boundaries in memory, the address clarity will be faster. For example, the memory key is 4 bytes in the mainframe. That is, each word starts at an address divided by 4. If my first variable is x (3) and the next one

S9 (4) comp, if you do not specify the SYNC section, S9 (4) will start from COMPB 3 (this starts from 0). If you specify SYNC, the binary data item will start from address 4. You can find some waste of memory, but access to it

The computational field is fast.

42.What is the maximum level of 01 level item in COBOL I? In COBOL II?

Ans:

  • In COBOL II: 16777215

43.How you can follow the file format from COBOL programs:

Ans:

  • Fixed block file – application ORGANIZATION is parallel. Use the Recording MODE F, BLOCK CONTAINS 0.
  • Unblocked – Use ORGANIZATION. Do not use the Recording MOD F, BLOCK CONTAINS
  • DARK BLOCK FILE – Use ORGANIZATION. Recording uses MODE V, BLOCK CONTAINS 0. FD Do not tag 4 bytes of registration length, ie the JCL record length pgm + 4
  • Unsubscribed – use ORGANIZATION. Use V for recording mode, do not use BLOCK CONTAINS. Do not encrypt 4 bytes for log length in FD, which means that the JCL record length pgm + 4 has the maximum length of the wreck.
  • Use ESDS VSAM file – ORGANIZATION.
  • KSDS VSAM file – ORGANIZATION is INDEXED, KEY IS, ALTERNATE RECORD KEY IS
  • RRDS file – use ORGANIZATION related, relevant keyword IS
  • Printer file – ORGANIZATION. Use Recording MODE F, BLOCK CONTAINS 0. (Use RECFM = FBA in JCL DCB).

44.What are the open modes available in another file gopal?

Ans:

INPUT, OUTPUT, I-O, EXTEND.

45.What is the method of opening a file that you write?

Ans:

OUTPUT, EXTEND

46.GLC How do you define the files mentioned in a Ubuntu?

Ans:

Provide DD cards for files mentioned in the main scheme.

47.Can you get a record in an ESDS file? Can you delete a record from it?

Ans:

Can not write (record length should be), but can not be deleted.

48.What is file level 92?

Ans:

Logic error. E.g., a file is opened to the input and an attempt to write it.

49.What is file 39?

Ans:

Your COBOL is not applicable to either LRECL or BLOCKSIZE or RECFM between pgm & JCL (or database label). The file 39 is available in OPEN.

50.What is JCL in mainframe, and how many types of JCL statements are there for a job?

Ans: 

JCL stands for Job Control Language. JCL is a scripting language used on IBM mainframe operating system to instruct the system for the batch job. It is a set of statements that you code to tell the operating system about the task you want to perform. Sometimes this set of statements is quite large, but most jobs can be run using a very small subset.

JCL statements notify the OS where to find the required input, how to process that input, and what to do with the resulting output.

There are three main types of JCL statements for all jobs:

First one is a statement to identify the unit of work that the operating system is to perform.

The second statement is EXEC statements, depending on the number of job steps within the job.

The third statement is DD statements to identify the input and output data sets.

Course Curriculum

Enroll in Best Mainframe Courses and Get Hired by TOP MNCs

Weekday / Weekend BatchesSee Batch Details

51.How do you access an uncataloged dataset in a JCL?

Ans:

It can be done by using the UNIT and VOL serial parameters in the dataset DD statement

52.When the JOB statement is used?

Ans:

JOB statement gives the job identity to the Operating System (OS), in the spool and the scheduler. It is the first control statement in a JCL. The available parameters in the JOB statement help the OS in allocating the right scheduler. It is also useful for analyzing the required CPU time and issuing notifications to the user.

Syntax:

  • //Job-name JOB Positional-param, Keyword-param  

53.What is the mainframe testing? Categorize the mainframe manual testing?

Ans:

Mainframe Testing is testing of Mainframe Systems. Mainframe Testing is similar to web-based testing. The Mainframe application is tested against the test cases developed using requirements.

Mainframe Testing is generally performed on the deployed code using various data combinations set.While performing Mainframe testing, the tester only needs the navigations of the CICS screens.If any changes are made to the code in programs like COBOL, JCL, etc., then the tester does not need the emulator to set up on the machine. The changes can be applied through one terminal emulator and will act on others too.

Mainframe manual testing can be classified into two categories:

Batch Job Testing

In batch testing, the testing process consists of executions of batch jobs for the functionality implemented in the current release.

Online Testing

Online Testing is known as testing of CICS screens, which is similar to testing of the web page.

54.What are the rules for DB2 programming?

Ans:

The rules that are necessary for a COBOL-DB2 program are as follows:

  • All the SQL statements must be delimited between EXEC SQL and ENDEXEC.
  • The SQL statements must be written in Area B.
  • All the tables that are used in a program must be declared in the WorkingStorage Section. This is done by using the INCLUDE statement.
  • All SQL statements except INCLUDE and DECLARE TABLE must belong in the Procedure Division.

55.Explain Host Variables?

Ans:

Host variables are data substances defined within a COBOL program. They are used to forward values to and receive values from a database. It can be determined under the File Section, Working-Storage Section, and Local-Storage Section or Linkage Section of COBOL program. 

Host variables can be used in one of the given two ways.

Input host variables

Output host variables

56.How to declare Host variables?

Ans:

Following syntax are used to declare host variables and include tables in the Working-Storage section:

  • DATA DIVISION.  
  • WORKING-STORAGE SECTION.  
  • EXEC SQL  
  • INCLUDE table-name  
  • END-EXEC.  
  • EXEC SQL BEGIN DECLARE SECTION  
  • END-EXEC.  

57.How do you use EXPLAIN in DB2?

Ans:

When associate degree SL is dead against or sure to a DB2 information DB2 Optimizer tool defines the access path accustomed to access the info. This access path is outlined per tables’ statistics generated by DB2 Runstats tool. By victimization following manner, we are able to use just in DB2.

Create an inspiration table

Run justify statement for the question with a question no (this inserts the info within the higher than setting up table)

Retrieve (select *) the info hold on within the setup table for the question no

58.When do you use a LIKE statement?

Ans:

To do partial search e.g. to search employees by name, you need not specify the complete name; using LIKE, you can search for partial string matches.

59.What is the meaning of underscore ( ‘_’ ) in the LIKE statement? 

Ans:

Match for any single character.

60.What do you accomplish by GROUP BY … HAVING clause? 

Ans:

GROUP BY partitions the selected rows on the distinct values of the column on which you group by.

HAVING selects GROUPs which match the criteria specified

61.Consider the employee table with column PROJECT nullable. How can you get a list of employees who are not assigned to any project?

Ans:

  • SELECT EMPNO
  • FROM EMP
  • WHERE PROJECT IS NULL;

62.What are the situations which can bring about the Infinite circle by utilizing PERFORM?

Ans:

With PERFORM TIMES and PERFORM UNTIL a large circle can be created.

63.Define the utilization of TEST BEFORE as well as TEST AFTER in the PERFORM explanations?

Ans:

TEST BEFORE and TEST AFTER are utilized to characterize when the condition to be checked.

64.What are correlated subqueries?

Ans:

A subquery in which the inner ( nested ) query refers back to the table in the outer query. Correlated subqueries must be evaluated for each qualified row of the outer query that is referred to.

65.What is a cursor? why should it be used? 

Ans:

Cursor is a programming device that allows the SELECT to find a set of rows but return them one at a time.Cursor should be used because the host language can deal with only one row at a time.

66.How would you retrieve rows from a DB2 table in embedded SL?

Ans:

Either by using the single row SELECT statements, or by using the CURSOR.

67.Apart from cursor, what other ways are available to you to retrieve a row from a table in embedded SL?

Ans:

Single row SELECTs.

68.What is DCLGEN ? 

Ans:

DeCLarations GENerator: used to create the host language copy books for the table definitions. Also creates the DECLARE table.

69.What should you do to resolve the SOC-7 error?

Ans:

Basically you have to fix the harmful data. Many times the reason for SOC7 is an unreleased item. Explore that opportunity first. Many installs provide you with a padding for the run time (which is created by calling some subroutines or OS server as an assembly language). This is the last step that has been overcome to dumps Offline Offline. Get the serial number of the source code in this corner to test the output of the XREF list and output it. You can see the source code to find the error. To capture the run time, you need to define some data (such as SYSABOUT) at JCL. If none of these are helpful, use judgment and display to change the source of the error. Some installation packages may contain program diagnostic tools. Use them.

70.Is it mandatory to use DCLGEN? If not, why would you use it at all? 

Ans:

It is not mandatory to use DCLGEN.

Using DCLGEN, helps detect wrongly spelt column names etc. during the pre-compile stage itself ( because of the DECLARE TABLE ). DCLGEN being a tool, would generate accurate host variable definitions for the table reducing chances of error.

Mainframe Sample Resumes! Download & Edit, Get Noticed by Top Employers! Download

71.What is REORG? When is it used?

Ans:

REORG reorganizes data on physical storage to cluster rows, positioning overflowed rows in their proper sequence, to reclaim space, to restore free space. It is used after heavy updates, inserts and delete activity and after segments of a segmented tablespace have become fragmented

72.Will precompile a DB2-COBOL program bomb if DB2 is down?

Ans:

No. Because the precompiler does not refer to the DB2 catalogue tables.

73.When will you choose to run RUNSTATS?

Ans:

After a load, or after mass updates, inserts, deletes, or after REORG.

74.What are the contents of a DCLGEN?

Ans:

  • EXEC SL DECLARE TABLE statement which gives the layout of the table/view in terms of DB2 data types.
  • A host language copy book that gives the host variable definitions for the column names.

75.How To Define A Directory And What Is The Structure And Definition For The Same?

Ans:

As in DIRECTORY we can store files as well as another DIRECTORY which includes other files but PDS includes only members not another PDS inside it.

76.How To Send A Sms To A Mobile Through Mainframe VM’s?

Ans:

SMS in mainframe is the Storage Management System. I hope it has nothing to do with telephone SMS.

77.When is the INSPECT verb utilized as a part of COBOL?

Ans:

Investigate is utilized to know a number of times a particular character happens or to supplant some bit of information.

78.How number juggling tasks are performed in COBOL?

Ans:

We can do a wide range of number juggling activities in COBOL.

79.State the difference between GOBACK, STOP RUN and EXIT PROGRAM in COBOL?

Ans:

The fundamental differences between GO BACK, STOP RUN, and EXIT PROGRAM in COBOL are:

  • GOBACK returns control to the calling program
  • STOP RUN stops the present work unit and returns control to OS
  • EXIT PROGRAM is utilized to leave a program that has been called by another program

80.What is the contrast between Delimited by Space and Delimited by Size?

Ans:

In delimited by Space, Space is considered as a delimiter. In delimited by measure, add up to the size of information thing is considered as delimiter

81.Define COMP – 3 fields and its utilization?

Ans:

COMP-3 is a pressed decimal portrayal of information and is utilized to spare space.

82.Can the values of alphanumeric be moved to variable numeric?

Ans:

Truly, it can be done. May confront particular information cases (S0C7) blunder in the event that the field is utilized as a part of any computation. This data answers COBOL inquiries questions identified with information development of various sorts of factors.

83.What Is The Panel Name Of Ispf Primary Option Menu?

Ans:

Panel name is ISPf/PDF primary option menu

84.What Is The Size Of The Address Space In Kbs For 16 Bit Address Space?

Ans:

  • The size of address space for 16 bit address space is 64kb
  • For s/370 the address space 21 bit- 16MB
  • For s370XA and EXA address space is 31 bit- 2GB

85.Define the procedure to pass an incentive from JCL to COBOL?

Ans:

We can go by utilizing RETURN-CODE. There’s a characterized word RETURN-CODE in COBOL that can be utilized to pass information from the program to the JCL. This is particularly valuable when some particular return code is accounted for in an occupation. Typically the activity returns 0 or 4 or in some cases 8 or 12 return code if any irregularity happens. This can be changed by utilizing RETURN-CODE of the program. This data answers COBOL inquiries questions identified with passing information from COBOL to JCL.

86.What is the use of the EVALUATE statement?

Ans:

An assessment is a case statement and can be used to replace local IFS. The difference between EVALUATE and the trial is that EVALUATE requires any ‘breakdown’ from EVALATEATE, with a competition taking place.

87.What is IMAGECOPY ? 

Ans:

It is a full backup of a DB2 table which can be used in recovery.

88.How do you come out with a valuation report?

Ans:

Whenever the debates take place, the control will automatically be sent to the next penalty after the EVALUATE report. No additional code needed.

89.In a valuation statement, when can I give a complicated situation?

Ans:

Yes.

90.What is the purpose terminator? Give examples.

Ans:

The terminal is used to indicate the end of a verb, e.g. EVALUATE, END-EVALUATE; IF, END-IF.

91.How do you act?

Ans:

PERFORM … …

END PERFORM

92.When should you use an inline program?

Ans:

The body of the action will not be used in other columns. If the body of the event is a common type of code (used from many places in the program), it is best to place the code in a custom package and use the PERFORM paragraph than the Internet program.

93.What is the difference between the series and the next week?

Ans:

CONTINUE is a zero statement (do not do anything), while the next article next to the next sentence (!!) (a sentence for the rest of the period)

94.What does EXIT do?

Ans:

Nothing done! If used, it should be a sentence in one sentence.

95.Can I retrieve a (X) (100) field with X (200) field?

Ans:

Yes. Again and again, both fields begin at one place.

For example:

  • 01 WS-TOP PIC X (1)
  • 01 WS-TOP-RED REDEFINES WS-TOP PIC X (2).
  • If you are ’12’ for WS-TOP-RED
  • The display will show WS-TOP 1 times
  • The display will show WS-TOP-RED 12.

96.What is the figurative constant in COBOL?

Ans:

They are the reserved words that specify certain alphabetic or numeric constant values like zero, spaces, quotes, high and low value/s, etc

Are you looking training with Right Jobs?

Contact Us

Popular Courses