Reputation: 763
I am working on a display file. This display file is to display a header on the top of the screen, a footer on the bottom, and a subfile in the middle. Currently I have separated it into four record formats, one for header, one for footer and two for subfile. Due to some reasons I want to make the header and footer into on record format. So in the RPG it will first write the header and the footer, then write the subfile in between. I have tried to run the RPG but there is an error when writing the subfile control record to the screen. Is there anyway to overcome this error? Or is it not possible to do so?
Some messages are required to be displayed using ERRMSGID keyword conditioned by separate indicators. There is one message associated with a field in the header and one with a field in the footer. Suppose both conditions are satisfied, then one message will be displayed after the other by pressing Enter in between, if the header record format and the footer record format are to be written separately. This effect is not very desirable here. What I want one of them to be displayed at a time, and their triggering conditions cannot be changed. Is it possible?
Upvotes: 0
Views: 744
Reputation: 4542
The OVERLAY keyword is the primary method of putting one record format on the screen while leaving other information on the screen. You should be able to employ this to combine top and bottom formats, overlayed by a format in the subfile in middle, if you wish.
After far as subfile displays go, it is standard practice to have a separate format for the footer which you WRITE first. You are not limited to the standard practice, of course.
I would learn the other DDS display keywords as well. There are a lot of useful techniques there there.
Upvotes: 4