Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to use Dynamic array in my cobol code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Thu Oct 05, 2006 6:03 pm    Post subject: How to use Dynamic array in my cobol code
Reply with quote

Hi,

I have requirement to use Dynamic array in my cobol code.

I have declared my array as follows:

01 ARRAY-REC
03 ARRAY-CNT PIC S9(4) COMP.
03 ARRAY-FIELDS OCCURS 1 TO 2000 TIMES
DEPENDING ON ARRAY-CNT
INDEXED BY IN-INDX.
05 ARRAY-FLDS PIC X(1500).

This array will be used to store the records read from file. While reading the records i verify to the particular transaction then only i will store into this. So i don't know how much big table will be until or otherwise i read.

So can you tell me where to increment ARRAY-CNT or should i initialize with some count. Please clarify me.

As of now I am incrementing this count before each move to this Array.I have similar type of 3 more arrays. It is giving me insufficient storage error.

Can you help me out?

Thanks in advance
Noor
Back to top
View user's profile Send private message

MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Thu Oct 05, 2006 8:11 pm    Post subject: Re: Dynamic Array
Reply with quote

Under manuals listed in this forum refer to

VS COBOL II Programming Guide section 3.6.4.4 Complex OCCURS DEPENDING ON

Hope this helps.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
This topic is locked: you cannot edit posts or make replies. Cobol GUI (like Editor) Kala Mainframe COBOL Programming 14 Wed May 10, 2017 12:30 pm
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us