1.
Name the divisions which is not in COBOL program.
Correct Answer
E. WORKING
Explanation
The division that is not present in a COBOL program is the WORKING division. COBOL programs consist of four divisions: IDENTIFICATION, ENVIRONMENT, DATA, and PROCEDURE. The IDENTIFICATION division contains information about the program, such as its name and author. The ENVIRONMENT division defines the input-output devices and files used by the program. The DATA division defines the data structures used in the program. Finally, the PROCEDURE division contains the actual instructions and logic of the program. The WORKING division is not a standard division in COBOL programs.
2.
What level is used for RENAMES clause?
Correct Answer
B. 77
Explanation
The level used for the RENAMES clause is 77.
3.
How do you define a table/array in COBOL using INDEX?
Correct Answer
B. 01 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX
Explanation
The correct answer is 01 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX. This is the correct way to define a table or array in COBOL using an index. The "OCCURS" keyword is used to specify the number of occurrences or elements in the array, and the "INDEXED BY" clause is used to define the index that will be used to access the elements of the array. In this case, the index is named WS-INDEX.
4.
Which mode of opening is required when REWRITE is used?
Correct Answer
C. I-O
Explanation
When the REWRITE statement is used, the file should be opened in I-O (Input-Output) mode. This mode allows both reading and writing operations on the file. The REWRITE statement is used to modify the contents of an existing record in a file, so the file needs to be opened in a mode that allows both reading and writing.
5.
Which clause can be used instead of checking for FILE STATUS = 10?
Correct Answer
B. AT END
Explanation
The clause "AT END" can be used instead of checking for FILE STATUS = 10. This clause is used to check if the end of the file has been reached while reading a file. If the end of the file is reached, the program can perform certain actions or terminate accordingly.
6.
What are the access mode requirements of START statement?
Correct Answer
B. DYNAMIC
Explanation
The access mode requirements of the START statement include SEQUENTIAL, DYNAMIC, RELATIVE, and INDEX. The DYNAMIC access mode allows for the random access of records in a file, while the SEQUENTIAL access mode allows for the sequential retrieval of records. The RELATIVE access mode allows for the retrieval of records based on their relative position in the file, and the INDEX access mode allows for the retrieval of records based on an index value. Therefore, the correct answer is DYNAMIC as it encompasses all of the mentioned access mode requirements.
7.
What is comp-3 usage ?
Correct Answer
A. Packed decimal
Explanation
Comp-3 usage refers to the packed decimal format, which is a way of representing decimal numbers in a compact manner in computer systems. In this format, each digit is stored in a 4-bit binary nibble, with the last nibble used for sign representation. Packed decimal is commonly used in mainframe systems and COBOL programming language. It allows for efficient storage and arithmetic operations on decimal numbers, making it suitable for financial calculations and data processing applications.
8.
In which section do sort description is given?
Correct Answer
B. FILE SECTION
Explanation
The sort description is given in the FILE SECTION. This section is used to define the files that will be used in the program. It includes the organization, access mode, record length, and other attributes of the files. The sort description is necessary for sorting and manipulating data stored in files.
9.
Which level is used for condition clause?
Correct Answer
D. 88
Explanation
The level 88 is used for the condition clause in COBOL.
10.
Which statement is used to end the COBOL program?
Correct Answer
C. STOP RUN
Explanation
The correct answer is "STOP RUN." In COBOL, the "STOP RUN" statement is used to end the program execution. It is typically placed at the end of the program to indicate that the program has completed its execution and should terminate. The "STOP RUN" statement ensures that any remaining tasks or processes are completed before the program terminates.