CoolInterview.com - 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
COOLINTERVIEW.COM MAINFRAME INTERVIEW QUESTIONS COBOL INTERVIEW QUESTIONS 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
Matrix(I,J)giving
Marix3(I,J)
End-Perfrom
End-Perfrom.




Source: CoolInterview.com
Question: 77 I PI 9.
PERFORM VARYING I FROM 1 BY 1 UNTIL>10
DISPLAY 'OK'
END-PERFORM.

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: CoolInterview.com
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.

Source: CoolInterview.com
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

Types:
SB37 - End of Volume
SE37 - Maximum extents reached
S013 - Member not found
S80A - Region limit violation Source: CoolInterview.com
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
Matrix(I,J)giving
Marix3(I,J)
End-Perfrom
End-Perfrom.

2)File Control Setion, Working Storage Section, Linkage Section, Reporting Section, Screen Section. Source: CoolInterview.com
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: CoolInterview.com
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: CoolInterview.com
Question: Explain call by context by comparing it to other calls.



Answer: I think this Q&A should say "CONTENT" rather than "context". Source: CoolInterview.com
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.
Source: CoolInterview.com
Question: What is LENGTH in COBOL II?



Answer: LENGTH acts like a special register to tell the length of a group or elementary item.
Source: CoolInterview.com
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: CoolInterview.com
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: CoolInterview.com
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: CoolInterview.com
Question: How is sign stored in a COMP field ?

Answer: In the most significant bit. Bit is on if -ve, off if +ve. Source: CoolInterview.com
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

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
Source: CoolInterview.com
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: CoolInterview.com
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: CoolInterview.com
Question: How to include system time & date in the report generation in cobol programing?



Answer: ACCEPT WS-ACCEPT-DATE FROM DATE.

ACCEPT WS-ACCEPT-TIME FROM TIME.

declare ws-accept-date and ws-accept-time in working-storage section
Source: CoolInterview.com
Question: How do you come out of an EVALUATE statement?

Answer: 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 of any extra code. Source: CoolInterview.com
Question: What is the point of the REPLACING option of a copy statement?



Answer: COPY AR00RB REPLACING ==:AR00:== BY ==AMBS==.

AR00RB COPY BOOK AS FOLLOWS AS (iam copying only few lines of code)

01 :AR00:RB-WORK-AREA

03 :AR00:RB-IO-REQUEST PIC S9(04) BINARY
VALUE ZERO
88 :AR00:RB-OPEN-INPUT VALUE +01.
88 :AR00:RB-OPEN-OUTPUT VALUE +02.
88 :AR00:RB-OPEN-IO VALUE +03.
88 :AR00:RB-OPEN-INPUT-DYN VALUE +04.
88 :AR00:RB-OPEN Source: CoolInterview.com

1 2 3 4 5 6 7 8 9 10 Next



India News Network
Latest 20 Questions
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
"Holiday Packages" announced as an advertisement are an example of _________: (a) Offer (b) Counter Offer (c) Invitation to Offer (d) None of the above
A match fixing contract between a player and a broker is a: (a) Valid Contract (b) Unenforceable Contract (c) Void Contract (d) Illegal Contract
When a bookseller sells a book on cash payment then it is called as ___________: (a) Unilateral Contract (b) Bilateral Contract (c) Executed Contract (d) Executory Contract
____________ agreements are created by situation: (a) Written (b) Oral (c) Void (d) Implied
Cache = 0.046875 Seconds