Top 10 Cobol Interview Questions and Answers
Updated 4 Nov 2024
Q1. What is cobol and what is comp
COBOL is a programming language used for business applications. COMP is a COBOL data type for storing numbers.
COBOL stands for Common Business Oriented Language
It was developed in the late 1950s and early 1960s
COBOL is used for developing business applications such as banking, insurance, and finance
COMP is a COBOL data type used for storing numbers in binary format
COMP can be further classified into COMP-3, which is used for storing packed decimal numbers
Q2. What are the ways to pass data to COBOL through JCL?
Data can be passed to COBOL through JCL using SYSIN DD statement, PARM parameter, and environment variables.
Use SYSIN DD statement to pass data to COBOL program
Pass data using PARM parameter in JCL
Set environment variables in JCL to pass data
Q3. Difference between goto and perform
Goto is an unconditional transfer of control while perform is a conditional transfer of control.
Goto is considered harmful as it can lead to spaghetti code.
Perform is used to execute a set of statements based on a condition.
Perform can be used with varying levels of granularity such as perform until, perform varying, etc.
Goto is rarely used in modern programming languages.
Example: perform until condition is met, goto line 10
Q4. what is cobol in mainframe?
COBOL (Common Business-Oriented Language) is a high-level programming language used primarily for business, finance, and administrative systems on mainframe computers.
COBOL is one of the oldest programming languages, designed in the late 1950s.
It is known for its readability and self-documenting code.
COBOL is still widely used in legacy systems, especially in the financial and government sectors.
Example: COBOL programs are often used for processing large volumes of data in ba...read more
Q5. Explain the different division in cobol?
In COBOL, divisions are used to organize the program into different sections based on functionality.
COBOL programs are divided into four divisions: Identification, Environment, Data, and Procedure.
Identification Division contains program name, author, date, etc.
Environment Division specifies the hardware and software environment.
Data Division defines the data structures used in the program.
Procedure Division contains the actual logic and processing instructions.
Each division ...read more
Q6. Is any condition mandatory to call a program in COBOL?
No, there is no mandatory condition to call a program in COBOL.
In COBOL, a program can be called without any mandatory conditions.
The CALL statement is used to call a program in COBOL.
The called program can be executed based on the logic written within it.
Example: CALL 'PROGRAM-NAME' USING parameters.
Q7. What are the different levels used in cobol
COBOL has different levels such as level 01, level 77, etc. for defining data structures and variables.
Level 01 is used for defining record structures.
Level 77 is used for defining elementary data items.
Level 88 is used for defining condition names.
Level 66 is used for renaming data items.
Level 88 is used for defining condition names.
Q8. What is cobol? And how it works?
COBOL is a programming language used for business applications. It is procedural and works by executing a series of instructions.
COBOL stands for Common Business-Oriented Language.
It was developed in the late 1950s and early 1960s.
COBOL is primarily used for business, finance, and administrative systems.
It is a procedural language, meaning it follows a step-by-step approach.
COBOL programs are composed of divisions, sections, and paragraphs.
It supports file handling, data mani...read more
Cobol Jobs
Q9. What is COB? How its apply?
COB stands for Coordination of Benefits. It is a process used in insurance to determine the order in which multiple insurance policies should pay for a claim.
COB helps prevent overpayment by ensuring that no more than 100% of the claim amount is paid.
The primary insurance policy is responsible for paying the claim first, while the secondary policy covers the remaining balance.
COB applies to situations where a person has multiple insurance policies, such as through their emplo...read more
Q10. Difference b.w. READ and READ INTO WS-VARIABLE
READ reads data from a file into a variable, while READ INTO WS-VARIABLE reads data into a specified work area.
READ is used to read data from a file into a variable in COBOL.
READ INTO WS-VARIABLE is used to read data into a specified work area in COBOL.
READ example: READ FILE-NAME INTO DATA-VARIABLE.
READ INTO WS-VARIABLE example: READ FILE-NAME INTO WS-WORK-AREA.
Q11. What is cobol explaining
COBOL is a programming language used primarily for business, finance, and administrative systems.
COBOL stands for Common Business-Oriented Language.
It is known for its readability and self-documenting nature.
COBOL is used in industries such as banking, insurance, and government.
It is designed for processing large volumes of data efficiently.
COBOL programs are typically structured into divisions, sections, and paragraphs.
Q12. how to pass the data to cobol?
Data can be passed to COBOL using input/output files, parameters, or through communication with other programs.
Data can be passed to COBOL programs through input/output files. The program reads data from input files and writes output to output files.
Parameters can be used to pass data to COBOL programs. Data can be passed as arguments when calling the program.
COBOL programs can communicate with other programs using communication methods like sockets or APIs to exchange data.
Q13. Index and subscript in cobol
Index and subscript are used in COBOL to access elements in arrays.
Index is used to access a specific element in an array based on its position
Subscript is used to access a specific element in an array based on its value
Both index and subscript can be used interchangeably in COBOL
Example: ARRAY(3) is the same as ARRAY(3:3)
Q14. Comp 1 and Comp 3 usage clause variables in cobol
Comp 1 and Comp 3 are usage clause variables in COBOL.
Comp 1 is used for binary data and takes up 2 bytes of storage.
Comp 3 is used for packed decimal data and takes up variable storage depending on the number of digits.
Usage clause variables are used to define the type of data and how it is stored in memory.
Q15. Ibm full from in cobol
IBM Full Form in COBOL
IBM stands for International Business Machines
COBOL stands for Common Business Oriented Language
IBM is a company that produces hardware and software, including mainframes
COBOL is a programming language commonly used for business applications
IBM mainframes are often used for running COBOL programs
Q16. Simple cobol program.what kind of changes in cobol .
Changes in COBOL programs depend on the specific requirements and goals of the project.
Changes may involve modifying existing code to add new functionality or improve performance.
Updates may also be necessary to ensure compatibility with new hardware or software systems.
Refactoring code to improve readability and maintainability is another common change.
Examples of changes include adding new data fields, modifying conditional statements, and updating file handling procedures.
Q17. Divisions of cobol
COBOL has four divisions: Identification Division, Environment Division, Data Division, and Procedure Division.
Identification Division: Contains program name, author, and other identifying information.
Environment Division: Specifies the hardware and software environment in which the program will run.
Data Division: Defines the data structures used in the program.
Procedure Division: Contains the actual program logic and instructions.
Example: IDENTIFICATION DIVISION. PROGRAM-ID....read more
Q18. No of divisions in cobol?
There are four divisions in COBOL: Identification Division, Environment Division, Data Division, and Procedure Division.
Identification Division: Contains program name, author, and date.
Environment Division: Specifies the hardware and software environment.
Data Division: Defines the data structures used in the program.
Procedure Division: Contains the actual program logic.
Top Interview Questions for Related Skills
Interview Questions of Cobol Related Designations
Interview experiences of popular companies
Reviews
Interviews
Salaries
Users/Month