Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!germany.CSNET!F1142S30%unika2
From: F1142S30%unika2@germany.CSNET (Juergen Renz)
Newsgroups: comp.os.vms
Subject: Re: utility to truncate trailing blanks wanted
Message-ID: <8707251130.AA09347@ucbvax.Berkeley.EDU>
Date: Sat, 25-Jul-87 11:07:00 EDT
Article-I.D.: ucbvax.8707251130.AA09347
Posted: Sat Jul 25 11:07:00 1987
Date-Received: Sun, 26-Jul-87 00:40:11 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Distribution: world
Organization: The ARPA Internet
Lines: 44


Peter Marshall asks:
> Is there a utility for VMS that truncates trailing blanks from a fixed line
> length file?  On our Tops-10 system we did it with PIP.  I was hoping for a
> switch to type or copy or convert, but I can't see anything.

I have the same problem from time to time. My solution then is a litte
EDT command file:

$ create untrail.edt
! don't skip one blank in the first line
set search end
! remove all spaces at the end of lines
change;32000(s/ ^M/^M/-bl)ex
exit

Note:   ^M is the ascii representation for 13 (decimal).
        You can insert this control character in an EDT session with:
          13    <3>

        13           are the numeric keys 1 and 3
        <3>          is on the (righthanded) application keypad
          <3>   calls the function SPECINS

Call the EDT with the following command:

$ edit/edt/command=untrail  infile /output=outfile

Attention:   This command file will not work correct if

             - there are lines longer than 255 characters in the file
               (edt cannot read such long records)

             - there are  characters inbetween a line,
               (these are converted to a newline)

P.S.:  There is a better way doing it with a TPU procedure, but I havn't
       much experience in TPU language. Maybe in future I will write one,
       or is there anybody else, who has such a thing ?

Juergen Renz                                        Universitaet Karlsruhe
Falkengarten 7                                      Institut fuer Informatik IV
D-7530 Pforzheim
West-Germany