Divisions Interview Questions


Name the divisions in a COBOL program?

COBOL has 4 system-defined divisions. They are -

  • IDENTIFICATION DIVISION
  • ENVIRONMENT DIVISION
  • DATA DIVISION
  • PROCEDURE DIVISION

IDENTIFICATION DIVISION -

What is the purpose of IDENTIFICATION DIVISION?

It provides metadata about the program, such as its name, author, installation, and other descriptive information used to uniquely identify it.

What is the purpose of a program-id in COBOL?

PROGRAM-ID entry is used to specify the program name. It is mandatory and should be the first entry in the IDENTIFICATION DIVISION.

ENVIRONMENT DIVISION -

Describe the role of the ENVIRONMENT DIVISION in a COBOL program and its importance in handling computing environment dependencies?

It is responsible for specifying the computer environment (mostly computer name in mainframe environment) on which the program is compiled and executed. In addition, it defines the input and output sources (files) required to run the program and interact with devices like printers, files, etc.

What is the usage of CONFIGURATION section in ENVIRONMENT DIVISION?

It describes the computer environment in which the program is compiled and executed.

What is the significance of DEBUGGING MODE with SOURCE-COMPUTER?

It activates a compile-time debugging switch for debugging lines coded in the program.

What is the usage of INPUT-OUTPUT section in ENVIRONMENT DIVISION?

It specifies the input and output sources information that is useful to access the resources outside the program.

DATA DIVISION -

Explain role of the data division in COBOL programs?

It is responsible for declaring the variables used to process the data in the application program.

How many Sections are there in Data Division?

There are 3 sections in DATA DIVISION. They are -

  • FILE SECTION
  • WORKING-STORAGE SECTION
  • LINKAGE SECTION

PROCEDURE DIVISION -

What is a procedure division in COBOL?

The actual logic will be written in PROCEDURE DIVISION, which is responsible for carrying out the data processing tasks. Program execution starts from PROCEDURE DIVISION and ends with STOP RUN or GO BACK statements.

Common Questions -

What divisions, sections and paragraphs are mandatory in a COBOL program?

Below are mandatory in COBOL programs -

  • IDENTIFICATION DIVISION, PROGRAM-ID paragraph
  • PROCEDURE DIVISION

Frequently Asked Questions -

Explain all the divisions in a COBOL program?
What are the different divisions in COBOL programs?
List down the divisions that are available in a COBOL program?
What are the four divisions in COBOL?
What are all the divisions of a COBOL program?
What are the four divisions in the COBOL language structure?

Explain the function of ENVIRONMENT DIVISION and its significance for managing dependencies in the computer environment?
What is the resolution of using the ENVIRONMENT DIVISION in programming?
Define ENVIRONMENT DIVISION in the COBOL language structure?
Explain the usage of the ENVIRONMENT DIVISION in programming?

Determine the task of using the input section in programming
How the input section plays a crucial role in programming?

Explain the service of using the data division in programming?

List down the sections available in Data Division in COBOL?
Name the sections of the data division?

What is the usage of declaratives in procedure division in COBOL?