During the development of the T[erminal Multi-Line Command Editor](https://community.intersystems.com/post/terminal-multi-line-command-editor) I discovered in my IRIS installation a piece of software that I just can classify as a historic artifact. And it is still fully operational !!! As it dates back to times before InterSystems was founded in 1978 you may understand my surprise. I personally stepped into that environment in 1978 and used it then for daily work. First some short explanation or the environment: The machine had 128 kBytes of memory and an [RK05](https://en.wikipedia.org/wiki/RK05) drive with ~2.5 MBytes capacity. Routines at that time were not compiled but interpreted. All .obj,.int,.mc.,cls, .... showed up much later when a compiler was developed. Actually .int routines describe best what was the unique format at that time. Writing a routine was essentially writing lines of code into your partition and then saving it on disk. The related commands were * [PRINT](https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=RCOS_cprint) to show a routine on terminal * [ZLOAD](https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=RCOS_czload) to fetch a routine from disk into your partition * [ZSAVE](https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=RCOS_czsave) to save a routine on disk * [ZINSERT](https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=RCOS_czinsert) to insert a single line into a routine in your partition * [ZREMOVE](https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=RCOS_czremove) to remove lines from your routine in your partition * [$TEXT()](https://docs.intersystems.com/iris20201/csp/docbook/Doc.View.cls?KEY=RCOS_ftext) to read a line of your routine into a variable They already existed and they survived until today also in the latest IRIS versions. As you had to use your partition to compose your routine there was no other place to run some program for editing your code. You had to edit it from the terminal prompt by endless sequences of ZRemove, ZInsert intermixed with Print. CRT-Terminals at that times had 20 rows by 72 columns ([VT05](https://en.wikipedia.org/wiki/VT05)) - then 12 rows and 80 columns ([VT50](https://en.wikipedia.org/wiki/VT50)) - then 24 rows and 80 columns ([VT52](https://en.wikipedia.org/wiki/VT52)), ([VT100](https://en.wikipedia.org/wiki/VT100)), ([VT220](https://en.wikipedia.org/wiki/VT220)) None of them had something like a scroll buffer. Display of line 24 made line 1 go away as you still required an input line. In addition to remember: there was no Copy/Paste available yet. So changes of a routine of more than 23 lines were almost impossible without a print-out. And still then a quite typing intensive exercise.
BUT:
There was an editor that allowed shifting of lines, in-line editing, ...
Just all you might expect from an average routine editor.
To achieve this without destroying the content of your partition its
whole code was just run by XECUTE commands (with no parameter passing at that time)
The trick is that all commands come from variables and never touch the routine loaded locally.
The editor was started by XECUTE ^% and was homed in namespace %SYS.
And that was my big surprise:
It is still there and operational --- also in my latest version of IRIS
I was almost incredible to see that this tool from the first days is still there and still works as in the past.
I find it remarkable especially with our technology to have such a long lifecycle.
Well, it has its limits:
- It just operates on .INT routines.
- it doesn't run in WebTerm as there is just no free partition to load your routine
- its input displays sometimes in the middle of your terminal if you have more than 24 lines visible.
This is just a limit set in your terminal configuration.
Set it to 99 lines and input is always on end of screen.
I'm pretty sure the tool is rather unknown, so here are the available functions:
BTW:
Reading and interpreting the code in global ^% is an excellent training to understand what ObjectScript does.