---
title: "COBOL: How to Initialize Pointer Variable an Example"
description: "COBOL pointer variable is one kind of data type. Initialization and how to use them you will know in this post."
url: https://srinimf.com/2015/09/07/cobol-usage-is-pointer-data-item/
date: 2015-09-07
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2018/04/pexels-photo-325871-e1522906083585.jpeg?fit=1277%2C957&ssl=1
categories: ["COBOL"]
tags: ["COBOL Pointer Variable", "COBOL Tips and Tricks"]
type: post
lang: en
---

# COBOL: How to Initialize Pointer Variable an Example

Pointer variable in COBOL is a special type of variable. In this post I am sharing [what is](https://srinimf.com/2022/10/03/what-is-multitasking-in-python-and-how-it-supports/) pointer variable, how to initialize and use them.

## **What are pointers **

Another extension of the USAGE clause is to define data items that contain addresses of data or procedures.

*POINTER is a four-byte data item that holds the address of another data item. PROCEDURE-POINTER is a four- or eight-byte data item (depending on the operating system) that contains the address of a program-entry point.*

### **Rules for Pointer Variables **

1. A POINTER data item cannot have a PICTURE clause.
2. The figurative constant NULL (or NULLS) can be used to initialise POINTER and PROCEDURE-POINTER data. No other literal value can be assigned to POINTER data.

In addition to the new data types, vendors implement special registers for use with address data:

ADDRESS OF a register that exists for each record (level 01 or 77) in the Linkage Section of the Data Division. The contents are the address of the data item, for example, ADDRESS OF record.

LENGTH OF a register that contains the length in bytes of the named data item, for example, LENGTH OF identifier.

POINTER variable you cannot use in a MOVE statement. They are manipulated by an extension of the SET statement that assigns them values.

**SET identifier-1 TO ADDRESS OF identifier-2**

where identifier-1 is a POINTER data item and identifer-2 is any data item in the Working-Storage Section or Linkage Section.

- POINTER data items can be used in relation conditions (to test for equality) and as arguments in a CALL statement.
- PROCEDURE-POINTER data items can be used as the object of a CALL statement.

- More Srinimf [![30 SQL Practice Queries with Solutions — Run Them Live](https://i0.wp.com/srinimf.com/wp-content/uploads/2026/10/pexels-photo-5530473.jpeg?resize=867%2C1300&ssl=1)](https://srinimf.com/2026/10/01/30-sql-practice-queries-with-solutions-run-them-live/) ## [30 SQL Practice Queries with Solutions — Run Them Live](https://srinimf.com/2026/10/01/30-sql-practice-queries-with-solutions-run-them-live/) Practice 30 SQL queries with solutions, from SELECT and JOINs to subqueries and window functions. Run SQL queries live in an interactive SQL Playground.
- More Srinimf [![Supercharge Your Database Skills: Try Our New Interactive SQL Plugin!](https://i0.wp.com/srinimf.com/wp-content/uploads/2026/09/pexels-photo-1181469.jpeg?resize=1880%2C1255&ssl=1)](https://srinimf.com/2026/09/30/supercharge-your-database-skills-try-our-new-interactive-sql-plugin/) ## [Supercharge Your Database Skills: Try Our New Interactive SQL Plugin!](https://srinimf.com/2026/09/30/supercharge-your-database-skills-try-our-new-interactive-sql-plugin/) Struggling with database queries? Explore our new interactive SQL plugin to write, test, and master SQL directly in your browser. Try the live demo now!
- More Srinimf [![How to Count Spark Stages by Sight and Optimize Shuffles](https://i0.wp.com/srinimf.com/wp-content/uploads/2026/09/pexels-photo-14314638.jpeg?resize=1880%2C1253&ssl=1)](https://srinimf.com/2026/09/27/how-to-count-spark-stages-by-sight-and-optimize-shuffles/) ## [How to Count Spark Stages by Sight and Optimize Shuffles](https://srinimf.com/2026/09/27/how-to-count-spark-stages-by-sight-and-optimize-shuffles/) Want to predict execution stages before running a job? Learn how to count Spark stages by sight with code breakdowns, shuffle rules, and optimization traps.

### 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%2F2015%2F09%2F07%2Fcobol-usage-is-pointer-data-item%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2018%2F04%2Fpexels-photo-325871-e1522906083585.jpeg%3Ffit%3D1200%252C899%26ssl%3D1&description=COBOL%3A%20%20How%20to%20Initialize%20Pointer%20Variable%20an%20Example)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2015/09/07/cobol-usage-is-pointer-data-item/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2015/09/07/cobol-usage-is-pointer-data-item/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2015/09/07/cobol-usage-is-pointer-data-item/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2015/09/07/cobol-usage-is-pointer-data-item/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20COBOL%3A%20%20How%20to%20Initialize%20Pointer%20Variable%20an%20Example&body=https%3A%2F%2Fsrinimf.com%2F2015%2F09%2F07%2Fcobol-usage-is-pointer-data-item%2F&share=email)
-

### Like this:

Like Loading…
