COBOL Interview Questions | COBOL Interview Questions and Answers for Experienced

Cobol interview questions and answers are provided here to guide both fresher and experienced candidates who are preparing for the job interview in the Cobol language.

Common Business Oriented Language, commonly referred to as COBOL, was first created for business applications back in the 1959.

Nowadays it remains widespread throughout organizations in finance and healthcare particularly within financial organizations and healthcare.

Here We Will Provide Cobol interview Questions with answers.

What are the three data types in Cobol?

The three types of data types in Cobol are numeric, alpha numeric, and alphabetic.

Explain the differences between numeric, alpha numeric, and alphabetic data types in Cobol? 

The main difference between numeric, alpha numeric, and alphabetic data types in Cobol is that numeric variables can only have numeric values, alpha numeric variables can have both numeric and non-numeric values, and alphabetic variables can only have alphabetic values.

What is a variable, literal, constant in Cobol?

A variable in Cobol is a data item that can change during a program, but it has restrictions based on the data type.

A literal in Cobol is a character string whose value is given by the character itself.

A constant in Cobol is a data item with only one value throughout the program.

Explain Cobol data names or variables?

Cobol data names or variables are user-defined words defined in data division or procedures.

How are Cobol data names defined?

To define a Cobol data name, three specific things are needed: a level number, a picture clause, and a value clause.

It is important to remember that letters, numbers, and hyphens can be used in variable names, with a maximum of 30 characters.

What is a level number in Cobol?

Level numbers in Cobol are integer values between one to 49.

What is the Cobol picture clause and Cobol value clause? 

The Cobol picture clause defines the data type and storage size of a data item, denoted by picture or pink.

It is only used to define elementary data items and should not be used to define a group variable. 

The Cobol value clause specifies the initial value for the data item, which is optional and depends on the programmer.

If a default value is assigned to a variable when defining it in a working storage section, the value clause can be used to assign that particular value.

What are the two general methods of editing in a picture clause?

The two general methods of editing in a picture clause are insertion and suppression or replacement.

Define suppression or replacement in a picture clause?

Suppression or replacement in a picture clause involves removing specific values from the report or street.

Dateable data types like Z or S trick can be used to replace or suppress a specific value on the screen or report.

Explain the variability between simple, special, fixed, and floating insertion in a picture clause?

Simple insertion involves adding a single character or symbol to an existing value.

Special insertion involves adding a special character or symbol to an existing value.

Fixed insertion involves adding a fixed number of characters or symbols to an existing value.

Floating insertion involves adding a variable number of characters or symbols to an existing value.

What is the concept of Cobol string manipulation?

The concept of Cobol string manipulation is the use of various functions such as string, unstring, and inspect to manipulate strings according to the user’s needs.

Explain string function in Cobol?

The string function in Cobol is generally used to concatenate two or more fields into a single field.

Define overflow statement in Cobol string manipulation?

The overflow statement only executes if there are valid characters left in the source string that need to be transferred to the destination field and the destination variable is full.

What is the pointer option in Cobol string manipulation?

The pointer option in Cobol string manipulation can be used to count the number of characters moved from the source to a destination field.

Explain Cobol programming language?

Cobol programming language stands for Common Business Oriented Language.

It is used for large-volume application programming, such as batch programming and online programming.

What are the programming paradigms supported by Cobol?

Cobol supports object-oriented programming, structured programming, and procedure programming.

What is Micro focus Cobol used for?

Micro focus Cobol is used in P C based applications.

COBOL Training

Determine real-time, real mainframe Cobol used for?

Real-time, real mainframe Cobol is used in large-scale applications connected to the IBM mainframe.

Explain ID coding sheet used for in Cobol programming?

The ID coding sheet is used for local missions in Cobol programming.

What are the four divisions in the Cobol language structure?

The four divisions in the Cobol language structure are identification, environment, data, and procedure.

Explain NASA section in the identification division of the Cobol language structure?

The NASA section in the identification division of the Cobol language structure is for program ideas.

What is the data division in the identification division of the Cobol language structure?

The data division in the identification division of the Cobol language structure has working storage, variables, and paragraphs.

Define environment division in the Cobol language structure?

The environment division in the Cobol language structure has two sections: configuration and input output.

