How to program in RPG/400 using a DDS with multiple WINDOWs
Posted on 2003-11-05
I'm doing this because I couldn't find a way to control the TAB order on a DDS screen. There are 3 sections on my screen (the top half of the screen is divided into 3 "boxes" side-by side and each box contains some fields). I wanted to be able to TAB through the fields in each section before TABBING to the next section. I couldn't find a way to do that, so I'm trying to use WINDOWs for each section. . .
I have a DDS screen with 3 WINDOW records and 1 regular record. I want to display all 3 WINDOW records and the regular record all at once. The 3 WINDOW records do not overlap each other. However, the regular record occupies the entire screen and is overlapped by all 3 WINDOW records. All 3 WINDOW records and the regular records have Input/Output (B) fields. I want the users to be able to enter data in all 4 records by TABBING through each WINDOW record in order, then the regular record. Right now, the regular record gets displayed with no WINDOW records. Then I press the ENTER key, and the first WINDOW record gets displayed (overlayed on top of the regular record). Then each time I press the ENTER key, the next WINDOW record gets displayed. I want them to come up all at once.
My WINDOW records are defined like this (I get confused with all the possible parameters (OVERLAY, INZRCD,...)):
A R WINDOW1
A WINDOW(5 4 8 22)
My RPG code currently looks like:
C READ SCRN1 96
C READ WINDOW1 96
C READ WINDOW2 96
C READ WINDOW3 96