Cobol

  Home  Computer Programming  Cobol


“Cobol Interview Questions and Answers will guide us now that COBOL is one of the oldest programming languages in computer history. COBOL name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments. Learn COBOL programming basic and advance concepts or get preparation of COBOL based jobs interview by our this Cobol Interview Questions and Answers Guide.”



110 Cobol Questions And Answers

101⟩ What are the differences between OS VS COBOL and VS COBOL II?

OSVS Cobol pgms can only run in 24-bit addressing mode, VS COBOL II pgms can run either in 24 bit or 31-bit addressing modes.

* I) Report writer is supported only in OSVS Cobol.

* II) USAGE IS POINTER is supported only in VS COBOL II.

* III) Reference modification e.g. WS-VAR(12) is supported only in VS COBOL II.

* IV) EVALUATE is supported only in VS COBOL II.

* V) Scope terminators are supported only in VS COBOL II.

* VI) OSVS Cobol follows ANSI 74 stds while VS COBOL II follows ANSI 85 stds.

* VII) Under CICS Calls between VS COBOL II programs are supported

 129 views

102⟩ What is SSRANGE, NOSSRANGE?

These are compiler options with respect to 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.

 148 views

103⟩ What is Static and Dynamic linking?

In static linking, the called subroutine is link-edited into the calling program, while in dynamic linking, the subroutine & the main program will exist as separate load modules. You choose static dynamic linking by choosing either the DYNAM or NODYNAM link edit option. (Even if you choose NODYNAM, a CALL identifier (as opposed to a CALL literal), will translate to a DYNAMIC call).A statically called subroutine will not be in its initial state the next time it is called unless you explicitly use INITIAL or you do a CANCEL. A dynamically called routine will always be in its initial state.

 138 views

105⟩ What is AMODE(24), AMODE(31), RMODE(24) and RMODE(ANY) (applicable to only MVSESA Enterprise Server) ?

These are compile link edit options. AMODE stands for Addressing mode and RMODE for Residency mode.

AMODE(24) - 24 bit addressing;

AMODE(31) - 31 bit addressing

AMODE(ANY) - Either 24 bit or 31 bit addressing depending on RMODE.

RMODE(24) - Resides in virtual storage below 16 Meg line. Use this for 31-bit programs that call 24-bit programs. (OSVS Cobol pgms use 24-bit addresses only).

RMODE(ANY) - Can reside above or below 16 Meg line.

 167 views

108⟩ When would you use in-line perform?

When the body of the perform will not be used in other paragraphs. If the body of the perform 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.

 134 views

109⟩ What the difference is between CONTINUE and NEXT SENTENCE ?

They appear to be similar, that is, the control goes to the next sentence in the paragraph. But, Next Sentence would

take the control to the sentence after it finds a full stop (.). Check out by writing the following code example, one if

sentence followed by 3 display statements (sorry they appear one line here because of formatting restrictions) If 1 0

then next sentence end if display ‘line 1' display ‘line 2'. display ‘line 3'. Note- there is a dot (.) only at the end of the line.

 133 views

110⟩ 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.

 139 views