COBOL Questions et reponses d'entretien
Question 11. Explain the difference between static and dynamic calls in COBOL.
Static calls are resolved at compile-time, while dynamic calls are resolved at run-time. CALL and PERFORM are examples of static calls, while CALL 'subprogram' USING ... is a dynamic call.
Question 12. How does COBOL handle decimal arithmetic?
COBOL provides the COMPUTE statement for decimal arithmetic. It allows the programmer to perform arithmetic operations on numeric data items with explicit precision.
Example:
COMPUTE TOTAL = AMOUNT-1 + AMOUNT-2.
Question 13. What is the purpose of the LEVEL number in COBOL?
The LEVEL number in COBOL is used to indicate the hierarchy and nesting level of data items. It determines the structure and organization of data in the Data Division.
Example:
01 EMPLOYEE-RECORD.
05 EMPLOYEE-ID PIC 9(5).
05 EMPLOYEE-NAME PIC X(20).
Question 14. Explain the concept of 88 level in COBOL.
The 88 level in COBOL is used for condition names. It allows the programmer to associate a condition with a data item, simplifying the writing of conditionals.
Example:
01 STATUS-CODE PIC 99.
88 SUCCESS VALUE 00.
88 FAILURE VALUE 01.
Question 15. How is data movement done in COBOL?
Data movement in COBOL is achieved through the MOVE verb. It transfers the value of one data item to another, and it can handle various data types.
Example:
MOVE 100 TO AMOUNT.
Les plus utiles selon les utilisateurs :
- What is COBOL?
- Explain the Division structure in COBOL.
- What is the purpose of the LEVEL number in COBOL?