Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Maximum no of records that can load in cobol internal table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Maximum no of records that can load in cobol internal table
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Tue Jan 15, 2008 6:26 pm    Post subject: Reply to: Limit of the Table
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 ===> http://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    Post subject: no of records depends on memory???
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    Post subject: Re: no of records depends on memory???
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    Post subject: i dont understand
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    Post subject:
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    Post subject:
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    Post subject: Hay its not exactly what i need...
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: 6968
Location: porcelain throne

PostPosted: Tue Jan 15, 2008 7:18 pm    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

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

Compiler limits:
http://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    Post subject:
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

Site Director


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

PostPosted: Wed Jan 16, 2008 3:44 am    Post subject:
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    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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Update table without cursor Ron Klop DB2 3 Wed Oct 11, 2017 1:06 pm
No new posts Table(Unicode(Graphic) table) loading... muralikrishnan_new DB2 0 Thu Oct 05, 2017 5:10 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us