Cobol-2 things You may not Know about Arrays

There are few things still everyone need to know about an array.

  • Arrays have multiple benefits. While reading an i/p file in batch process
  • the only way we can store data internally is with arrays. So the data can be used for logical processing within the program

Important points are:

  1. 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’

2. 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.

Have Something to Say? Post Your Comment

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s