Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 6966
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: 2502
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
No new posts loading a Modified Mapset Susanta CICS 2 Tue Mar 14, 2017 5:43 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us