Deutsch English Français Italiano |
<veh7kb$qb7q$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Stephen Hoffman <seaohveh@hoffmanlabs.invalid> Newsgroups: comp.os.vms Subject: Re: Text processing on VMS Date: Sun, 13 Oct 2024 15:38:51 -0400 Organization: HoffmanLabs LLC Lines: 34 Message-ID: <veh7kb$qb7q$1@dont-email.me> References: <8734l0t56u.fsf@lucy.meyer21c.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 13 Oct 2024 21:38:52 +0200 (CEST) Injection-Info: dont-email.me; posting-host="ada6875296c4eb335822527388ae8fa9"; logging-data="863482"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jwhp4fp1kol0YO5xFETJsPOtYWabHzW0=" User-Agent: Unison/2.2 Cancel-Lock: sha1:KrbKAuqGIB51O7LLSJ5qW54i+AA= Bytes: 2239 On 2024-10-13 15:04:25 +0000, David Meyer said: > I've got a text file with data that I want to select lines matching > certain character strings, then extract string values from the selected > lines by character position. On Unix, I would use awk or Perl. Does VMS > have a similar tool, should I use my favorite programming language and > call the STR$ RTL, can I write a TPU script to do this, or should I > transfer the file to a Unix box and user awk or Perl? ;) One-shot task? Haul it over to an existing and working Unix, and "awk to it" there. It'll be easier, generally. Easier, particularly if the text file contains UTF-8, though this file is from OpenVMS so probably not. For production use? Other folks have listed various options to perform this task on OpenVMS. Another option that seemingly wasn't mentioned is installing and using GNV on OpenVMS. Obligatory vim and emacs reference. The least-accretive and easiest-to-hand-off-to-others option on OpenVMS is approximately a DCL LOOP: / READ / WRITE / GOTO LOOP procedure. Which is a slog if unfamiliar with DCL, but is entirely doable. If this file has some sort of internal organization or syntax, use of a lib$table_parse grammar can be an option. -- Pure Personal Opinion | HoffmanLabs LLC