More COBOL Interview Questions

  • Which of the following is not a procedure division verb?

A)    Read
B)    InsertC)    Delete

D)    Start


  • Which of the following is false about the formal parameters in a subroutine?

A)    Every formal parameter must appear in the linkage section of the subroutineB)    Every formal parameter must appear in the using phrase of the procedure division header of the subroutine

C)    A formal parameter name can appear more than once in the using phrase of the procedure division header of the subroutine

D)    A formal parameter can be used as a data name in the procedure division statements of the subroutine

  • Perform and call accomplishes functions that are similar in nature but there are a few basic differences, which of the difference is incorrect ?

A)    Perform does not allow parameters whereas call does.B)    Perform refers to the same program whereas call refers to a separately compiled subprogramC)    Perform allows repeated invocations in the same statement whereas call invokes the subprogram only once

D)     Perform refers to only one paragraph whereas call refers to an entire subprogram consisting of any number of paragraphs


  • Indicate which of the following is false?

A)    The copy statement is executed during compile time rather than run time
B)    The replacing phrase in the copy statement cannot be used to omit a part or whole of a library textC)    The copy statement must be preceded by a space character and terminated by a periodD)    The library text to be copied by a copy statement must not include any copy statement

  • The COBOL program contains the following IF statement

      IF VAR1 NOT = ‘P’ OR ‘Q’ OR ‘R’         PERFORM PARA-ERROR

      As a result of this statement, PARA-ERROR will be executed

A)    If VAR1 has some value other than ‘P’, ‘Q’ and ‘R’B)    Always irrespective of the value of VAR1C)    Never, irrespective of the value of VAR1

D)    If VAR1 was defined as a condition-name with values  ‘P’, ‘Q’ or ‘R’

  • 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 writtenC)    Action depends on the computer system on which the program runs

D)    Compiler error results

  • The following statement is used in a COBOL program:

        PERFORM UPDATE-INPUT UNTIL DONE      Irrespective of the context in which it is given, it may be said thatA)    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.

  • 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 DISPLAY.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.


  • Consider the following WORKING-STORAGE section entries:

        01 WEEK-DAY-NAMES       PIC X(45)                VALUE ‘MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY’.        01 WEEK-DAYS REDEFINES WEEK-DAY-NAMES.           02  WEEK_DAY         PIC X(9)  OCCURS 5 TIMES.      Use of WEEK-DAY(4) in the PROCEDURE division will produce the      value:A)    ‘NESDAY TH’



D)    None of the above, syntax errors result

  • COBOL verb that is not directly related with an index name is


D)    SORT

  • References to the file names that appear in

A)    Environment and Data Divisions onlyB)    All four divisionsC)    Environment, Data and Procedure divisions only

D)    Data Division only

  • A COBOL program contains the WORKING-STORAGE SECTION declaration:

          01   VAR1     PIC X(3).      Which of the following Procedure Division statements may result in a compiler error?



(ALPHANUMERIC is not a class condition)

  • How many bytes of storage are required to hold INPUT-REC in the following declaration?

         01  INPUT-REC.             05  INPUT-GROUP  OCCURS  12 TIMES.                 10  INPUT-BATCH-A    PIC 9(5) OCCURS 5 TIMES.                 10  FILLER           PIC X(5).                 10  INPUT-BATCH-B    PIC 9(5)  OCCURS 5 TIMES.A)    900                       B)    600C)    605                       

D)    660

  • 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, 5B)    15, 5, 3, 0C)    3, 5, 3, 0

D)    15, 5, 0, 5

  • A COBOL program will give  a compile error at the following statement

           ADD 10 TO VAR-1      If …?A)    VAR-1 is not initialized to zero  B)    VAR-1 has a PIC 999V9.C)    VAR-1 is declared in the FILE SECTION and not theD)    WORKING-STORAGE SECTION.

E)    VAR-1 has a PIC ZZZ9.

  • 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 memoryC)    A Special level number 66 is used with RENAME clause

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


A)    True
B)    False