Deutsch   English   Français   Italiano  
<vegofl$l211$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!3.eu.feeder.erje.net!feeder.erje.net!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Chris Townley <news@cct-net.co.uk>
Newsgroups: comp.os.vms
Subject: Re: Text processing on VMS
Date: Sun, 13 Oct 2024 16:20:20 +0100
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <vegofl$l211$1@dont-email.me>
References: <8734l0t56u.fsf@lucy.meyer21c.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 13 Oct 2024 17:20:22 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="dfe71e63e7537fb522cf21ac441aafc1";
	logging-data="690209"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/bMvqxmFg4/7Gug+botWFOBFCQe3ACgpI="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:P3Lsyncd3NjoXEZ0EXWXmCUno3g=
Content-Language: en-GB
In-Reply-To: <8734l0t56u.fsf@lucy.meyer21c.net>
Bytes: 1771

On 13/10/2024 16:04, David Meyer wrote:
> 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? ;)
> 

I have often done this in this manner:

Search file for matching records to second file.
Read through in a DCL loop, and use f$locate to find the string, then 
f$extract to extract what I want, then write to a third file.

-- 
Chris