HOW DO YOU DISPLAY A CONTROL RECORD, A SUBFILE, AND A WINDOW AT THE SAME TIME WITHOUT THE USER HAVING TO PRESS ENTER TWICE?

pts.
Tags:
RPG
WHEN A USER CHOOSES AN OPTION ON ONE SCREEN AND PRESSES ENTER, ANOTHER SCREEN WITH A CONTROL RECORD AND SUBFILE IS DISPLAYED. AS IT STANDS NOW, THE USER HAS TO PRESS ENTER AGAIN BEFORE A WINDOW IS DISPLAYED STATING, "ARE YOU SURE YOU WANT TO DELETE THIS RECORD?" IS IT POSSIBLE TO CODE A HARD RETURN IN MY RPGIV PROGRAM OR IS IT POSSIBLE TO CODE THE SDA FOR ALL 3 DISPLAYS (CTRLRCD, SF, & WINDOW) TO APPEAR WITH ONE RETURN? THANK YOU

Answer Wiki

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

To display the second screen:
WRITE SFLCTLFMT (with both indicators for SFL and SFLCTL set on)
EXFMT WINDOWFMT (assuming the OVERLAY keyword is on the window display format)
If you need to read function keys that are defined on the SFLCTLFMT, then:
READ SFLCTLFMT

Thus, your RPG code should look like this:
WRITE SFLCTLFMT
EXFMT WINDOWFMT
READ SFLCTLFMT

================================================================

The user presses [ENTER] twice because the programming requested it twice. Don’t request input when the subfile and control record are displayed and the user won’t have to supply it. Don’t READ (nor EXFMT, which is a combined WRITE/READ) if you don’t intend to wait for input. Just WRITE. And ensure that the display file is compiled DFRWRT(*NO) so that WRITEs cause data to be written to the device before READ requests are processed.

Tom

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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TimHawkins
    Your request is somewhat confusing: You say that "WHEN A USER CHOOSES AN OPTION ON ONE SCREEN AND PRESSES ENTER, ANOTHER SCREEN WITH A CONTROL RECORD AND SUBFILE IS DISPLAYED." I assume that we are interested in the "another screen" part; or is it that the user "chooses an option (4=Delete) and presses enter"? and you show a small window requesting confirmation of the delete (maybe a Y/N field?), and they press enter (the 2nd time) on that one? If what you are trying to do is have the user avoid the confirmation (probably a bad idea, unless the users ALWAYS press enter without thinking), then just don't write the confirmation window at all... If that isn't the case, how about showing the code, so we can look at it, or break down the issue a little cleaner so we can evaluate it more completely. BTW, note how I use upper and lower case in my response, and how I can create EMPHASIS by using upper case? Try it, sure makes reading easier and allows you to convey additional information quickly.
    0 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following