| Author |
How do you search the word in a sequential file ?
|
|
| badilus 2006-05-30, 7:55 am |
| I have a sequential file. I want to search the word in a record.How
can i do ?
| |
|
| In article <1148983984.749755.246140@38g2000cwa.googlegroups.com>,
badilus <gkolanci@gmail.com> wrote:
> I have a sequential file. I want to search the word in a record.How
>can i do ?
Please do your own homework.
DD
| |
| Richard 2006-05-30, 7:55 am |
| > 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.
| |
|
| I rarely post on this site, but I seem to constantly see you answer
many posts with do your own homework. Why do you bother? If someone
comes here s ing guidance or help why not just answer them?
| |
| Binyamin Dissen 2006-05-30, 7:55 am |
| On 30 May 2006 03:13:04 -0700 "badilus" <gkolanci@gmail.com> wrote:
:> I have a sequential file. I want to search the word in a record.How
:>can i do ?
Use REXX or Perl.
--
Binyamin Dissen <bdissen@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
| |
| Binyamin Dissen 2006-05-30, 7:55 am |
| On 30 May 2006 05:49:36 -0700 "Jeff" <jmoore207@hotmail.com> wrote:
:>I rarely post on this site, but I seem to constantly see you answer
:>many posts with do your own homework. Why do you bother? If someone
:>comes here s ing guidance or help why not just answer them?
Why did you bother responding with a complaint?
Why aren't you helping?
--
Binyamin Dissen <bdissen@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel
Should you use the mailblocks package and expect a response from me,
you should preauthorize the dissensoftware.com domain.
I very rarely bother responding to challenge/response systems,
especially those from irresponsible companies.
| |
|
| Sorry, I thought Richard's explanation would suffice. I just find it
ridiculous that Doc answers so many posts with that nonsense. Thank you
Richard for helping badilus out. Have a nice day Dissen.
| |
| Howard Brazee 2006-05-30, 7:55 am |
| On 30 May 2006 05:49:36 -0700, "Jeff" <jmoore207@hotmail.com> wrote:
>I rarely post on this site, but I seem to constantly see you answer
>many posts with do your own homework. Why do you bother? If someone
>comes here s ing guidance or help why not just answer them?
The best way to learn is by doing. Whenever someone comes to this
forum showing what he has tried and what his results have been, that
person has gotten guidance - without a subsequent "do you own
homework" admonition.
DocDwarf agrees with the teacher that the best way to educate people
is for them to do their own homework. And the best employees to hire
are those who have experience solving their own problems.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
| |
| Howard Brazee 2006-05-30, 7:55 am |
| On Tue, 30 May 2006 15:53:40 +0300, Binyamin Dissen
<postingid@dissensoftware.com> wrote:
>:> I have a sequential file. I want to search the word in a record.How
>:>can i do ?
>
>Use REXX or Perl.
grep?
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
| |
|
| In article <1148993376.936133.172530@i40g2000cwc.googlegroups.com>,
Jeff <jmoore207@hotmail.com> wrote:
>I rarely post on this site, but I seem to constantly see you answer
>many posts with do your own homework. Why do you bother?
I bother because I have found that getting into the habit of doing one's
own homework can help in making Good Things to happen... and it pleases
me, at times, when Good Things happen to people.
>If someone
>comes here s ing guidance or help why not just answer them?
I *do* answer them... with some of the guidance that has helped me.
DD
| |
| William M. Klein 2006-05-30, 6:55 pm |
| Assuming that this was NOT a homework assignment, I suspect that I agree with
the spirit of Binyamin's suggestion. COBOL does have some "string" handling
facilities and you CAN use INSPECT with it, but if you are going to be doing
much "text manipulation" in your business/application, then there is PROBABLY a
better tool than COBOL. (I am not saying you can't do it in COBOL, just that
there are better tools for doing it - IMHO)
--
Bill Klein
wmklein <at> ix.netcom.com
"Binyamin Dissen" <postingid@dissensoftware.com> wrote in message
news:02go72dqk1afv6b7ds67707kbfconm6gvg@
4ax.com...
> On 30 May 2006 03:13:04 -0700 "badilus" <gkolanci@gmail.com> wrote:
>
> :> I have a sequential file. I want to search the word in a record.How
> :>can i do ?
>
> Use REXX or Perl.
>
> --
> Binyamin Dissen <bdissen@dissensoftware.com>
> http://www.dissensoftware.com
>
> Director, Dissen Software, Bar & Grill - Israel
>
>
> Should you use the mailblocks package and expect a response from me,
> you should preauthorize the dissensoftware.com domain.
>
> I very rarely bother responding to challenge/response systems,
> especially those from irresponsible companies.
| |
| Peter Lacey 2006-05-30, 6:55 pm |
| Jeff wrote:
>
> I rarely post on this site, but I seem to constantly see you answer
> many posts with do your own homework. Why do you bother? If someone
> comes here s ing guidance or help why not just answer them?
I'm in accord with Doc on this one. If someone posts a request for help
without showing what s/he's tried already, then I'm inclined to be short
with that person. It's the difference between "how do you do this" and
"is this the way to do it". If someone puts the question to me in the
latter form then I'll spend a great deal more time with them on the
problem.
My attitude is soured by years of experience; typically the "how do I do
it" types were also the ones that replaced a 300-page manual with a
ten-page update and then wondered why I was annoyed; they were also the
ones that would complain to my boss that they got "absolutely no
support" from me when I would ask to see what they'd tried. One such
lot baffled me completely when I found they'd used a linker control
format for a librarian run and wondered why it wouldn't work!
PL
| |
| Rick Smith 2006-05-30, 6:55 pm |
|
"Peter Lacey" <lacey@mts.net> wrote in message
news:447C6F52.B47EAA50@mts.net...
[snip]
> It's the difference between "how do you do this" and
> "is this the way to do it".
This is *my* way. What is *your* way? There is no
*the* way! -- Dr Wayne Dyer (as heard on audio tape)
|
|
|
|