HCL Nrs - COBOL Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Anurodha
A
Anurodha
Community Contributor
Quizzes Created: 3 | Total Attempts: 3,759
| Attempts: 1,615
SettingsSettings
Please wait...

    1/10 Questions
  • Name the divisions which is not in COBOL program.

    • IDENTIFICATION
    • ENVIRONMENT
    • FILE
    • DATA
    • WORKING
Please wait...
About This Quiz

This COBOL quiz by HCL NRS tests knowledge on program divisions, RENAMES clause, tables, REWRITE usage, and file handling.

HCL Nrs - COBOL Quiz - Quiz

Questions and Answers
  • 2. 

    What level is used for RENAMES clause?

    • 66

    • 77

    • 88

    • 90

    • 01

    Correct Answer
    A. 77
    Explanation
    The level used for the RENAMES clause is 77.

    Rate this question:

  • 3. 

    How do you define a table/array in COBOL using INDEX?

    • 01 ARRAYS. 05 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

    • 01 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

    • 01 ARRAYS. 05 ARRAY1 PIC X(9) OCCURS INDEX BY 10 TIMES

    • 01 ARRAYS. 88 ARRAY2 PIC X(6) OCCURS 20 TIMES INDEXED BY WS-INDEX

    • None of the Above

    Correct Answer
    A. 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.

    Rate this question:

  • 4. 

    Which mode of opening is required when REWRITE is used?

    • UPDATE

    • OPEN

    • I-O

    • INPUT

    • REWRITE

    Correct Answer
    A. 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.

    Rate this question:

  • 5. 

    Which clause can be used instead of checking for FILE STATUS = 10?

    • RECORD NOT FOUND

    • AT END

    • DUPLICATE RECORD

    • END OF FILE

    • AT SPACES

    Correct Answer
    A. 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.

    Rate this question:

  • 6. 

    What are the access mode requirements of START statement?

    • SEQUENTIAL

    • DYNAMIC

    • RELATIVE

    • INDEX

    • ALL OF THE ABOVE

    Correct Answer
    A. 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.

    Rate this question:

  • 7. 

    What is comp-3 usage ?

    • Packed decimal

    • Binary usage

    • Hex

    • Single precision floating point

    • None

    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.

    Rate this question:

  • 8. 

    In which section do sort description  is given?

    • WORKING-STORAGE

    • FILE SECTION

    • CONTROL SECTION

    • LINKAGE SECTION

    • NONE

    Correct Answer
    A. 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.

    Rate this question:

  • 9. 

    Which level is used for condition clause?

    • 77

    • 01

    • 05

    • 88

    • Any level can be used

    Correct Answer
    A. 88
    Explanation
    The level 88 is used for the condition clause in COBOL.

    Rate this question:

  • 10. 

    Which statement is used to end the COBOL program?

    • STOP

    • END

    • STOP RUN

    • END RUN

    • None of the Above

    Correct Answer
    A. 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.

    Rate this question:

Quiz Review Timeline (Updated): Mar 21, 2023 +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 21, 2023
    Quiz Edited by
    ProProfs Editorial Team
  • Jun 09, 2009
    Quiz Created by
    Anurodha
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.