COBOL is a high-level programming language first developed by the CODASYL Committee (Conference on Data Systems Languages) in 1960. The word COBOL is an acronym that stands for COmmon Business Oriented Language. As the the expanded acronym indicates, COBOL is designed for developing business, typically file-oriented, applications. It is not designed for writing systems programs. For instance you would not develop an operating system or a compiler using COBOL.The COBOL 2002 standard includes support for object-oriented programming and other modern language features.
COBOL Interviews are getting tough these days as the technology grows faster. To get through the COBOL interview one needs to update him/herself in a regular manner. Having said that, just before the interview, it is very important to have a quick glance of the reputed COBOL questions and answers to make yourself comfortable during the interview process. This is where DoAnswers.com helps you in renewing yourself on COBOL and various other technologies interview preparation.
41. Name the divisions in a COBOL program ?.
IDENTIFICATION DIVISION ENVIRONMENT DIVISION DATA DIVISION PROCEDURE DIVISION
42. Read the following code. 01 ws-n pic 9(2) value zero. a-para move 5 to ws-n. perform b-para ws-n times. b-para. move 10 to ws-n. how many times will b-para be executed ?
5 times only. it will not take the value 10 that is initialized in the loop.
43. The maximum number of dimensions that an array can have in COBOL-85 is ----------- ?
SEVEN in COBOL - 85 and THREE in COBOL - 84
44. What are different file OPEN modes available in COBOL?
Open for INPUT, OUTPUT, I-O, EXTEND.
45. What are some examples of command terminators?
END-IF, END-EVALUATE
46. What are the differences between COBOL and COBOL II?
There are at least five differences: COBOL II supports structured programming by using in line Performs and explicit scope terminators, It introduces new features (EVALUATE, SET. TO TRUE, CALL. BY CONTEXT, etc) It permits programs to be loaded and addressed above the 16-megabyte line It does not support many old features (READY TRACE, REPORT-WRITER,ISAM, Etc.), and It offers enhanced CICS support.
47. What are the differences between OS VS COBOL and VS COBOL II?
OS/VS 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.Report writer is supported only in OS/VS Cobol.USAGE IS POINTER is supported only in VS COBOL II.Reference modification e.g.: WS-VAR(1:2) is supported only in VS COBOL II.EVALUATE is supported only in VS COBOL II.Scope terminators are supported only in VS COBOL II.OS/VS Cobol follows ANSI 74 stds while VS COBOL II follows ANSI 85 stds.Under CICS Calls between VS COBOL II programs are supported.
48. What are the different data types available in COBOL?
Alpha-numeric (X), alphabetic (A) and numeric (9).
49. What are the different forms of EVALUATE statement?
EVALUATE EVALUATE SQLCODE ALSO FILE-STATUS WHEN A=B AND C=D WHEN 100 ALSO '00' imperative stmt imperative stmt WHEN (D+X)/Y = 4 WHEN -305 ALSO '32' imperative stmt imperative stmt WHEN OTHER WHEN OTHER imperative stmt imperative stmt END-EVALUATE END-EVALUATE EVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUE WHEN 100 ALSO TRUE WHEN 100 ALSO A=B imperative stmt imperative stmt WHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4) imperative stmt imperative stmt END-EVALUATE END-EVALUATE EVALUATE EVALUATE SQLCODE ALSO FILE-STATUS WHEN A=B AND C=D WHEN 100 ALSO '00' imperative stmt imperative stmt WHEN (D+X)/Y = 4 WHEN -305 ALSO '32' imperative stmt imperative stmt WHEN OTHER WHEN OTHER imperative stmt imperative stmt END-EVALUATE END-EVALUATE EVALUATE SQLCODE ALSO A=B EVALUATE SQLCODE ALSO TRUE WHEN 100 ALSO TRUE WHEN 100 ALSO A=B imperative stmt imperative stmt WHEN -305 ALSO FALSE WHEN -305 ALSO (A/C=4) imperative stmt imperative stmt END-EVALUATE END-EVALUATE
50. What are the steps you go through while creating a COBOL program executable?
DB2 precompiler (if embedded SQL used), CICS translator (if CICS pgm), Cobol compiler, Link editor. If DB2 program, create plan by binding the DBRMs.