- World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.

Get it now !!
Send your Resume to 6000 Companies
COBOL Interview Questions & Answers - Learning Mode

COBOL Interview Questions & Answers - Learning Mode

COBOL (/ˈkoʊbɒl/, an acronym for common business-oriented language) is a compiled English-like computer programming language designed for business use. It is imperative, procedural and, since 2002, object-oriented. COBOL is primarily used in business, finance, and administrative systems for companies and governments. Developers‎: ‎CODASYL‎, ‎ANSI‎, ‎ISO COBOL was developed in 1959 by the Conference on Data Systems Languages (CODASYL). This committee was a formed by a joint effort of industry, major universities, and the United States Government.

Try COBOL Interview Questions & Answers - Exam Mode

1 2 3 4 5 6 7 8 9 10 Next

Sort By : Latest First | Oldest First | By Rating

COBOL Interview Questions & Answers - Learning Mode
Try COBOL Interview Questions & Answers - Exam Mode
Question: Write a COBOL program for Matrix Addition.

Answer: identification division.
programe id. x.
enviroment division.
data division.
warking-storage section.
procedure division.
inline perform to reach 2y2 or 3y3 matrix. e.g.
Perform varying I from 1 by 1 until i > 3
Perform varying J from 1 by 1
until J > 3
Add Matrix1(I,J) to

Question: Give brief me about changeman & expidator tool.

Answer: Expeditor Tool :

This is a debugging tool. Handly tool mostly widely used everywhere. There are two types of expediting, online exped and batch exped.

For online exped, you may first need to compile and link your module. Supply your link to the exped job. The exped will pick the module. You can use breakpoint for exped.

Similar is the case for Batch Exped.

Its all depends how your envirnornment allows you to set up.

Question: 77 I PI 9.

What output/msg is likely when this program is executed thru JCL?

Answer: This loop will give compilation error becoz value of I is declared for only one digit , when loop reaches to 10 it will find mismatching b/w I & the current value i.e. 10. Source:
Question: Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc.

Answer: External sort is performed by SORT pgm. Internal sort gives you data handling flexibility and it takes less secondary memory. For huge Volume of files it's better to use internal sort else large amount of space will be required in external sort. any comments...? Source:
Question: What is meant by abbend and what is the difference between abbend and error.
when does and why dose it come.
what are the types?

Answer: Abend is short for Abnormal end, abend is a term used to describe when a program or task ends without warning. Generally when an abend is encountered the user will receive some type of error message.

Error occurs because of Syntax problems or dataset disposition issues etc, whereas Abend occurs because of some functional problems

SB37 - End of Volume
SE37 - Maximum extents reached
S013 - Member not found
S80A - Region limit violation Source:
Question: Write a COBOL program for Matrix Addition?
What are the sections available in Data division in COBOL?
Explain me about Report Section.

Answer: 1) Use inline perform to reach 2y2 or 3y3 matrix. e.g.
Perform varying I from 1 by 1 until i > 3
Perform varying J from 1 by 1
until J > 3
Add Matrix1(I,J) to

2)File Control Setion, Working Storage Section, Linkage Section, Reporting Section, Screen Section. Source:
Question: What is the difference between index and subscript?

Answer: Subscript refers to the array occurrence while index is the displacement (in no of bytes) from the beginning of the array. An index can only be modified using PERFORM, SEARCH & SET.

Need to have index for a table in order to use SEARCH, SEARCH ALL. Source:
Question: Explain call by context by comparing it to other calls.

Answer: I think this Q&A should say "CONTENT" rather than "context". Source:
Question: How is sign stored in a COMP field ?

Answer: In the most significant bit. Bit is on if -ve, off if +ve. Source:
Question: How may do the following definitions occupy?

(a) s(3)v99 comp-3
(b) s(9)v99 comp

Answer: Poor syntax. S9(3)V99 is correct and occupies 3 bytes. Count the number of 9's add 1 and divide by 2 rounding up if necessary. ex.

S9(7)v99. there are 9 nines. (9+1)/2 = 5 bytes.

S9(6)V99. there are 8 nines (8+1)/2 = 4.5 = 5 bytes.

binary data (COMP) has no fractions, integers only.
Question: What is LENGTH in COBOL II?

Answer: LENGTH acts like a special register to tell the length of a group or elementary item.
Question: Name and explain the three location modes.

Answer: Calc is based on a symbolic value which is used to determine the target page. Via mode is for members only. Via records are stored near to their owners. In direct mode the target is specified by the user and is stored as close as possible to that page. Source:
Question: When is a scope terminator mandatory?

Answer: Scope terminators are mandatory for in-line PERFORMS and EVALUATE statements. For readability, it's recommended coding practice to always make scope terminators explicit. Source:
Question: If you are current on the owner of a set, what is the difference between an obtain next and obtain first?

Answer: No difference. There is a difference between obtain first and obtain next for an area sweep, but not when current on the owner in a set. Source:
Question: What COBOL construct is the COBOL II EVALUATE meant to replace?

Answer: EVALUATE can be used in place of the nested IF THEN ELSE statements. Source:
Question: What is the difference between comp and comp-3 usage? Explain other COBOL usages.

Answer: COMP

Comp is used for Binary Representation

it allows only S and 9 ...

s9(01) to s9(04) it takes 2 bytes memory

s9(05) to s9(09) it takes 4 bytes memory

s9(10) to s9(18) it takes 8 bytes memory


Comp-3 is used for Packed Decimal values

it allows S,9 ,V

mostly it is useful for Decimal Caluculation Values

it takes (n/2)+1 Bytes Memory
Question: What is file status 39 ?

Answer: Mismatch in LRECL or BLOCKSIZE or RECFM between your COBOL program & the JCL (or the dataset label). You will get file status 39 on an OPEN. Source:
Question: What is SSRANGE, NOSSRANGE?

Answer: These are compiler options w.r.t subscript out of range checking. NOSSRANGE is the default and if chosen, no run time error will be flagged if your index or subscript goes out of the permissible range. Source:
Question: How to include system time & date in the report generation in cobol programing?



declare ws-accept-date and ws-accept-time in working-storage section
Question: What is the difference between a binary search and a sequential search? What are the pertinent COBOL commands?

Answer: In a binary search the table element key values must be in ascending or descending sequence. The table is 'halved' to search for equal to, greater than or less than conditions until the element is found. In a sequential search the table is searched from top to bottom, so (ironically) the elements do not have to be in a specific sequence. The binary search is much faster for larger tables, while sequential works well with smaller ones. SEARCH ALL is used for binary searches; SEARCH for se Source:

1 2 3 4 5 6 7 8 9 10 Next

India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 0.016113 Seconds