Re: How do you search the word in a sequential file ?
- From: "Richard" <riplin@xxxxxxxxxxxx>
- Date: 30 May 2006 04:12:11 -0700
I have a sequential file. I want to search the word in a record.How
can i do ?
read each record in the file and for each record use INSPECT to count
the occurance of the word, or the number of characters before it.
Remember to zeroise the tallying variable before doing the inspect.
You may need to have the word you are search for in an occurs depending
on character array to enforce the size to search for.
Or you could use reference notation in a loop, make sure that you only
step through the data until the end of the word hits the end of the
record rather than the start of the word hitting the end of the record
as the latter would check characters beyond the record.
.
- References:
- How do you search the word in a sequential file ?
- From: badilus
- How do you search the word in a sequential file ?
- Prev by Date: Re: How do you search the word in a sequential file ?
- Next by Date: Re: PIC P put to real use
- Previous by thread: Re: How do you search the word in a sequential file ?
- Next by thread: Re: How do you search the word in a sequential file ?
- Index(es):