Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Search all is giving less records as compare to search
Goto page Previous  1, 2
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Re: Reply to: Search all is giving less records as compare t
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: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Nov 05, 2009 5:10 pm    Post subject: Reply to: Search all is giving less records as compare to se
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Compare two files logic in COBOL Nishant Singhal COBOL Programming 4 Sun Aug 25, 2019 2:25 am
No new posts Search the strings present in ps file... Bhuvana Narasimhan All Other Mainframe Topics 8 Thu Aug 22, 2019 8:20 pm
No new posts Compare duplicate records in same file pshongal DFSORT/ICETOOL 3 Fri Aug 09, 2019 9:37 am
No new posts How to count duplicate key records co... sergeyken SYNCSORT 0 Thu Jul 25, 2019 8:03 pm
No new posts Sort records within a data block rajiv rengasamy DFSORT/ICETOOL 0 Fri Jul 12, 2019 3:25 pm

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