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

can we search a flat file?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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
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
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
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
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Thu Apr 10, 2008 7:38 am
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: 2146
Location: At my coffee table

PostPosted: Thu Apr 10, 2008 7:53 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top