Joined: 07 Feb 2009 Posts: 1126 Location: Vilnius, Lithuania
Computers are deterministic. They don't just change an external TSQ upon hitting a wrong PF key, so it's pretty obvious that the program must be doing a lot more between detecting the PF18 and executing the snippet of code you have posted...
Joined: 14 Jan 2008 Posts: 2504 Location: Atlanta, Georgia, USA
You're either storing the screen-data erroneously or re-populating the screen from the TSQ without initializing each map-line to SPACES beforehand. LOW-VALUES will cause this type of "Shifting".
Use an INSPECT to rid the TSQ data of all LOW-VALUES and replace with SPACES, before re-populating the screen.
I suspect the symbolic map structure and physical map structure might not be matched.. Is this happening only for PF18 key function alone or other key as well?