Explain role of the data division in Cobol programs?

The data division plays a crucial role in Cobol programs, with temporary and permanent variables.

What is the file section used for in Cobol programming?

The file section is used for physical files like P-S files or V-ZAM files, where data is retrieved.

Explain the linkage section used for in Cobol programming?

The linkage section is used for externally passing parameters for the runtime, such as dates or runtime parameters.

What is the significance language structures in programming?

The language structures in programming are important because they provide a framework for organizing and executing code.

Define the importance of understanding the coding standards used in Cobol programs?

The importance of understanding the coding standards used in Cobol programs is to ensure that the code is written in a consistent and efficient manner, which can improve the overall quality and performance of the program.

What is the aim of using constants and variables in programming?

Using constants and variables in programming is to store and manipulate data.

Constants are used to store fixed values that cannot be changed during the program execution, while variables are used to store and manipulate dynamic data that can change during the program execution.

What distinguishes dynamic data from static data in programming?

Static data in programming is data that is assigned to a data name during the declaration of the data name.

Dynamic data in programming is data that is added to a data name using an accept statement after the program has started executing.

Explain the performance of using move statements in programming?

The performance of using move statements in programming is to transfer data from one variable to another.

Move statements are used to pass data between variables, groups, and data types.

What is the use of string deletion by with pointer and unstring?

String deletion by with pointer is used to delete a specific number of characters from the end of a string.

Unstring is used to concatenate multiple fields into one variable.

What are automatic statements in programming?

Automatic statements in programming are statements that are executed automatically during the execution of the program.

Examples include add WSA and WSB, which are statements that allocate and deallocate memory during the execution of the program.

COBOL Online Training

When is it necessary to use a copy book of a DB2 table?

When working with DB2 tables, conversion through a copy book of the table is necessary to ensure accurate results.

Explain the objective of using conditional statements in programming?

Conditional statements, such as sequence selection, if, else, evaluate, and iteration perform, can be used within the program to check for conditions or bypass them.

How to compare if, else, and evaluate statements?

If statements are used to check for conditions, else statements are used to define what to do if the condition is not met, and evaluate statements are used to check multiple conditions.

Define the function of using the special variable number 88 in programming?

The special variable number 88 is used to define conditions that are coded without the picture class, simplifying procedure division statements and allowing multiple values to be checked simultaneously. 

What is the function of using renames in programming?

Renames are essential in real-time programming as they help group elementary data names in a record and ensure that they belong to the original, eliminating the need to define additional variables. 

Explain disparity between renaming elementary and group data in programming?

Renames are used for both group and elementary data nine and are used to change the data type length when new data name size is more than the original.

Renames are essential in real-time programming as they help group elementary data names in a record and ensure that they belong to the original.

What is the aim of using filler in programming?

Filler is used when a blank field within a data record is needed. This can be done using file spaces or filler concepts. Filler is also used for future allocation of data in specific records.

Explain the different types of performance in programming?

Inline perform involves creating a Paragraph name and jumping to the particular Paragraph, while outline perform is an option required for real-time programming.

Define the objective of using paragraphs in programming?

Paragraphs are reusable and start in the eighth column. When a program is submitted, control is executed from Paragraph by Paragraph.

Explainthe variation between inline and outline perform?

Inline perform involves creating a Paragraph name and jumping to the particular Paragraph, while outline perform is an option required for real-time programming.

Explain the intention of using arrays in programming?

Arrays are a group of similar data items that share the common name, while occurs is a concept used in programming languages to store dissimilar data items sharing the common name.

Explain subscript and index in programming?

Subscript is a displacement position of an array data name, while index is declared by using index by or with occur clause.

Explain life cycle of a file in programming?

The life cycle of a file is like declaring a file, processing it, and returning the data.

What is the resolution of using the environment division in programming?

In the environment division, the first important step in declaring a file is to specify the file and device name.

Determine the task of using the input section in programming?

In the input section, you must write in the file control section, select the emp file, and assign an employee ID, filler class, and employee name.

What are the different modes in the data division in programming?

Within the environment division, there are various modes like input, open output, read, and write operations.

For read operations, use input for read operations, output for both write and write extend mode, and write for writing data into the file.

What is the motive of using paragraphs in programming?

Paragraphs are reusable and start in the eighth column. When a program is submitted, control is executed from Paragraph by Paragraph.

Why rewrite statements used in programming?

Rewrite statements are used permanently to store data into the file.

Explain the usage of the environment division in programming?

In the environment division, the first important step in declaring a file is to specify the file and device name.

How the input section plays a crucial role in programming?

In the input section, you must write in the file control section, select the emp file, and assign an employee ID, filler class, and employee name.

Explain the service of using the data division in programming?

In the data division, you must specify the structure of the record within the emp file. 

Explain sequential and index files?

Sequential files allow data to be stored in a sequential array, allowing duplicate records and transfer between programs. Index to files store data along with the index, preventing duplicates.

Explain the advantage of using a copy book in programming?

The advantage of using a copy book is that it saves compilation types and improves productivity by decreasing code length.

What is the contrast between main and sub programs in programming?

Main program variables are called actual parameters, while sub programs variables are called formal parameters.

By reference and by value are used to ensure that changes to these variables do not reflect back to the main program.

By value allows for separate copies of values within the main program and sub program.

Define the divergence of copy and call-in programming?

Copy is used to copy predefined code to the application program, while call is used to call the sub program.

Copy is compiled along with the main source, while call is used to call the sub program.

The main dissimilarity is that the main and sub programs are coded using variables, while call is coded with procedure division using variables.

Increase your learning with MCQ’s of COBOL 

What types of data are attributes of data in Cobol that indicate the compiler’s intent to use the data?

a) Numeric, alpha numeric, and alphabetic

b) Integer, float, and Boolean

c) String, array, and linked list

d) Characters, Unicode, and ASCII

What are the two subcategories used in Cobol for reformatting data and displaying values on the screen?

a) Edit numeric and edit alpha numeric

b) Format numeric and format alpha numeric

c) Display numeric and display alpha numeric

d) Transform numeric and transform alpha numeric

What are the three specific things needed to define a data name or variable in Cobol?

a) Level number, picture clause, and value clause

b) Initial value, Data type, and storage size

c) Data type, size, and usage

d)Format, Data type, and storage size

What is the maximum number of characters that can be used in variable names in Cobol?

a) 10

b) 20

c) 30

d) 40

What are the four categories of insertion in a picture clause?

a) Simple, special, fixed, and floating

b) Numeric, Boolean, character, and date

c) Integer, float, character, and date

d) Numeric, character, Boolean, and date

What are the three variables used in the presentation?

a) Text amount, total amount, and date

b) Check amount, salary amount, and date

c) Employee name, salary amount, check amount, and date

d) W, RTE, plus sign description, and INSPLK

What is the purpose of the string keyword in Cobol?

a) Insert an additional character or symbol into an existing value

b) Replace a specific value on the screen or report

c) Identify the end of the string

d) Define the hierarchy of data within a record

What is the primary distinction in Cobol between a copy and a call?

a) Call is used to copy predefined code to the application program, while call is used to call the sub program

b) Copy is used to compile along with the main source, while call is used to call the sub program

c) Call is used to store data permanently in a file, while copy is used to store data temporarily in memory

d) Used to pass values by reference, while copy is used to pass values by value

What is the benefit of using inline perform in Cobol?

a) Move data between variables

b) Concatenate multiple fields

c) Specify the data type length

d) Create a Paragraph name and jump to the particular Paragraph

Why actual parameters are used in Cobol?

a) Store data in a non-sequential array

b) Prevent duplicates in indexed files

c) Store data permanently in a file

d) Store main program variables

What is the major role of using the special variable number 88 in Cobol?

a) Change the data type length when new data name size is more than the original

b) Define conditions that are coded without the picture class

c) Group elementary data names in a record and ensure that they belong to the original

d) Define new variables

An interview for Cobol jobs can be both daunting and exhilarating, yet understanding its basic language elements and being prepared to answer an array of questions should give you an edge towards landing the position you seek.

No matter if you are new or experienced programmer hopefully this bloghas given you an enhanced knowledge about Cobol scenario-based interview questions for experienced programmers as well as basic Cobol interview questions for freshers.

COBOL Course Price

Kumari

Kumari

Author

Knowledge speaks, but wisdom listens.