Skip to main content
  • What are the four major sections of the DATA DIVISION and what is the purpose of each?

  • What happens if you try to use a variable in PROCEDURE DIVISION that is not declared in the DATA DIVISION?

  • Is the DATA DIVISION mandatory in all COBOL programs? Why or why not?

  • What’s the difference between WORKING-STORAGE and LOCAL-STORAGE?

  • What are COBOL level numbers and how do they help in data organization?

  • What is the use of level numbers 77 and 88? How are they different from 01–49?

  • Can you declare a variable using level number 66 or 88 directly? Explain their purpose.

  • What is the difference between a group data item and an elementary data item?

  • Can a group data item contain a PICTURE clause? Why or why not?

  • How do you reference an elementary item within a group?

  • What is the purpose of the PICTURE clause in COBOL?

  • How do you define a numeric variable of 6 digits with two decimal places in COBOL?

  • How do you declare an alphanumeric variable of length 100?

  • What is the difference between PIC X(10) and PIC A(10)? Give practical examples.

  • How does BLANK WHEN ZERO affect the display of numeric variables?

  • Where can the VALUE clause be used? Can it be used in the LINKAGE SECTION?

  • What error would you get if you try to initialize a FILLER variable with a VALUE?

  • What does the REDEFINES clause do? Give a real-world use case.

  • What rules must be followed when using REDEFINES (level number, positioning, compatibility)?

  • How can you use REDEFINES to view the same data in two different formats?

  • How does the RENAMES clause help in data reorganization?

  • What are the limitations of using RENAMES clause?

  • Can you rename items that are not in sequence? Why or why not?

  • If a customer record has multiple fields, how would you structure it using group and elementary items?

  • You have a numeric field but want to process it as alphanumeric temporarily. What would you use?

  • A variable declared as PIC 9(4) shows spaces instead of zeros in output. What could be the reason?

  • You have to store a 20-character description but only need the first 10 characters for logic. How would you handle this?