IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Search all is giving less records as compare to search


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ppandey07

New User


Joined: 27 Nov 2008
Posts: 51
Location: Delhi, India

PostPosted: Thu Nov 05, 2009 8:56 am
Reply with quote

Bill O'Boyle wrote:
Keep in mind that your WS table is around 5MB.

I imagine you've defined it this large because of the unknown number of records on the file?

So (for example), if you only use 10% of this table, then you'd be wasting 4.5MB icon_eek.gif

Is this a VSAM (KSDS/ESDS) or sequential (Non-VSAM) flat-file?

Bill


This is sequential (Non-VSAM) flat-file.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


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

PostPosted: Thu Nov 05, 2009 5:10 pm
Reply with quote

If you can inform the COBOL program of the number of records on the file, then you can define the ARRAY to LINKAGE and then use LE Callable Service routine 'CEEGTST' to obtain the correct amount of storage needed for the ARRAY.

You can define the ARRAY as a true ODO (Occurs Depending On) with the DEPENDING ON being a Binary-Fullword defined just above the actual ARRAY definition, within the "01" definition.

Example -

Code:

01  LS-ARRAY-REC.
    03  LS-ARRAY-NBR-RECS PIC S9(09) BINARY.
    03  LS-ARRAY OCCURS 1 TO 99999 TIMES
                 DEPENDING ON LS-ARRAY-NBR-RECS
                 INDEXED BY X-LS-AR, X-LS-AR-MAX
                 PIC  X(52).

So, for example, if the number of file-records was 100, the amount of dynamic-storage needed would be (Record-Length * Number-of-Records) + LENGTH OF LS-ARRAY-NBR-RECS.

Bill
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
Search our Forums:

Back to Top