COBOL Interview Questions and Answers
COBOL, an acronym for Common Business Oriented Language is an English-like computer programming language compiled and designed primarily for business use. Read more about COBOL and get a job in this field, by going through the COBOL interview questions below carefully.
The COBOL language is still being used in applications that are deployed on mainframe computers, like large-scale batch and transaction processing jobs. Being imperative, procedural and object-oriented, COBOL is mainly used by businesses, finance organizations, and administrative systems for enterprises as well as governments.
If you feel that there is a lot of content that you cannot read all at once, then, you can download all the COBOL interview questions as a PDF which shall enable you to get over these questions and answers offline as well.
Most Frequently Asked COBOL Interview Questions
Here’s the difference in performing a Section and a Paragraph in COBOL
PARAGRAPH | SECTION |
---|---|
It is just a block of code containing one or more sentences. | This is a block of code that contains one or more paragraphs. |
It begins with a paragraph name and ends with the starting of the next paragraph. | It begins with a section name and ends with the starting of another section. |
This can be ended in another way by another section starting or by the end of the program. | It cannot be ended another way. |
All the paragraphs should code in AREA A. | All Sections should also code in AREA A. |
Syntax: Paragraph-name. | Syntax: {Section-name} SECTION. |
A scope terminator is basically any COBOL verb that is always conditional, like, (IF and EVALUATE) or it has a conditional clause such as (COMPUTE, PERFORM, READ) matching scope terminator always. Completed by including the reserved word being terminated, it always starts with END-.
NEXT SENTENCE | CONTINUE |
---|---|
This statement passes the control after the next implicit scope terminator; i.e. period (.) | This passes the control after the next Explicit scope terminator. For example, END-IF, END-PERFORM, etc. |
It gives control to the verb which follows the next period. | This gives control to the next verb after the scope terminator. |
This will focus on the next step after the period no matter the number of controls present. | It will focus on scope terminators and other conditions first before going into other controls. |
First of all, the SOC7 abend error is displayed when there is invalid data inside the comp field and the program is processing some computation on it. To start with, check the data you are passing as input because there must be some corrupt data which is the root cause of this error.
Here are some steps to solve this error:
- If the method of input is a file and you do have a file-aid and input data layout, use the file-aid to segregate the data on a field level.
- File-aid will now highlight any of the incorrect data which is Invalid.
- Now that you have found the data which is invalid, fix the data issue.