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
 

 

can we search a flat file?

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

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Thu Mar 06, 2008 6:28 pm    Post subject: can we search a flat file?
Reply with quote

Hi,

We get some data from a GSAM file and we need to use certain information from this file to search a flat file and write out the records.

Is it possible to search the flat file without loading it into any internal array or table?

I am not able to make it out.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Thu Mar 06, 2008 8:57 pm    Post subject:
Reply with quote

Not in any reasonable fashion.
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Thu Mar 06, 2008 11:08 pm    Post subject:
Reply with quote

If I understand your question correctly - what you wanted to do is compare GSAM file (based on few fields/records) with another file.

Is this correct? If so then you can do this using SORT.
Back to top
View user's profile Send private message
earsha

New User


Joined: 16 Mar 2007
Posts: 17
Location: Pune

PostPosted: Mon Mar 10, 2008 1:27 pm    Post subject:
Reply with quote

yes sort will be a better option for this
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Tue Mar 11, 2008 5:41 pm    Post subject: examples !?
Reply with quote

Thank you.

Would you please put some examples here. icon_question.gif

TIA.
Back to top
View user's profile Send private message
raak

Active User


Joined: 23 May 2006
Posts: 166
Location: chennai

PostPosted: Thu Mar 13, 2008 12:52 pm    Post subject:
Reply with quote

If it is just to match the records from both the files and write the matched records from any file to the output, U can use SORT.

If u r using Syncsort, U can use the JOINKEYS option to do this..
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 165
Location: Bangalore

PostPosted: Mon Mar 17, 2008 6:58 am    Post subject:
Reply with quote

however, if your requirement is to search the flat file. you may opt for loading the flat file into a working storage table (ofcourse iff the size of the file is not that large) to get it searched on the table.
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Thu Apr 10, 2008 7:38 am    Post subject:
Reply with quote

DFSORT allows substring searches which search whole records for strings. I have a cobol program I use too in case I want to search multiple datasets. It's pretty fast enough for my needs.
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: Thu Apr 10, 2008 7:53 am    Post subject: Re: can we search a flat file?
Reply with quote

mf_user wrote:
We get some data from a GSAM file and we need to use certain information from this file to search a flat file and write out the records.
Is it possible to search the flat file without loading it into any internal array or table?
Yes, but as the saying goes, "there is more than one way to skin a cat".....
mf_user wrote:
]Would you please put some examples here.Would you please put some examples here.
Sure, if you will think about your requitements and be a little (a lot?) more descriptive of exactly what you are looking for.....
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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


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