AS/400: Adding a F4 prompt to 2 subfiles over/under

105 pts.
Tags:
AS/400 Subfiles
IBM iSeries
I am modifying a 2 subfile screen, one subfile over the other. The TOP subfile is using the EXFMT statement while the BOTTOM subfile is a WRITE statement. I need to add an F4 prompt to the BOTTOM subfile using the customer number that was keyed into the TOP subfile to search with. When I key in the customer number then do F4 the customer number is 0..its not recognized. If I just do an F4 to bring in the search screen without a customer number, the F4 key is not recognized. It appears one screen is dominant over the other. My main focus at the moment is when the screens first appear and I go to the bottom subfile and do the F4, its ignored.

Answer Wiki

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

No, I’m not the PROTECT keyword.

Discuss This Question: 10  Replies

 
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
  • WilsonAlano
    Are you using PROTECT keyword on your subfiles?


    2,485 pointsBadges:
    report
  • UARTJ

    No, I'm not using the PROTECT keyword.

    105 pointsBadges:
    report
  • CharlieBrowne
    From what you wrote, it seems like your code would be something like this:
    o Fill SFL Bottom
    o Write SFL Bottom
    o Fill SLF Top
    o EXFMT SFL Top
    Check for F4

    Is this the correct sequence?
    41,380 pointsBadges:
    report
  • philpl1jb

    Sounds like you need the F4 to branch based on which subfile record the cursor is pointing at.  Maybe returned with RTNCSRLOC

    50,185 pointsBadges:
    report
  • UARTJ
    Yes, that is the correct order. The modification I am doing is putting the F4 key on the bottom subfile and when you select the F4 key nothing happens.  However, later on in the program when the bottom subfile is displayed using the EXFMT opcode the command is recognized.
    105 pointsBadges:
    report
  • CharlieBrowne
    Since you do the EXFMT on TOP, you must have F4 defined on that format.
    It works when you do the EXFMT on BOTTOM because it is defined on that format.
    41,380 pointsBadges:
    report
  • UARTJ

    I might end up having to toggle back and forth, but that seems like a waste of code if there is another solution.

    105 pointsBadges:
    report
  • CharlieBrowne
    Why have to toggle.
    You could just define F4 on the format that is being read, or you could even define it at the top to make it global.
    41,380 pointsBadges:
    report
  • UARTJ
    If I put the F4 on top it does work, My problem is I don't need it on top, I need to F4 on a specific field on the bottom subfile to prompt using the RTNCSRLOC
    CSRLOC keywords. Thanks for the responses and I will take another spin at it.
    105 pointsBadges:
    report
  • WilsonAlano
    Just define F4 at file level and use an indicator to condition it. As said by philpl1jb, use RTNCURLOC to determine over witch sfl you are.
    2,485 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