Top 10 Cobol Interview Questions and Answers

Updated 4 Nov 2024

Q1. What is cobol and what is comp

Ans.

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

Add your answer
Frequently asked in

Q2. What are the ways to pass data to COBOL through JCL?

Ans.

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

Add your answer
Frequently asked in

Q3. Difference between goto and perform

Ans.

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

Add your answer
Frequently asked in

Q4. what is cobol in mainframe?

Ans.

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

Add your answer
Frequently asked in
Are these interview questions helpful?

Q5. Explain the different division in cobol?

Ans.

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

Add your answer
Frequently asked in

Q6. Is any condition mandatory to call a program in COBOL?

Ans.

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.

Add your answer
Frequently asked in
Share interview questions and help millions of jobseekers 🌟

Q7. What are the different levels used in cobol

Ans.

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.

Add your answer
Frequently asked in

Q8. What is cobol? And how it works?

Ans.

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

Add your answer
Frequently asked in

Cobol Jobs

Industry Consultant-Industry. Banking 5-10 years
IBM India Pvt. Limited
4.0
Hyderabad / Secunderabad
Client Adoption Specialist 2-5 years
IBM India Pvt. Limited
4.0
Bangalore / Bengaluru
Db2 z/OS Technical Support Professional 4-8 years
IBM India Pvt. Limited
4.0
Kochi

Q9. What is COB? How its apply?

Ans.

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

Add your answer

Q10. Difference b.w. READ and READ INTO WS-VARIABLE

Ans.

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.

Add your answer
Frequently asked in

Q11. What is cobol explaining

Ans.

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.

Add your answer

Q12. how to pass the data to cobol?

Ans.

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.

Add your answer
Frequently asked in

Q13. Index and subscript in cobol

Ans.

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)

Add your answer
Frequently asked in

Q14. Comp 1 and Comp 3 usage clause variables in cobol

Ans.

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.

Add your answer
Frequently asked in

Q15. Ibm full from in cobol

Ans.

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

Add your answer
Frequently asked in

Q16. Simple cobol program.what kind of changes in cobol .

Ans.

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.

Add your answer

Q17. Divisions of cobol

Ans.

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

Add your answer
Frequently asked in

Q18. No of divisions in cobol?

Ans.

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.

Add your answer
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview Questions of Cobol Related Designations

Interview experiences of popular companies

3.7
 • 10.5k Interviews
3.8
 • 8.2k Interviews
3.6
 • 7.6k Interviews
3.7
 • 5.6k Interviews
3.8
 • 3k Interviews
4.0
 • 2.4k Interviews
4.0
 • 778 Interviews
3.9
 • 366 Interviews
3.8
 • 138 Interviews
View all
Cobol Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter