Multi-Line Edit Oddities

PMTRCD and using the Multi-line option - Some limitation


UPDATE: 06/12/2025 - Linked to a summary post dedicated to deep dive long form posts.

Today I helped a colleague (a very talented one at that) with a small issue around a PMTRCD and usage of multi-line edit for oversized fields.  Something he hadn't seen before.

He was confused as to why his data entry field was showing on the device design and not showing when executed.

Figure 1 shows a mock up of his device design looking pretty standard.

Screen Edit Mode

Figure 2 shows the same screen at run-time.  Note the cursor has positioned to the field acting strangely but the underline is not showing.

Runtime PMTRCD

If you want to recreate this issue I created a file as follows (See Figure 3 and 4) :-

Recreation steps


Additionally, in the device design we set the long field to multi-line Y and set it to 4 rows and 50 wide.

To resolve the issue was a case of applying a (clearly little known) trick of moving the multi-line field over by one byte.  (Figure 5) 


This then allows the run-time screen to paint properly. (Figure 6)

Runtime

My assumption is that the screen attributes are being corrupted by the multi-line although comparing the source for the DDS didn't highlight anything untoward so I am guessing it is a 5250 issue.  (I also recommend aligning the rest of the fields on the screen.)

Any takers on providing the technical explanation? as a compare source doesn't seem to highlight a clear and present danger. (Figure 7)

DDS corruption?


I've always nudged these over by an extra byte for years and years but I guess some tips and tricks get lost.

Thanks for reading the
Synon 2E and Plex Emporium by Lee Dare (A developer blog)
Lee.

No comments:

Post a Comment

Thanks for considering leaving some comments about my random rants for everything software development and more.