Loading two Subfile On same screen.

185 pts.
Tags:
AS/400 Subfiles
RPG IV
How To Load Two Subfiel In a single screen?


Software/Hardware used:
yes
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

DDS contains
Two subfile records
Two control records with overlay in both
rpg code loads both subfiles
if *in10
write sflctl1
exfmt sflctl2

**sflctl2 is active, sflctl1 is also displayed

else
write sflctl2
exfmt sflctl1
endif

Phil

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • TomLiotta
    Subfiles consist of record formats; just like all areas that get displayed consist of record formats. The record formats that you write to the screen are the formats that get displayed. If you want two subfiles on the screen, then write them both to the screen before you read from the screen. This is the same as writing a header format and a footer format to the screen, and then writing a detail format to fill in the middle. There are some basic details that you need to pay attention to. You can't use EXFMT on two different formats for the same screen cycle. You can only use EXFMT once in a given screen cycle; all other formats must be written with WRITE. It might even be best to use WRITE for all formats, then use READ for the format you want to read from. In short, you place multiple subfiles on a screen the same way you place any other multiple formats on a screen. Make sure you don't write them to the same lines and watch what areas of the screen you clear. I suspect that there is more to the question but you don't yet know what to ask. Tom
    125,585 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: