| Deutsch English Français Italiano |
|
<vej4nu$16t39$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Dave Froble <davef@tsoft-inc.com> Newsgroups: comp.os.vms Subject: Re: Text processing on VMS Date: Mon, 14 Oct 2024 09:01:49 -0400 Organization: A noiseless patient Spider Lines: 60 Message-ID: <vej4nu$16t39$1@dont-email.me> References: <8734l0t56u.fsf@lucy.meyer21c.net> <veh45h$pplr$1@dont-email.me> <veh575$q0bo$1@dont-email.me> <veh6s8$pplq$1@dont-email.me> <670c8368$0$705$14726298@news.sunsite.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 14 Oct 2024 15:01:51 +0200 (CEST) Injection-Info: dont-email.me; posting-host="6e9f62bba9223445f16c7f6ec23df243"; logging-data="1274985"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/wZsBfhQxAsnhUyDss8h0d+COj7EfS1/8=" User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 Cancel-Lock: sha1:lHzEtPISfRt++E/UXtXdnwGGSSo= In-Reply-To: <670c8368$0$705$14726298@news.sunsite.dk> Bytes: 2552 On 10/13/2024 10:35 PM, Arne Vajhøj wrote: > 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 > Yes, I like to keep things very simple, otherwise it hurts my brain ... If I still have one, not sure ... -- David Froble Tel: 724-529-0450 Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com DFE Ultralights, Inc. 170 Grimplin Road Vanderbilt, PA 15486