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.
31. How many sections are there in data division?.
SIX SECTIONS 1.FILE SECTION 2.WORKING-STORAGE SECTION 3.LOCAL-STORAGE SECTION 4.SCREEN SECTION 5.REPORT SECTION 6.LINKAGE SECTION
32. How may divisions are there in JCL-COBOL?
SIX
33. How to execute a set of JCL statements from a COBOL program
Using EXEC CICS SPOOL WRITE(var-name) END-EXEC command. var-name is a COBOL host structure containing JCL statements.
34. If you were passing a table via linkage, which is preferable - a subscript or an index?
Wake up - you haven't been paying attention! It's not possible to pass an index via linkage. The index is not part of the calling programs working storage. Those of us who've made this mistake, appreciate the lesson more than others.
35. In a COBOL II PERFORM statement, when is the conditional tested, before or after the perform execution?
In COBOL II the optional clause WITH TEST BEFORE or WITH TEST AFTER can be added to all perform statements. By default the test is performed before the perform.
36. In an EVALUATE statement, can I give a complex condition on a when clause?
Yes.
37. In an EVALUTE statement is the order of the WHEN clauses significant?
Absolutely. Evaluation of the WHEN clauses proceeds from top to bottom and their sequence can determine results.
38. In the JCL, how do you define the files referred to in a subroutine ?
Supply the DD cards just as you would for files referred to in the main program.
39. Make sure that link option is AMODE=31 and RMODE=ANY. Compile option should never have SIZE(MAX). BUFSIZE can be 2K, efficient enough.
Use a file //dd1 DD sysout=(*, intrdr)write your JCL to this file. Pl some on try this out.
40. My program has an array defined to have 10 items. Due to a bug, I find that even if the program access the 11th item in this array, the program does not abend. What is wrong with it?
Must use compiler option SSRANGE if you want array bounds checking. Default is NOSSRANGE.