InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What are the object oriented features provided in COBOL? |
|
Answer» Object-Oriented COBOL provides the following features:
|
|
| 2. |
What do you understand by static and dynamic linking? |
|
Answer» STATIC and dynamic LINKING are two types of linking available in COBOL. Static linking refers to the linking of subroutine into calling program and not existing as a separate module. In dynamic linking, the subroutine exists as a separate program and does not LINK to the main program. The static linking can be done by USING the NODYNAM link option and the dynamic linking can be done by using the DYNAM option. |
|
| 3. |
Differentiate between OS/VS COBOL and VS COBOL II. |
||||||||||||||||||
Answer»
|
|||||||||||||||||||
| 4. |
What is the importance of INITIALIZE verb? |
|
Answer» INITIALIZE verb is USED for initializing VALUES in data ITEMS to their default value. NUMERIC items will be set to 0, alphabetic and alphanumeric items will be set to spaces. Items like FILLERS, OCCURS DEPENDING ON are to be left untouched during the initialization. |
|
| 5. |
How is CALL command different from LINK? |
|
Answer» CALL command is an actual command that initiates an external program and returns. The LINK command is also SIMILAR to CALL but it does not belong to COBOL VERB vocabulary. The LINK command runs like a separate run unit whereas CALL is EXECUTED as a single run unit. |
|
| 6. |
How do we find current date from the system within a century? |
|
Answer» We can FIND it out by using the INTRINSIC function called FUNCTION CURRENT-DATE. We can also MAKE use of the DATE function for accepting the current date. It has to be NOTED that the current date cannot be accepted if we are using CICS COBOL programs. |
|
| 7. |
Why should we not define OCCURS clause at 01 level? |
|
Answer» 01 LEVEL is the level of record. We can repeat the FIELDS WITHIN a record but we cannot repeat the record itself. The OCCURS clause INDICATES the REPETITION of the definition of data names. This is why we cannot use the OCCURS clause at the 01 level. |
|
| 8. |
Why is LINKAGE SECTION needed? |
|
Answer» It is used for PASSING data from one PROGRAM to ANOTHER. It can also be used for passing data from a PROCEDURE to another program. It maps data in the calling program’s working storage. |
|
| 9. |
What happens during INPUT PROCEDURE and OUTPUT PROCEDURE? |
|
Answer» In INPUT PROCEDURE, the input file will be opened, the records from the file are READ and can ALSO be edited. The records will then be released to sorting OPERATION and then the file will be CLOSED. Whereas in OUTPUT PROCEDURE, the output file will be opened, the records post sorting will be written in the output file and then the file will be closed. |
|
| 10. |
How is PERFORM … WITH TEST AFTER different from PERFORM … WITH TEST BEFORE? |
|
Answer» PERFORM ... WITH TEST BEFORE indicates that the condition must be TESTED at the BEGINNING of EVERY execution of the specified PERFORM range. WHEREAS TEST AFTER is used for TESTING the condition after every execution. |
|
| 11. |
How is SSRANGE different from NOSSRANGE? |
|
Answer» Both are options USED by the compiler for finding subscript outside of range. |
|
| 12. |
What is the importance of using REPLACING option in a COPY statement? |
|
Answer» REPLACING OPTION is USED for allowing the same COPY to be used multiple times by changing the replace value in the same code. |
|
| 13. |
What is IS NUMERIC clause? |
|
Answer» This clause is USED for checking if an item is a numeric value or not. If it is numeric - positive or NEGATIVE, TRUE will be returned. For EXAMPLE: CHECK-NUMBER SECTION. DISPLAY 'Check if input is numeric ' INPUT-NUM IF INPUT-NUM IS NUMERIC DISPLAY 'input is numeric' ELSE DISPLAY 'input is non numeric' |
|
| 14. |
How is the NEXT SENTENCE statement different from CONTINUE statement? |
|
Answer» The CONTINUE statement is like a null statement that indicates no operation and the control needs to be passed to the next executable instruction after explicit scope terminator. It can be USED anywhere in conditional STATEMENTS or imperative statements are used. Example syntax for CONTINUE in case of IF construct is: IF condition-1 THEN {statement-1 ... | CONTINUE}[ELSE {statement-2 ... | CONTINUE}][END-IF]The NEXT SENTENCE statement does the task of simply TRANSFERRING the control to an implicit CONTINUE statement that is present IMMEDIATELY after the next separator period. If the statement is specified along with the END-IF statement then the control passes to the statement after the closest following period. It is mainly used to TRANSFER control to the next sentence. IF condition-1 THEN {statement-1 ... | NEXT SENTENCE} |
|
| 15. |
What are the available data types in the COBOL language? |
|
Answer» There are mainly three DATA types SUPPORTED by COBOL, they are: |
|
| 16. |
What is COBOL? |
|
Answer» COBOL stands for Common Business Oriented Language and is one of the oldest high-level programming languages used for solving COMPLEX business problems in different domains like business verticals, finance, security and administrative purposes. Following are the features of this programming language:
|
|