Operating System - OpenVMS
1753925 Members
8485 Online
108810 Solutions
New Discussion юеВ

Re: EDT Editor - Deletion of characters in a line

 
SOLVED
Go to solution
Ian Miller.
Honored Contributor

Re: EDT Editor - Deletion of characters in a line

I still use line mode in EDT for the situation previously described and when working on 20 year old MicroVAXes with little memory (I know teco is even more efficent than EDT for memory use but I remember very few teco commands now due to personal memory degredation :-)

I would use DCL for the original question in this thread.
____________________
Purely Personal Opinion
Uwe Zessin
Honored Contributor

Re: EDT Editor - Deletion of characters in a line

I use EDT for minimal changes on small files, because the startup time is much shorter than TPU and I use line-mode EDT, too.

Many years ago I used DCL to create EDT command files in a migration project that required changes to 300+ source files. That was much more efficient than trying to learn TPU again (I did a lot of TPU programming when VAX/VMS V4.x was current, but all that is gone now).
.
Martin Vorlaender
Honored Contributor

Re: EDT Editor - Deletion of characters in a line

Robert,

>>>
Or is there a "standard" workaround for getting any console into a working VT setup after a minimum boot, or even a manual startup boot (set /startup=OPA0:)
<<<

...on a graphic terminal, I suppose.

I think Fred Kleinsorge mentioned in comp.os.vms that most graphics drivers have a crude VT52 emulation built in. I have no idea whether that would be enough for EVE.

cu,
Martin
Uwe Zessin
Honored Contributor

Re: EDT Editor - Deletion of characters in a line

$ set terminal/vt52
$ edit/tpu login.com
%TPU-E-NONANSICRT, SYS$INPUT must be supported CRT
.
Willem Grooters
Honored Contributor
Solution

Re: EDT Editor - Deletion of characters in a line

Since it's a listing, it's a plain ASCII file.

You could consider using DCL:

$ open/read IN
$ open/write OUT (or .CBL?)
$loop:
$ SRCLINE=""
$ read/end=endloop IN LISLINE
$ if f$length(LISLINE) .gt. 9 then -
SRCLINE = f$extract (9, g$length(LISLINE), LISLINE)
$ write OUT SRCLINE
$ goto loop
$endloop:
$ close OUT
$ close IN
$ exit

Willem
Willem Grooters
OpenVMS Developer & System Manager
John Travell
Valued Contributor

Re: EDT Editor - Deletion of characters in a line

Another bullet point for EDT.
I once had a customer with an unrecoverable system hang. The real problem was that he had set his pagefile quota to more than half the size of the pagefile, but this would not have been an issue had he not tried to use TPU to edit some truly huge files. IIRC they were log files somewhere around 250,000 blocks.
The problem is that TPU reads the entire file into memory. Once the working set has grown as far as VMS will let it, the file content gets cycled through memory into the pagefile.
This would all have been OK if 'Mr Customer' had been more patient. TPU seemed to be taking a very long time to 'start up' (reading 200+k blocks and writing most of it back to the pagefile, which happened to be on the same disk, takes quite a while on the machine in use) so he started a new TPU edit in a new session. The machine hung, solid, with no free pages in memory and no free blocks in the pagefile...
Doing this with EDT may well have been less efficient, but it would not have taken VMS down !

JT:
Jan van den Ende
Honored Contributor

Re: EDT Editor - Deletion of characters in a line

@John Travel:

1st: EDT would simply have halted, but indeed, it would NOT have hung the system
2nd: TPU/READ is MUCH better at "just scanning" such files! (but, yeah, you have to THINK beforehand, which tends to be quite hard).

fwiw,

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Antoniov.
Honored Contributor

Re: EDT Editor - Deletion of characters in a line

Hi,
I also use EDT just for memory degradation; I prefer to learn something other than another editor. However, sometimes, I have to use TPU when for file with line larger than 255 characters; I set key edt and continue.
For this question, I prefer a dcl procedure. Willem, I think there is a little bug in your example; if line is shorter than 9 character you write previous extracted line.
But your example is how I solve this problem.

Antonio Vigliotti
Antonio Maria Vigliotti
Willem Grooters
Honored Contributor

Re: EDT Editor - Deletion of characters in a line


Antonio:
No, there isn't: SRCLINE is cleared at beginning of loop, befeore listing is read.

Yet, I agree it could well be enhanced (no error handling except EOF, for instance) and it might be optimezed. But I'd leave something for the user to do :-D

On EDT/EVE (EDT/TPU): It's a matter of personal taste. Of course, your primary choice will be the one you're most comfortable with.

being a developer, I normally use TPU and set keypad to EDT - even on an old, low-mem(64Mb) and low_disk (1Gb) DEC3000, since I'm used to it. It has rich features (causing a big memory footprint): uing a combination of an initialisation and section files has eanbled me (in the past) to incoprorate a rather big number of identical changes in a huge number of sources files - in batch. I couldn't have done this with good old EDT.

But it's good to know EDT in line mode as well. It's handy when you have an unsupported terminal type.

(Who would like a GUI-based editor on VMS? Would be fun on a character-cell terminal...)

Willem
Willem Grooters
OpenVMS Developer & System Manager
Uwe Zessin
Honored Contributor

Re: EDT Editor - Deletion of characters in a line

I've played a bit with
$ EDIT/TPU /INTERFACE=DECWINDOWS
but its overhead was even higher. Not fun on a small VAXstation.
.