COBOL Interview Questions


Cracking an interview has never been easy as history states. The questions that an interview asks are unpredictable and are quite difficult to answer if you don’t what the answer is. However, these one or two questions that you have not answered might decide your future as the interviewer can reject your application stating some obvious reasons which cannot be neglected. Therefore, to crack an interview with flying colors, leverage our COBOL interview questions and answers that are prepared by experts and professionals who have adequate knowledge and expertise in this field.


COBOL or Common Business Oriented Language is a programming language that is considered to be of high level and is mostly used to develop business applications. It is also popularly known as the first language that was designed to be OS-agnostic and is also used until now to develop financial as well as business applications. COBOL was introduced for business computer-based programs in industries like finance or human resources. COBOL mostly uses normal English words and some phrases to make it completely easier to operate all the ordinary businesses easily so that the users understand the language without facing any hassles or troubles.

Best COBOL Interview Questions of 2022

1. What do you know about COBOL?

COBOL stands for Common Business-Oriented Language. The US Department of Defense, in a conference, formed CODASYL (Conference on Data Systems Language) to develop a language for meeting business data processing needs which are now known as COBOL.

2. List some features of COBOL.

COBOL is a standard language that can be compiled and executed on various machines. It is ideally suited for business-oriented applications as it can handle huge volumes of data. It provides numerous debugging and testing tools. COBOL is a structured language; it has different divisions, so it is easy to debug.

3. Name the divisions in a COBOL program.

Identification Division, Environment Division, Data Division, and Procedure Division.

4. What are the different data types available in COBOL?

Alpha-numeric (X), Alphabetic (A), and Numeric (9).

5. What is the IS NUMERIC clause?

IS NUMERIC clause is used to check if any item is numeric or not. It returns TRUE when the item against which it is used contains only numbers (0 to 9). The item can be positive or negative.

6. What are 66 and 88 levels used for?

Level 66 is used for RENAMES clause and Level 88 is used for condition names.

7. What is the difference between subscript and index?

Subscript is the occurrence in an array. An index is a displacement from the beginning of an array.

8. What is the difference between SEARCH and SEARCH ALL?

SEARCH is a serial search, whereas SEARCH ALL is a binary search. A table must be in sorted order before using SEARCH ALL.

9. What Is Binary Search?

Search on a sorted array. Compare the item to be searched with the item at the center. If it matches, fine else repeat the process with the left half or the right half depending on where the item lies.

10. My Program Has An Array Defined To Have 10 Items. Due To A Bug, I Find That Even If The Program Access The 11th Item In This Array, The Program Does Not Abend. What Is Wrong With It?

Must use compiler option STRANGE if you want array bounds checking. Default is NOSSRANGE.

11. How Do You Define A Sort File In Jcl That Runs The Cobol Program?

Use the SORTWK01, SORTWK02,..... dd names in the step. The number of sort datasets depends on the volume of data being sorted, but a minimum of 3 is required.

12. What Is The Difference Between Performing A Section And A Paragraph?

Performing a SECTION will cause all the paragraphs that are part of the section, to be performed. Performing a PARAGRAPH will cause only that paragraph to be performed.

13. What Is The Use Of Evaluate Statement?

Evaluate is like a case statement and can be used to replace nested Ifs. The difference between EVALUATE and case is that no break is required for EVALUATE i.e. control comes out of the EVALUATE as soon as one match is made.

14. What Are The Different Forms Of Evaluate Statement?

imperative stmt imperative stmt
WHEN (D+X)/Y = 4 WHEN -305 ALSO 32
imperative stmt imperative stmt
imperative stmt imperative stmt
imperative stmt imperative stmt
imperative stmt imperative stmt

15. How Do You Come Out Of An Evaluate Statement?

After the execution of one of the when clauses, the control is automatically passed on to the next sentence after the EVALUATE statement. There is no need for any extra code.

16. What Is A Scope Terminator? Give Examples?

