COBOL-JCL Quiz

29 Questions | Total Attempts: 1168

SettingsSettingsSettings
Please wait...
JCL Quizzes & Trivia

Batch T77 Cobol-JCL Quiz.


Questions and Answers
  • 1. 
    The following statement WRITE OUT-REC. Which one of the following modes of operating the Sequential file is not true?
    • A. 

      OPEN INPUT

    • B. 

      OPEN INPUT-OUTPUT

    • C. 

      OPEN EXTEND

    • D. 

      OPEN OUTPUT

  • 2. 
     The UNSTRING verb is used to transfer data from several sources to one receiving field.
    • A. 

      YES

    • B. 

      NO

  • 3. 
    Indicate which of the following is true about the 88 level entry.
    • A. 

      it is used for individual data item in working-storage section.

    • B. 

      It is used for items with rename clause.

    • C. 

      It is used for a data item which redefines another data item.

    • D. 

      It is used for a condition name which can have either a true or false.

  • 4. 
     IF NOT AGE LESS THAN 30 AND 40 GO TO PARA-AGE-MIDDLES. The controls will go to the paragraph named PARA-AGE-MIDDLE.
    • A. 

      If AGE is greater than or equal to 40.

    • B. 

      If AGE is greater than or equal to 30.

    • C. 

      If AGE is greater than or equal to 30 but less than 40.

    • D. 

      If AGE is less than or equal to 30.

  • 5. 
     IF A = 1 OR 2 OR 3 NEXT SENTENCE ELSE MOVE A TO B.
    • A. 

      IF A NOT = 1 OR 2 OR 3 MOVE A TO B.

    • B. 

      IF NOT A = 1 AND 2 AND 3 MOVE A TO B.

    • C. 

      IF A NOT = 1 AND 2 AND 3 MOVE A TO B.

    • D. 

      IF A NOT = 1 OR A NOT = 2 OR A NOT = 3 MOVE A TO B.

  • 6. 
     Determine the total number of bytes in the following. 01 REC-1. 02 FIRST-GROUP.      03 A1 PIC X(4).      03 A2 PIC 99. 02 B1 REDEFINES FIRST-GROUP.      03 A3 PIC 999.      03 A4 PIC 999. 02 THIRD-GROUP.     03 A5 OCCURS 5 TIMES PIC 99.
    • A. 

      22

    • B. 

      16

    • C. 

      12

    • D. 

      14

  • 7. 
     The association between a filename and corresponding file medium is done in
    • A. 

      Date-compiled paragraph, identification division

    • B. 

      Object-computer paragraph, configuration section and environment division

    • C. 

      File-control paragraph, I-O Section and environment division

    • D. 

      I-O control paragraph, I-O Section and environment division.

  • 8. 
    Indicate which one of the following is incorrect
    • A. 

      SUBTRACT A FROM B GIVING D E F.

    • B. 

      SUBTARCT A FROM D, B FROM E, C FROM F.

    • C. 

      SUBTARCT A B C FROM D E GIVING F G.

    • D. 

      SUBTRACT A B C FROM D E F.

  • 9. 
    Which of the following statement is incorrect.
    • A. 

      Subscripting enables us to write a more compact code in the procedure division.

    • B. 

      Subscripting enables us to refer to any element of a table by the same data name with the facility of identifying the particular element through the values of subscript.

    • C. 

      Subscripting reduces the number of entries to be included in the data division.

    • D. 

      Subscripting enables us to use loops in the procedure division.

  • 10. 
    The following is Data Division entry 01 EMP-RECORD. 02 EMP-NAME. 04 FIRST-PART. 05 FIRST-NAME PIC X (10). 05 MIDDLE-NAME PIC X (10). 04 SURNAME PIC X(20).
    • A. 

      It is correct.

    • B. 

      It is not correct because first-name and middle name contain the same PIC Clauses

    • C. 

      Not correct because the PIC Clause is missing for the first three data items.

    • D. 

      Not correct because the level number 03 is missing

  • 11. 
    Determine the size of the data item -9(4). 99
    • A. 

      6

    • B. 

      7

    • C. 

      8

    • D. 

      4

  • 12. 
    To describe a record the level numbers may be chosen from
    • A. 

      01 to 77

    • B. 

      01 to 49 and 77

    • C. 

      All odd numbers from 01 to 49

    • D. 

      01 to 49

    • E. 

      All of Above

  • 13. 
    The following is a Procedure division statement READ IN-FILE INTO IN-REC AT END CLOSE IN-FILE STOP RUN. Where IN-REC is the record-name of IN-FILE. Which one of the following is Correct?
    • A. 

      The AT END path is followed if any record becomes shorter than the record Definition.

    • B. 

      The statement is correct since IN-REC is the record name of the IN-FILE

    • C. 

      The statement is incorrect since AT END should be followed by GO TO statement

    • D. 

      The AT END path is taken if all the records have been read and the current read encounters the end of file.

  • 14. 
    The Cobol compiler at the time of compilation indicates the error in the following Statement MULTIPLY 0.1 BY A. Which of the following had given the correct clause?
    • A. 

      A has the PICTURE CLAUSE 9(4) V99.

    • B. 

      A has the PIC CLAUSE ZZZ9.9

    • C. 

      The Giving Option is missing

    • D. 

      A is declared in the file section and not in the working storage section

  • 15. 
    In DATA DIVISION the entries are 01 BILL. 02 A PIC 99. 02 FILLER PIC X(7). Indicate which one of the following statement in the Procedure division is correct
    • A. 

      MOVE ‘AB’ TO A.

    • B. 

      MOVE SPACES TO A.

    • C. 

      MOVE ZEROS TO A.

    • D. 

      MOVE SPACE TO FILLER.

  • 16. 
    The picture of RAFFLES IS 02 RAFFLES PIC 999V99 What will be the content of raffles when the following data is named to it? 7892^23
    • A. 

      78922

    • B. 

      89223

    • C. 

      78900

    • D. 

      89223

  • 17. 
    How many number of bytes involved in S9(11) COMP3?
    • A. 

      6 bytes

    • B. 

      10 bytes

    • C. 

      12 bytes

    • D. 

      5 bytes

  • 18. 
    Four data-names VAR-1, VAR-2, VAR-3 and VAR-4 are defined as following         Data-name           PIC clause    Value Initialized to         VAR-1               999            015         VAR-2               999            005         VAR-3               999            000         VAR-4               999            000       On executing the PROCEDURE DIVISION statement         DIVIDE VAR-1 INTO VAR-2 GIVING VAR-3                REMAINDER VAR-4       these data-names will respectively assume values:
    • A. 

      15, 0, 0, 5

    • B. 

      15, 5, 3, 0

    • C. 

      3, 5, 3, 0

    • D. 

      15, 5, 0, 5

  • 19. 
    Which one out of the following is incorrect?
    • A. 

      RENAME is used to regroup elementary items in a group.

    • B. 

      Renamed elementary items must be contiguous memory

    • C. 

      A Special level number 66 is used with RENAME clause

    • D. 

      RENAME clause can regroup a 01, 77, 88 or 66 entry.

  • 20. 
    EDITED PICTURE ITEMS can not  HAVE VALUE CLAUSE.
    • A. 

      True

    • B. 

      FALSE

    • C. 

      None of above

  • 21. 
    PERFORM UPDATE-INPUT UNTIL DONE       Irrespective of the context in which it is given, it may be said that
    • A. 

      DONE is a data-name whose value gets defined in an exception handling section

    • B. 

      DONE is a condition-name

    • C. 

      DONE is a data-name whose value gets decremented at each exit of the paragraph

    • D. 

      DONE is a data-name whose value gets decremented at each entry of the paragraph.

  • 22. 
    Consider the following PROCEDRE DIVISION statement:         IF VAR1 LESS THAN VAR2 WRITE REC-1         ELSE WRITE REC-2       If, before executing this statement, VAR1 contains alphanumeric       Literal 'l' and VAR2 contains alphanumeric literal 'A', then
    • A. 

      REC-1 is always written

    • B. 

      REC-2 is always written

    • C. 

      Action depends on the computer system on which the program runs

    • D. 

      Compiler error results

  • 23. 
    The record description of EMPLOYEE-RECORD is given in four different ways below.  The only correct choice is:  A) 01 EMPLOYEE-RECORD. 10  EMP-CODE   PIC X(6). 10  EMP-NAME   PIC X(25). 10  FILLER     PIC X(60). B) 01 EMPLOYEE-RECORD    PIC X(91) USAGE COMP. 10  EMP-CODE       PIC X(6). 10  EMP-NAME       PIC X(25). 10  FILLER          PIC X(60). C) 01 EMPLOYEE-RECORD. 05  EMP-CODE       PIC X(6). 10  EMP-NAME       PIC X(25). 15  FILLER          PIC X(60). D) 01 EMPLOYEE-RECORD    PIC X(91). 10  EMP-CODE       PIC X(6). 10  EMP-NAME       PIC X(25). 10  FILLER.
    • A. 

      B

    • B. 

      A

    • C. 

      C

    • D. 

      D

  • 24. 
     In order to continue a job after a return code of 12 in step1, what the step2 EXEC statement include?
    • A. 

      COND = (12,LE)

    • B. 

      COND = (12,NE)

    • C. 

      COND = (12,GE)

    • D. 

      COND = (12,EQ)

  • 25. 
     How can values be passed from the job stream to an executable program?
    • A. 

      Through the PARM keyword

    • B. 

      Through the VALUE parameter

    • C. 

      Through the PGM parameter

    • D. 

      All of the above

Back to Top Back to top