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
 
loading record in a fixed length table in cobol

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

New User


Joined: 12 Dec 2008
Posts: 96
Location: Gurgaon

PostPosted: Fri Feb 13, 2009 6:00 pm    Post subject: loading record in a fixed length table in cobol
Reply with quote

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
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Feb 13, 2009 6:18 pm    Post subject:
Reply with quote

well let's see now:
3000 records in file
2000 occurs in table
==================
1000 records without a home.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Fri Feb 13, 2009 6:45 pm    Post subject: Re: loading record in a fixed length table in cobol
Reply with quote

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
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Fri Feb 13, 2009 10:56 pm    Post subject: Reply to: loading record in a fixed length table in cobol
Reply with quote

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
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 to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm

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