---
title: "Why ‘PIC’ Clause Not Required for COBOL Comp, Comp-1, Comp-2"
description: "Comp variables popularly use in all mainframe technologies - COBOL/IMSDB/IMSDC/CICS. At word boundaries Comp-1 and Comp-2 are more efficient than comp-3 (takes less space). https://srinimf.com/2012/01..."
url: https://srinimf.com/2012/04/15/cobol-pic-clause-not-needed-for-comp-1-and-comp-2/
date: 2012-04-15
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2012/04/pexels-photo-3846023.jpeg?fit=1880%2C1253&ssl=1
categories: ["COBOL"]
tags: ["cobol", "Comp-1", "Comp-2"]
type: post
lang: en
---

# Why ‘PIC’ Clause Not Required for COBOL Comp, Comp-1, Comp-2

Comp variables popularly use in all mainframe technologies – COBOL/IMSDB/IMSDC/CICS. At word boundaries Comp-1 and Comp-2 are more efficient than comp-3 (takes less space).

Related[COBOL Tough Questions (2 of 3)](https://srinimf.com/2012/01/08/cobol-tough-questions-2-of-3/)

Related[CICS: How to write TIME logic in Four Ways](https://srinimf.com/2017/06/30/four-ways-in-cics-to-write-error-free-time-logic/)

Related[IMS DC MFS Control Blocks (3 of 3)](https://srinimf.com/2012/04/10/ims-db-mfs-control-blocks-part-2/)

Related[CICS Sample Program to Read a File](https://srinimf.com/2016/04/06/cics-sample-program-to-read-a-file/)

Related[COBOL – Single Precision and Double Precision Floating Point](https://srinimf.com/2014/02/05/cobol-single-double-floating-point/)

Related[3 Top Ideas to Get String Length in COBOL Unstring](https://srinimf.com/2022/10/01/3-top-ideas-to-get-string-length-in-cobol-unstring/)

## COMP

Below is the range for “COMP” data type.

Related[7 CICS Symbolic Map Field Extensions](https://srinimf.com/2021/12/13/8-cics-symbolic-map-field-extensions/)

```
PIC 9(1) -- PIC 9(4)      2 bytes
PIC 9(5) -- PIC 9(9)      4 bytes
PIC 9(10) -- PIC 9(18)    8 bytes
```

Related[19 Top COBOL Performance Tuning Ideas](https://srinimf.com/2017/01/07/the-19-best-informative-cobol-really-useful-tuning-tips/)

## COMP-1 and COMP-2

Let us take on “COMP-1”. It stores data internally as 1 word. It takes 4 bytes of space.

Related[USAGE Clause in COBOL Why do We need](https://srinimf.com/2017/02/23/how-to-code-usage-clause-in-cobol-example/)

For Comp-2, the data stores internally as 2  words. So it takes 8 bytes. This is the reason Comp-2 is more precession than Comp-1.

Related[CICS Sample Program to Write Header and Footer](https://srinimf.com/2016/04/06/cics-sample-code-for-header-and-footer/)

Advertisements

The other point is, we should not specify PIC for Comp-1 and Comp-2, the reason is, the data type(numeric) and sizes (4 or 8 bytes) are pre-determined. So PIC [is not](https://srinimf.com/2014/09/08/cobol-sqlca-is-not-mandatory-why/) required. PIC clause determines relation between data name and data-type.

Related[TPPCB Structure in IMS DB/DC](https://srinimf.com/2015/06/16/tppcb-structure-in-imsdbdc/)

Bottom Line:

Comp-1 take 4 bytes (1 word) is single precession & Comp-2 takes 8-bytes(2 words) is double precession. [Here is data representation for Comp-1 and Comp-2.](https://en.wikipedia.org/wiki/IEEE_754-1985)

Related[JCL-Sort card “BI” to “ZD”](https://srinimf.com/2012/02/03/jcl-sort-card-bi-to-zd/)

```
05 DATA-ONE          COMP-1.
05 DATA-TWO          COMP-2.
```

Related Posts

- [COBOL Tough Questions (2 of 3)](https://srinimf.com/2012/01/08/cobol-tough-questions-2-of-3/)DateJanuary 8, 2012
- [Stratus COBOL or VoS COBOL -Comp-4 Vs Comp-5 and Comp-6](https://srinimf.com/2016/06/24/stratus-cobol-or-vos-cobol-comp-4-vs-comp-5-and-comp-6/)DateJune 24, 2016
- [USAGE Clause in COBOL Why do We need](https://srinimf.com/2017/02/23/how-to-code-usage-clause-in-cobol-example/)DateFebruary 23, 2017

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2012%2F04%2F15%2Fcobol-pic-clause-not-needed-for-comp-1-and-comp-2%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2012%2F04%2Fpexels-photo-3846023.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=Why%20%27PIC%27%20Clause%20Not%20Required%20for%20COBOL%20Comp%2C%20Comp-1%2C%20Comp-2)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2012/04/15/cobol-pic-clause-not-needed-for-comp-1-and-comp-2/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2012/04/15/cobol-pic-clause-not-needed-for-comp-1-and-comp-2/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2012/04/15/cobol-pic-clause-not-needed-for-comp-1-and-comp-2/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2012/04/15/cobol-pic-clause-not-needed-for-comp-1-and-comp-2/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20Why%20%27PIC%27%20Clause%20Not%20Required%20for%20COBOL%20Comp%2C%20Comp-1%2C%20Comp-2&body=https%3A%2F%2Fsrinimf.com%2F2012%2F04%2F15%2Fcobol-pic-clause-not-needed-for-comp-1-and-comp-2%2F&share=email)
-

### Like this:

Like Loading…
