---
title: "COBOL Arrays: Two Things You Need to Know"
description: "COBOL Arrays, I have explained two prime points useful for your projects."
url: https://srinimf.com/2012/11/17/cobol-2-things-you-may-not-know-about-arrays/
date: 2012-11-17
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2012/11/pexels-photo-131979.jpeg?fit=1880%2C1253&ssl=1
categories: ["COBOL"]
tags: ["ARRAYS", "COBOL Tips and Tricks"]
type: post
lang: en
---

# COBOL Arrays: Two Things You Need to Know

Few things you need to know about COBOL-arrays. Arrays have multiple benefits. While reading an i/p file, in batch process, the only way you can store data internally is in arrays. So, the data can be used for processing within the program.

Related[COBOL PERFORM Until Vs Times](https://srinimf.com/2017/01/17/cobol-logic-with-complex-question-newly-asked/)

[COBOL Arrays](https://srinimf.com/2015/10/05/java-collections-for-mainframe-programmers/)

Important points are:

## Point1:

01 Array-example

     02 Table-1 occurs n times

            03 Field-1    pic x(2)

            03 Field-2  pic x(3)

Here the ‘n’ times is any value from ‘1’ to ‘32767’

## Point 2:

We know arrays are fixed length, variable length. While working with DB2, the array must handle BLOB and CLOB (Binary large object and Char Large object)

You can see the syntax from IBM site [here](http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.db2.doc.apsg%2Fbjnqcobl2189515.htm).

## LATEST POSTS

[![30 SQL Practice Queries with Solutions — Run Them Live](https://i0.wp.com/srinimf.com/wp-content/uploads/2026/10/pexels-photo-5530473.jpeg?fit=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.

by [Srini](https://srinimf.com/author/moonrobot/)
October 1, 2026October 11, 2026

[![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?fit=1200%2C801&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!

by [Srini](https://srinimf.com/author/moonrobot/)
September 30, 2026October 10, 2026

[![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?fit=1200%2C800&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.

by [Srini](https://srinimf.com/author/moonrobot/)
September 27, 2026October 11, 2026

[![Databricks Cluster Min & Max: How to Find and Right-Size](https://i0.wp.com/srinimf.com/wp-content/uploads/2026/09/pexels-photo-10194141.jpeg?fit=1200%2C800&ssl=1)](https://srinimf.com/2026/09/19/databricks-cluster-min-max-how-to-find-and-right-size/)

## [Databricks Cluster Min & Max: How to Find and Right-Size](https://srinimf.com/2026/09/19/databricks-cluster-min-max-how-to-find-and-right-size/)

Learn how to find and audit Min and Max worker limits in Databricks, track real cluster usage via system tables, and prevent runaway compute costs.

by [Srini](https://srinimf.com/author/moonrobot/)
September 19, 2026October 10, 2026

Load more posts

Something went wrong. Please refresh the page and/or try again.

### 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%2F11%2F17%2Fcobol-2-things-you-may-not-know-about-arrays%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2012%2F11%2Fpexels-photo-131979.jpeg%3Ffit%3D1200%252C800%26ssl%3D1&description=COBOL%20Arrays%3A%20Two%20Things%20You%20Need%20to%20Know)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2012/11/17/cobol-2-things-you-may-not-know-about-arrays/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2012/11/17/cobol-2-things-you-may-not-know-about-arrays/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2012/11/17/cobol-2-things-you-may-not-know-about-arrays/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2012/11/17/cobol-2-things-you-may-not-know-about-arrays/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20COBOL%20Arrays%3A%20Two%20Things%20You%20Need%20to%20Know&body=https%3A%2F%2Fsrinimf.com%2F2012%2F11%2F17%2Fcobol-2-things-you-may-not-know-about-arrays%2F&share=email)
-

### Like this:

Like Loading…
