Sujet : Re: Text processing on VMS
De : arne (at) *nospam* vajhoej.dk (Arne Vajhøj)
Groupes : comp.os.vmsDate : 14. Oct 2024, 03:35:20
Autres entêtes
Organisation : SunSITE.dk - Supporting Open source
Message-ID : <670c8368$0$705$14726298@news.sunsite.dk>
References : 1 2 3 4
User-Agent : Mozilla Thunderbird
On 10/13/2024 3:26 PM, Arne Vajhøj wrote:
On 10/13/2024 2:57 PM, Dave Froble wrote:
Using SEARCH and then a simple Basic program is not that much work.
>
For example:
>
SEARCH File1.txt "some text" /output=File2.txt
>
1 On Error Goto 90
>
10 Open "file2" For Input as File 1%
Open "File2" For Output as File 2%
>
20 Linput #1%, Z$
Print #2%, Mid(Z$,?,?)
Goto 20
>
90 GoTo 99 If ERR=11
On Error GoTo 0
>
99 End
>
Simple
No having to know whatever is your favorite utility
I seriously doubt there would be much fewer characters
>
No, I didn't try it ...
I have confidence in your VMS Basic skills.
But I am curious about how you iterate over the file.
Are there any benefits from this way compared to:
handler eof_handler
end handler
when error use eof_handler
while 1 = 1
get #1
! do whatever
next
end when
?
Arne