Scope terminator is used to marking the end of a verb e.g. EVALUATE, END-EVALUATE; IF, END-IF.

17. How Do You Do In-line Perform?

PERFORM ... ...

18. When Would You Use In-line Perform?

When the body of the performance will not be used in other paragraphs. If the body of the performance is a generic type of code (used from various other places in the program), it would be better to put the code in a separate para and use PERFORM para name rather than in-line perform.

19. What Is The Difference Between Continue & Next Sentence?

CONTINUE is like a null statement (do nothing), while NEXT SENTENCE transfers control to the next sentence (!!) (A sentence is terminated by a period).

20. What Does Exit Do?

Does nothing! If used, must be the only sentence within a paragraph.

21. How Is Sign Stored In Packed Decimal Fields And Zoned Decimal Fields?

Packed Decimal fields: Sign is stored as a hex value in the last nibble (4 bits ) of the storage. Zoned Decimal fields: As a default, a sign is over punched with the numeric value stored in the last bite.

22. How Is Sign Stored In A Comp-3 Field?

It is stored in the last nibble. For example, if your number is +100, it stores hex 0C in the last byte, hex 1C if your number is 101, hex 2C if your number is 102, hex 1D if the number is -101, hex 2D if the number is -102, etc...

23. How Is Sign Stored In A Comp Field?

In the most significant bit. A bit is on if -ve, off if +ve.

24. What Is The Difference Between Comp & Comp-3?

COMP is a binary storage format while COMP-3 is packed decimal format.

25. What Is Comp-1? Comp-2?

COMP-1 - Single precision floating point. Uses 4 bytes.
COMP-2 - Double precision floating point. Uses 8 bytes.

26. How Do You Define A Variable Of Comp-1? Comp-2?

No picture clause is to be given. Example 01 WS-VAR USAGE COMP-1.

27. How Many Bytes Does A S9(7) Comp-3 Field Occupy?

Will take 4 bytes. A sign is stored as a hex value in the last nibble.
General formula is INT((n/2) + 1)), where n=7 in this example.

28. How Many Bytes Does A S9(7) Sign Trailing Separate Field Occupy?

Will occupy 8 bytes (one extra byte for sign).

29. How Many Bytes Will A S9(8) Comp Field Occupy?

4 bytes.

30. What Is The Maximum Value That Can Be Stored In S9(8) Comp?


31. What Is Comp Sync?

Causes the item to be aligned on natural boundaries. Can be SYNCHRONIZED LEFT or RIGHT.

For binary data items, the address resolution is faster if they are located at word boundaries in the memory. For example, on a mainframe, the memory word size is 4 bytes. This means that each word will start from an address divisible by 4. If my first variable is x(3) and the next one is s9(4) comp, then if you do not specify the SYNC clause, S9(4) COMP will start from byte 3 ( assuming that it starts from 0 ). If you specify SYNC, then the binary data item will start from address 4. You might see some wastage of memory, but access to this computational field is faster.

32. What Is The Maximum Size Of A 01 Level Item In Cobol I? In Cobol Ii?

In COBOL II: 16777215.

33. What Are Different File Open Modes Available In Cobol?


34. What Is The Mode In Which You Will Open A File For Writing?


Career scopes and salary scale

As there are lots of financial institutions that use this application to make their processes smoother and easier, if you are well-versed with COBOL language programming, then you definitely have an opportunity to pursue your career in this field without thinking much. The opportunities in this field are incredible for the freshers as well as experienced. Don’t miss this opportunity at all. For a fresher, he or she has scope to make about 83,000 dollars per annum, while for an experienced candidate, he or she can up to 150,000 dollars per annum based on the skill set he or she is possessing.


Cracking an interview has never been so easy before as you have the option to explore our COBOL interview questions and answers that are prepared by our experts. In case of any doubts or discrepancies, you can feel free to drop us a message and we will look into it as soon as possible.