Frequently Asked Cobol And DB2 Interview Questions Part – 10
What Are The File Opening Modes In Cobol?
File opening modes in COBOL include: INPUT, OUTPUT, I-O, and EXTEND.
What Is The Maximum Size Of A Numeric Field We Can Define In Cobol?
The maximum size of a numeric field is PIC 9(18).
What Is The Difference Between Continue And Next Sentence?
CONTINUE transfers the control to the next statement after the scope terminator. NEXT SENTENCE transfers the control to the statement after the first period encountered.
Why We Can Not Define Occurs Clause At 01 Level?
01 is of the record level. We repeat the fields within a record, not the record itself. So an Occurs clause can not be used at 01 level.
What Is The Mode In Which You Will Open A File For Writing?
To write into a file, the file has to be opened in either OUTPUT or EXTEND mode.
What Is The Difference Between Call By Content And Call By Reference?
The parameters passed in a Call By Content are protected from modification by the called program. In Call By Reference, parameters can be modified by the called program.
What Is A Linkage Section?
The linkage section is a part of a called program that ‘links’ or maps to data items in the calling program’s working storage.
What Will Happen If You Code Go Back Instead Of Stop Run In A Stand Alone Cobol Program?
The program will go in an infinite loop.
How Is Sign Stored In A Comp-3 Field?
It is stored in the last nibble.
What Is The Difference Between Comp And Comp-3?
Comp is a binary usage, while comp-3 indicates packed decimal.
What Is The Purpose Of Identification Division?
Identification Division is used for documentation purpose.
What Is The Difference Between Static Call And Dynamic Call?
In static call, the called program is a stand alone program, it is an executable program. During run time we can call it in our called program. As about dynamic call, the called program is not an executable program; it can be executed through the called program only.
What Is Redefines Clause?
Redefines clause is used to allow the same storage allocation to be referenced by different data names.
What Is The Purpose Of Pointer Phrase In String Command?
The Purpose of Pointer phrase is to specify the leftmost position within the receiving field where the first transferred character will be stored.
What Is 77 Level Used For?
It is an elementary level item which cannot be subdivided.