Terminate that TERM Command
Migrating applications to OpenInsight 10 is typically an adventure. There are always unique aspects of each client’s system that add a spice of excitement and challenge to each endeavor. However, ARev32 to ARev64 migrations have traditionally been fairly routine. Unlike some OpenInsight entities, the application components in ARev (e.g., WINDOWS, POPUPS, MESSAGES, etc.) have not had their internal structures changed, so they tend to just migrate “as is” without issue. However, a recent migration threw us a curveball that took a bit of effort to resolve.
The problem that manifested itself was a visual one:
The perceptive reader might notice that this ARev64 window is being displayed with more than the normal 25 rows (43 in this case). We discovered that this visual oddity only occurred in the migrated application. When we launched ARev64 from SYSPROG or EXAMPLES, it displayed as expected:
We switched back to a Video Display Mode of 25 rows. All applications displayed as expected. Therefore, something that only existed in the migrated application was unhappy with extended height configurations.
It didn’t take long for us to figure out that this visual havoc was likely due to a migrated VOC record. To confirm, we attached the original VOC that ships with ARev64. Sure enough, ARev64 displayed as it was meant to. Now we needed to figure out what record(s) were giving us grief.
Our first thought was to inspect the logon records and then perhaps trace the routines that were being called. Zilch. So much for a slam dunk.
With over 1,500 VOC records, we decided to just use good ole’ fashioned divide and conquer. We began copying records over in batches (based on the first character) and then launch ARev64. If everything looked good, then we would close ARev64 and move on to the next batch. Rinse and repeat.
After copying the “T” records we finally witnessed the problem. There were only 37 records which meant it would be relatively easily to isolate. We deleted these records and began to copy them over one at a time. This led us to the culprit: TERM.
So, what is TERM? Originally it was the VOC pointer to V123, which is used to read or modify the terminal communication parameters. While no longer applicable to ARev32, the VOC pointer was kept, along with TERMINAL (a pointer to V122). Both of these pointers seem to have been sensibly removed from ARev64.
What makes this mysterious is that having the TERM pointer in ARev32 does not appear to create any visual oddities but once it has been introduced into ARev64 it creates an issue. This led us to conclude that TERM is being called upon initialization. We are not certain why this is, but it suggests there must be a compiled TERM routine. Sure enough, there is. In fact, if you remove the TERM pointer from VOC and enter the TERM command, you’ll get a display of the environment width and height settings for the screen and printer.
Leave a Reply