# COBOL INTERVIEW QUESTIONS WITH ANSWERS

Following is a list of COBOL interview questions with answers for mainframe professionals looking for a Job change. These are job interview questions for mainframe professionals with COBOL skills. These frequently asked interview questions for COBOL will help you brush up on your basic COBOL skills

The answers to the interview questions are also provided below. There are more sample interview questions on this website.

• What is the result of the following?

MOVE 1 TO VAR1MOVE 2 TO VAR2EVALUATE TRUEWHEN VAR1=1Â Â Â Â  PERFORM PARA-1WHEN VAR2=2Â Â Â Â  PERFORM PARA-2WHEN OTHERÂ Â Â Â  NEXT SENTENCEEND-EVALUATE.A)Â Â  Â PARA-1 will be performedB)Â Â  Â PARA-2 will be performedC)Â Â  Â Both PARA-1 and PARA-2 will be performed.

D)Â Â  Â Compile error for incorrect use of NEXT sentence

• Which of the following is an INCORRECT specification for a data-name?

A)Â Â  Â var-var1Â Â Â Â Â Â Â Â Â Â Â Â  Â B)Â Â  Â data1Â Â Â  Â C)Â Â  Â two

D)Â Â  Â all

(ALL is a reserved word)

• What is the result of the following?

MOVE 1 TO VAR1MOVE 2 TO VAR2EVALUATE TRUEWHEN VAR1=1Â Â Â Â  PERFORM PARA-1WHEN VAR2=2Â Â Â Â  PERFORM PARA-2WHEN OTHERÂ Â Â Â  DISPLAY VAR1END-EVALUATE.

A)Â Â  Â PARA-1 will be performed

B)Â Â  Â PARA-2 will be performedC)Â Â  Â Both PARA-1 and PARA-2 will be performed.

D)Â Â  Â Compile error for incorrect use of NEXT sentence

• Which of the following PIC clause is invalid as a floating symbol?
• What is the result of the following?

MOVE 0 TO VAR1Â EVALUATE TRUEWHEN VAR1=1Â Â Â Â  PERFORM PARA-1WHEN VAR1=2Â Â Â Â  PERFORM PARA-2WHEN OTHERÂ Â Â Â  PERFORM PARA-3END-EVALUATE.Â A)Â Â  Â PARA-1 will be performedB)Â Â  Â PARA-2 will be performedC)Â Â  Â Both PARA-1 and PARA-2 will be performed.

D)Â Â  Â PARA-3 will be performed

• Which of the following is an invalid paragraph name?

A)Â Â  Â A-1Â Â Â  Â B)Â Â  Â 999

C)Â Â  Â A+1Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  Â

D)Â Â  Â ZZ9

• What is the result of the following?

MOVE 0 TO VAR1Â EVALUATE TRUEWHEN VAR1=1Â Â Â Â  PERFORM PARA-1WHEN VAR1=2Â Â Â Â  PERFORM PARA-2Â END-EVALUATE.Â A)Â Â  Â PARA-1 will be performedB)Â Â  Â PARA-2 will be performedC)Â Â  Â Both PARA-1 and PARA-2 will be performed.

D)Â Â  Â None of the above

• Which of the following is correct definition of figurative constant in COBOL?

A)Â Â Â  Constants that are represented as alphanumeric text also known as non-numeric literals.B)Â Â  Â Constants that are represented in terms of digits, also known as literalsC)Â Â  Â Data names that are initialized to specific values in DATA DIVISION and retain those values throughout the execution of the program.

D)Â Â  Â Reserved words that are used as substitutes for certain special constants – numeric and alphanumeric

• Where does AREA A in COBOL extends from?

A)Â Â  Â 8-16
B)Â Â  Â 8-11C)Â Â  Â 12-72

D)Â Â  Â 8-10

• According to the given declarations in Data Division.Â  How many elementary items are described below?

05 CALENDAR-DATE.Â Â Â Â Â Â Â Â Â Â Â  08Â  CALENDAR-DAYÂ Â Â Â Â Â Â Â Â Â  PIC 99.Â Â Â Â Â Â Â Â Â Â Â  08Â  CALENDAR-MONÂ Â Â Â Â Â Â Â Â Â  PIC 99.Â Â Â Â Â Â Â Â Â Â Â  08Â  CALENDAR-YEARÂ Â Â Â Â Â Â Â Â  PIC 99.Â Â Â Â Â Â Â Â  05 FILLERÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â  PIC X(5).Â Â Â Â Â Â Â Â  05 VAR1Â Â Â Â Â Â Â Â  PIC XX.Â Â Â Â Â Â Â Â  05 VAR2Â Â Â Â Â Â Â Â  PIC X.Â Â Â Â Â Â Â Â  05 END-DATE.Â Â Â Â Â Â Â Â Â Â Â  10 FILLERÂ Â Â Â Â Â Â Â Â Â Â Â Â Â  PIC X(4).Â Â Â Â Â Â Â Â Â Â Â  10 END-YEARÂ Â Â Â Â Â Â Â Â Â Â Â  PIC 99.A)Â Â  Â 3

B)Â Â  Â 6

C)Â Â  Â 4

D)Â Â  Â 5

• Where does AREA B in COBOL extends from?

A)Â Â  Â 8-16B)Â Â  Â 8-11

C)Â Â  Â 12-72

D)Â Â  Â 8-10

• FILE-CONTROL paragraph in a COBOL program appears in

A)Â Â  Â Input-Ouput Section in Environment DivisionB)Â Â  Â File Section in Data DivisionC)Â Â  Â Procedure Division, it can only be a user-defined paragraph

D)Â Â  Â Configuration Section in Environment Division

• Program-id a paragraph name in IDENTIFICATION division?

A)Â Â  Â True
B)Â Â  Â False

• The Procedure Division of a program contains the statement

WRITE MASTER-RECÂ Â  This suggests that the OPEN statement for this fileÂ Â Â Â Â  must NOT be

A)Â Â  Â OPEN INPUT

B)Â Â  Â OPEN EXTENDC)Â Â  Â OPEN INPUT-OUTPUT

D)Â Â  Â OPEN OUTPUT

• Program-id is compulsory?

A)Â Â  Â True
B)Â Â  Â False

• Program-id should necessary be same as member name of COBOL program?

A)Â Â  Â True
B)Â Â  Â False

• Rounded precedes the ON SIZE ERROR ?

A)Â Â  Â True
B)Â Â  Â False

• A Numeric literal in COBOL can have at most how many digits?
• A Non Numeric literal in COBOL can have at most how many digits?
• A 01 level cannot have PIC clause?

A)Â Â  Â True
B)Â Â  Â False

Please note there are more interview question and answers on mainframewizard. If you have some unanswered cobol interview questions then you can post these on the COBOL forum available on the website’s front page.