View previous topic :: View next topic
|
Author |
Message |
sasikumar1984
Active User
Joined: 02 Jul 2007 Posts: 109 Location: Chennai - India
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
sasikumar1984
Active User
Joined: 02 Jul 2007 Posts: 109 Location: Chennai - India
|
|
|
|
hi Bill,
Is no of records to load in cobol internal table is depends on memory???
Regards,
Sasikumar.K |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
sasikumar1984
Active User
Joined: 02 Jul 2007 Posts: 109 Location: Chennai - India
|
|
|
|
Hi Craq,
I dont understand ur reply.. can u pls explain.
Regards,
Sasikumar.K |
|
Back to top |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
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 |
|
|
sasikumar1984
Active User
Joined: 02 Jul 2007 Posts: 109 Location: Chennai - India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
|
|
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 |
|
|
stodolas
Active Member
Joined: 13 Jun 2007 Posts: 631 Location: Wisconsin
|
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|