View previous topic :: View next topic
|
Author |
Message |
rupesh gullu
New User
Joined: 12 Dec 2008 Posts: 96 Location: Gurgaon
|
|
|
|
hi ,
in my file i have 3000 records and i have declared a table with 2000 occurs in cobol program .
when i tried to load the table, will all the record get processed or only first 2000 record will be loaded in table and processed
regards,
rupesh gupta |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
well let's see now:
3000 records in file
2000 occurs in table
==================
1000 records without a home. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
rupesh gullu wrote: |
will all the record get processed or only first 2000 record will be loaded in table and processed |
That depends on what your program does when it reads the 2001st record....... |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
You could either write a callable REXX routine, which issues a LISTDSI command or write a small callable Assembler sub-program, which issues a SHOWCB Macro.
In either case, the number of records on the file is returned to you.
Then, in your COBOL program, calculate the amount of storage you'll need by multiplying the NUMBER OF RECORDS by the file's LRECL. Use this calculated storage amount as a parameter to call LE Callable Storage routine CEEGTST and dynamically obtain the required storage.
Note that the table would have to be moved to LINKAGE, but, dynamically allocating the storage will potentially remove the possibility of the internal table from ever being too small.
Regards, |
|
Back to top |
|
|
|