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
 

 

Dynamic increase in internal table array size - COBOL

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

New User


Joined: 10 Jun 2008
Posts: 24
Location: india

PostPosted: Wed Feb 11, 2009 9:32 pm    Post subject: Dynamic increase in internal table array size - COBOL
Reply with quote

Hey, i have an internal working storage array which will hold the entire DB2 table records in it. Currently the internal table size is fixed to be of some X times size. Now the size of the actual DB2 table (number of records) has increased beyond the specified X number of records in array declaration size.

Is only the manual updation of internal table size in the COBOL module a remedy?

Can you recommend any ways that can automate the increase in internal table size declared in program relatively to the increase in number of records in DB2 table? Thanks in advance..
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Feb 11, 2009 9:43 pm    Post subject:
Reply with quote

Quote:
Is only the manual updation of internal table size in the COBOL module a remedy?
Yes, unless you want to cobble together a GETMAIN function and work in LINKAGE instead of WORKING STORAGE....
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Feb 11, 2009 11:16 pm    Post subject:
Reply with quote

Hello,

Suggest you come up with a new design. At some point the table will probably become too large to fit into an internal array. And then it will be a crisis. . . You and your management and users will surely be less than happy. . . icon_neutral.gif

It is almost always rather poor design to load an entire table into memory. . .
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Wed Feb 11, 2009 11:54 pm    Post subject:
Reply with quote

Dick's advice is good, but I have some questions. Are you using ALL of the DB2 columns or are you loading unused columns into your table? Will the DB2 table usually increase or will it ever decrease?
Back to top
View user's profile Send private message
pravinj

New User


Joined: 10 Jun 2008
Posts: 24
Location: india

PostPosted: Thu Feb 12, 2009 10:15 am    Post subject: Reply to: Dynamic increase in internal table array size - CO
Reply with quote

Thanks.
Module that i am working on is from vintage days icon_cry.gif . I cannot alter the module's design much.

It's a COBOL-BATCH module and they use internal array table to load the internal table using multifetch. The values in the internal array are later used at different points of the module multiple times. Now it's the situation that the array holding the DB2 records is overflowing which causes serious issues of leaving behind the vital information behind.

Instant solution is increasing the array size to an X. But this situation may incur again, so is there any design approach that could be handles to prevent this situation anymore.

Thompson,
Can you elaborate me on that? Am a new entrant here to this domain!
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 12, 2009 10:43 am    Post subject:
Reply with quote

Hello,

Quote:
so is there any design approach that could be handles to prevent this situation anymore.
You might consider using a temporary db2 table or 2 for this process. Instead of loading an in-core array, you would load this process-specific table and use it for the duraton of the process. When the process complets, the temporary table(s) would be dropped.
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
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 To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 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