Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 847823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T06:50:57+00:00 2026-05-15T06:50:57+00:00

I have confusion regarding COBOL data types. Like in many interviews it is asked

  • 0

I have confusion regarding COBOL data types.
Like in many interviews it is asked to explain the difference between COMP-3 and COMP…
what is the exact difference?
what is the meaning of usage modes in COBOL and how is it related to data types?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T06:50:58+00:00Added an answer on May 15, 2026 at 6:50 am

    USAGE in COBOL describes how a data item is to be used. A few examples
    of USAGE are:

    • DISPLAY. This identifies an item that may be printed on a terminal or
      report. This may or may not be a number (e.g. could be a text value). The
      description of the DISPLAY item is given by the PICture clause. For example:
      PIC 9(5) USAGE DISPLAY describes a 5 digit number that may be displayed (printed).
      Often USAGE DISPLAY is left off because it is implied if missing.
    • INDEX. This identifies an item used as an index into a table (OCCURS).
    • COMPsomething indicates that the data item is to be used in
      arithmetic operations (i.e. it is a number of some type).

    There are various types of numeric item. Two of the most commonly used
    numeric data types are:

    • COMPUTATIONAL or COMP. This is equivalent to BINARY
    • COMPUTATIONAL-3 or COMP-3. This is equivalent to PACKED-DECIMAL

    COMP (BINARY) data items are generally the most efficient way to perform
    calculations on data items that represent integer values.

    COMP-3 (PACKED-DECIMAL) data items are used in COBOL because
    they maintain a fixed number of decimal points. All computations
    lead to a result having the prescribed number of decimal points.
    This is particularly useful in accounting type operations.
    Floating point numbers make the number of digits after the
    decimal point variable (e.g. the decimal point can "float") which is
    not the way financial operations are usually represented.

    You can find a complete list of COMPutational items for IBM Enterprise COBOL
    here

    One of the problems many programmers have when beginning with COBOL is
    understanding that a COMP item is great for doing math but cannot be
    displayed (printed) until it is converted into a DISPLAYable item through
    a MOVE statement. If you MOVE a COMP item into a report or onto a
    screen it will not present very well. It needs to be moved into a DISPLAY
    item first.

    The other thing that you may want to research a bit more is the
    relationship between the PICture and the USAGE when defining variables
    in COBOL. Here is a link to a very good introductory COBOL Tutorial
    from the University of Limerick.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone, I have some confusion regarding some Win32 API data types and macros
I have a little confusion regarding difference between ORM and PDO? Is PDO a
I have a confusion regarding DataContext which i would like someone to confirm or
I have some confusion regarding Events . What are the basic differences between C#
I have little bit confusion regarding apache tomcat installation. So, I would like to
i have few confusion regarding ORM(Object Relational Mapping) i am thinking about to use
Based on an answer from a candidate I have a confusion regarding the functioning
I have a confusion between two B keywords. The official B reference manual uses
I have a confusion regarding the structure of the web.xml for the servlet mapping,
I have searched many questions regarding session_destroy and the often response from the answerers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.