Your COBOL program needs to maintain a counter that keeps track of the number of times a specific operation is performed. Which type of variable is suitable for this task?

  • PIC 9(3) USAGE DISPLAY
  • PIC 9(4)
  • PIC 9(5) USAGE COMP-3
  • PIC S9(6) USAGE COMP
For maintaining a counter in COBOL, PIC S9(6) USAGE COMP is appropriate. It is a signed numeric type that efficiently stores and increments numeric values.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *