IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Maximum no of records that can load in cobol internal table


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sasikumar1984

Active User


Joined: 02 Jul 2007
Posts: 109
Location: Chennai - India

PostPosted: Tue Jan 15, 2008 6:17 pm
Reply with quote

Hi All,

I have a dataset which contains records more than 1000 and total no of records keep changes everyday... sometimes i get 12000 also. I use this file to find matching records for some other file. I have loaded this file in cobol inernal table saying occurs 1 to 20000 time depending on index variable. If suppose i get 25000 records, will my job go down or will it over write the records??? please let me know.. i need this asap.

Also tell me what is the maximum no of records that i can load in cobol internal table??? please guys. just help on this.

Regards,
Sasikumar.K
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Tue Jan 15, 2008 6:26 pm
Reply with quote

Sasikumar,

What is your version/release of COBOL?

OS/VS COBOL is limited to 128K bytes, whereas COBOL2 and greater (but not including Enterprise), the limit is 16777215 (16MB-1) bytes.

Enterprise is much greater and you'd have to look that up on your own.

You'll find this in the "Compiler Limits" section of the appropriate manual.

Book Manager ===> publib.boulder.ibm.com/cgi-bin/bookmgr/library

Regards,

Bill
Back to top
View user's profile Send private message
sasikumar1984

Active User


Joined: 02 Jul 2007
Posts: 109
Location: Chennai - India

PostPosted: Tue Jan 15, 2008 6:29 pm
Reply with quote

hi Bill,

Is no of records to load in cobol internal table is depends on memory???


Regards,
Sasikumar.K
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jan 15, 2008 6:31 pm
Reply with quote

sasikumar1984 wrote:
hi Bill,

Is no of records to load in cobol internal table is depends on memory???


Regards,
Sasikumar.K


Yes, only load he data that you need.
Back to top
View user's profile Send private message
sasikumar1984

Active User


Joined: 02 Jul 2007
Posts: 109
Location: Chennai - India

PostPosted: Tue Jan 15, 2008 6:37 pm
Reply with quote

Hi Craq,

I dont understand ur reply.. can u pls explain.

Regards,
Sasikumar.K
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jan 15, 2008 6:43 pm
Reply with quote

Better yet, sort the file in JCL before the program runs and since you are matching to another file, make sure that is sorted as well then do a standard two file read and compare.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jan 15, 2008 6:44 pm
Reply with quote

Reading a whole file into memory is usually a consumption of resource that isn't needed. Read one record at a time from each file when looking for matches.
Back to top
View user's profile Send private message
sasikumar1984

Active User


Joined: 02 Jul 2007
Posts: 109
Location: Chennai - India

PostPosted: Tue Jan 15, 2008 6:49 pm
Reply with quote

Hi Guys,

Sorting and matching logic i have taken care...

I just wanted to know if i get more than 20000 (i have given in my program occurs 1 to 20000 times depending on index variable) records in my input file, will my job go down while loading in cobol internal table or will it over write the records which its already loaded. i.e when coming to load 20001 record will it over write 1st record??? this is what i need.. and let me know what is the maximum number of records i can load in cobol internal table???


Regards,
Sasikumar.K
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jan 15, 2008 7:18 pm
Reply with quote

index variable???? what is this?

will 20001 write over 1? no, it will either write over unallocated memory for item 20001 and give you a SOC4/7 if you have SSRANGE on or will just plod thru memory if not.
****************************************************
max num records loaded into a cobol internal table?

well, first they are called items, not records. and if you look at the progmg guide for the cobol that you are using, the limits are listed.
****************************************************

i realize your knowledge rudimental and your experience is limited, but, if you want help from people change your attitude. nobody here is related to you nor has to listen to your tantrums.
*******************************************************
as far as the 200001 problem, change your odo to 10 and load 11 for a quick test. you will be provided an answer, based on your site setup, your cobol version.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jan 15, 2008 7:21 pm
Reply with quote

You are doing it wrong. Because you are using such large tables, you should just be reading one record at a time from a sorted file, using the file as your table... NOT INTERNAL STORAGE. As Craq said if you must load all the records (this is just stupid if you don't need to) then only load the set of records you need at one time. Load the first 5000, work with that, then the next 5000.

Your result is indeterminate if the number of records exceeds the number of rows in your table. Have you looked in the manual that Bill pointed you to, or are you just being lazy and hoping we do it for you? It gives limits for tables, indexes, etc.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Tue Jan 15, 2008 7:25 pm
Reply with quote

Here I'll help so you don't have to search the manual by yourself.

Compiler limits:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/IGY3LR10/APPENDIX1.2?DT=20020920180651
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Jan 15, 2008 8:00 pm
Reply with quote

Actually what I was saying was to load only the fields that are needed not necessarily the whole record. I can't believe the entire record is being compared for a match.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Wed Jan 16, 2008 3:44 am
Reply with quote

Hello,

Trying to load all or part of a entire file into memory to compare against some other file is usually the least acceptable way to approach the requirement. This approach usually proves to be un-maintainable (the volume will very likely become too great at some time) as well as wasting an exteme amount of system resources. If the organization performs any sort of code review or looks at the statistics for resources used to run the process, it would typically not be promotable to production and would have to be redone anyway.

The preferred approach is to use a 2-file match/merge bit of code. Near the top of this COBOL forum is a "sticky" that has sample code that will work for most requirements.

If you review that sample code and have any questions, please post them here and we can clarify.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Load new table with Old unload - DB2 DB2 6
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top