HOME JCL COBOL DB2 VSAM CICS


COBOL Interview Questions

31. A table has two indexes defined. Which one will be used by the SEARCH?
The index named first can be used by search.

32. When is a scope terminator mandatory?
Scope terminators are mandatory for in-line PERFORMS and EVALUATE statements. Make scope terminator as explicit for good coding standards.

33. Why is it necessary that file needs to be opened in I-O mode for REWRITE?
Before the REWRITE is performed, the record must be open and read from the file. Therefore, the file must be opened in I-O mode for rewrite functionality.

34. How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
The ONLY way is to look at the output of the linkage editor or the load module. If the module is being called DYNAMICALLY then it will not exist in the main module, if it is being called STATICALLY then it will be exist in the load module.

35. Which Search verb is equivalent to PERFORM...VARYING?
The serial SEARCH verb is equivalent to Perform.. Varying statement and it is nothing but search without ALL.

36. How many Sections are there in Data Division?
There are six sections in Data Division:File Section, Working Storage Section, Local Storage Section, Screen Section, Report Section and Linkage Section

37. What is the difference between comp and comp-3 usage?
Comp is for binary usage, while comp-3 indicates packed decimal.

38. What does Exit do?
If EXIT is used, it won’t be more than only sentence within a paragraph.

39. Give some examples of command terminators?
End IF and End Evaluate are the examples of command terminators.

40. What is the difference between Call and a Link?
A call is an actual COBOL command which provokes an external program and returns. Link is same as Call but it does not belong to a COBOL verb.

1 2 3 4 5
Copyright 2020 by ibmmainframer. All Rights Reserved.