IBM had a mainframe wordprocessor called Displaywriter. Believe it or not, there are still clients who use this program in terminal emulation mode. Displaywriter (or DW3, DW4 etc) had a sophisticated programming language. It did “text forms” on a line-by-line screen, but it could handle a whole variety of commands. One of our clients only recently left such a system. We worked with the Nassau County District Attorney, first to map out the logic of the old system and then extract the content.
To give an idea of the pricing of such work. IBM was charging $5,000 a month to maintain a programmer in their office who could answer support calls, and suggested $25,000 just to come up with a proposal for converting the system. We did the complete project for less than the cost of the evaluation and a month or two of support.