It is essential to design a good interface for your application. I've been programming on RPG for three years, and I have always had a problem displaying Function keys in Window Subfile. I recently found a trick to solve this problem.
A normal application subfile generally has three record formats -- Subfile record format, Subfile Control record format and Footer Record format -- to display the function keys and messages. To display the normal Subfile and Footer record at the same time, OVERLAY keyword is use. The same thing can be achieved in Window Subfile.
Follow these steps:
- Create a normal window with required size, color and border. This will be footer record format, say FOOTREC. You can display the required function keys and message at the bottom of the window.
- Now create a window subfile with names of your choice. When specifying the parameters for control record format, on the screen 'Define Window Parameters' in the first parameter -- i.e. 'Reference Window' -- specify the footer record format name -- i.e. FOOTREC -- and leave the rest of the parameters blank. You also need to specify Color and Border for the window because it has already been defined in FOOTREC. Don't forget to specify OVERLAY keyword in Control record format.
- Now you can go ahead and design and create your Display.
Test the display file using RPG program.