106) What is Redefines clause?
A) Redefines clause is used to allow the same storage allocation to be referenced by different data names .
107) How many bytes does a s9(4)comp-3 field occupy?
A) 3Bytes (formula : n/2 + 1))
108) What is the different between index and subscript?
A) Subscript refers to the array of occurrence , where as Index represents an occurrence of a table element. An index can only modified using perform, search & set. Need to have an index for a table in order to use SEARCH and SEARCH All.
109) What is the difference between Structured COBOL Programming and Object Oriented COBOL Programming?
A) Structured programming is a Logical way of programming, you divide the functionalities into modules and code logically. OOP is a Natural way of programming; you identify the objects first, and then write functions, procedures around the objects. Sorry, this may not be an adequate answer, but they are two different programming paradigms, which is difficult to put in a sentence or two.
110) What divisions, sections and paragraphs are mandatory for a COBOL program?
A) IDENTIFICATION DIVISION and PROGRAM-ID paragraph are mandatory for a compilation error free COBOL program.
111) Can JUSTIFIED be used for all the data types?
A) No, it can be used only with alphabetic and alphanumeric data types.
112) What happens when we move a comp-3 field to an edited (say z (9). ZZ-)
A) the editing characters r to be used with data items with usage clause as display which is the default. When u tries displaying a data item with usage as computational it does not give the desired display format because the data item is stored as packed decimal. So if u want this particular data item to be edited u have to move it into a data item whose usage is display and then have that particular data item edited in the format desired.
113) What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a program which is not calling any other program ?
A) Both give the same results when a program is not calling any other program. GO BACK will give the control to the system even though it is a single program.
114) what is the difference between external and global variables?
A) Global variables are accessible only to the batch program whereas external variables can be referenced from any batch program residing in the same system library.
115) You are writing report program with 4 levels of totals: city, state, region and country. The codes being used can be the same over the different levels, meaning a city code of 01 can be in any number of states, and the same applies to state and region code so how do you do your checking for breaks and how do you do add to each level?
A) Always compare on the highest-level first, because if you have a break at a highest level, each level beneath it must also break. Add to the lowest level for each record but add to the higher level only on a break.
116) What is difference between COBOL and VS COBOL II?.
A) In using COBOL on PC we have only flat files and the programs can access only limited storage, whereas in VS COBOL II on M/F the programs can access up to 16MB or 2GB depending on the addressing and can use VSAM files to make I/O operations faster.
117) Why occurs can not be used in 01 level ?
A) Because, Occurs clause is there to repeat fields with same format, not the records.
118) What is report-item?
A) A Report-Item Is A Field To Be Printed That Contains Edit Symbols
119) Difference between next and continue clause
A) The difference between the next and continue verb is that in the continue verb it is used for a situation where there in no EOF condition that is the records are to be accessed again and again in an file, whereas in the next verb the indexed file is accessed sequentially, read next record command is used.
120) What is the Importance of GLOBAL clause According to new standards of COBOL
A) When any data name, file-name, Record-name, condition name or Index defined in an Including Program can be referenced by a directly or indirectly in an included program, Provided the said name has been declared to be a global name by GLOBAL Format of Global Clause is01 data-1 pic 9(5) IS GLOBAL.