HCL Nrs - COBOL Quiz

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Anurodha
A
Anurodha
Community Contributor
Quizzes Created: 3 | Total Attempts: 3,740
Questions: 10 | Attempts: 1,613

SettingsSettingsSettings
HCL Nrs - COBOL Quiz - Quiz

This quiz is created for assesment after COBOL training


Questions and Answers
  • 1. 

    Name the divisions which is not in COBOL program.

    • A.

      IDENTIFICATION

    • B.

      ENVIRONMENT

    • C.

      FILE

    • D.

      DATA

    • E.

      WORKING

    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.

    Rate this question:

  • 2. 

    What level is used for RENAMES clause?

    • A.

      66

    • B.

      77

    • C.

      88

    • D.

      90

    • E.

      01

    Correct Answer
    B. 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?

    • A.

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

    • B.

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

    • C.

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

    • D.

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

    • E.

      None of the Above

    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.

    Rate this question:

  • 4. 

    Which mode of opening is required when REWRITE is used?

    • A.

      UPDATE

    • B.

      OPEN

    • C.

      I-O

    • D.

      INPUT

    • E.

      REWRITE

    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.

    Rate this question:

  • 5. 

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

    • A.

      RECORD NOT FOUND

    • B.

      AT END

    • C.

      DUPLICATE RECORD

    • D.

      END OF FILE

    • E.

      AT SPACES

    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.

    Rate this question:

  • 6. 

    What are the access mode requirements of START statement?

    • A.

      SEQUENTIAL

    • B.

      DYNAMIC

    • C.

      RELATIVE

    • D.

      INDEX

    • E.

      ALL OF THE ABOVE

    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.

    Rate this question:

  • 7. 

    What is comp-3 usage ?

    • A.

      Packed decimal

    • B.

      Binary usage

    • C.

      Hex

    • D.

      Single precision floating point

    • E.

      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?

    • A.

      WORKING-STORAGE

    • B.

      FILE SECTION

    • C.

      CONTROL SECTION

    • D.

      LINKAGE SECTION

    • E.

      NONE

    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.

    Rate this question:

  • 9. 

    Which level is used for condition clause?

    • A.

      77

    • B.

      01

    • C.

      05

    • D.

      88

    • E.

      Any level can be used

    Correct Answer
    D. 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?

    • A.

      STOP

    • B.

      END

    • C.

      STOP RUN

    • D.

      END RUN

    • E.

      None of the Above

    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.

    Rate this question:

Quiz Review Timeline +

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.