ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

SFLNXTCHG Keyword

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SFLNXTCHG Keyword

    Happy New Year everyone.

    I have a SFL listing available line items and when one is selected, one field needs to be entered, an effective date.

    I have an indicator on the field to PC and RI on error but the field doesn't RI and the cursor goes to the first input capable filed instead, even though the assigned indicator shows its on when in debug. Once I tab to the field and make the entry and press Enter, the record updates and the next selection is processed.

    I'm using two DO loops within each other; the first loads the SFL and then drops into the second which displays the screen, handles function keys and edits. The second loop is a do until a field(Error) equals 'N' which I load with a 'N' immediately after the do until line. In the edit routine, missing data causes Error to be 'Y' so SFLNXTCHG can be processed properly.

    I've done something like this years ago in another life but I'm missing something.

    Any suggestions or solution will be greatly appreciated.

    Thank you,
    Red.
    Everyday's a school day, what grade are you in?

  • #2
    After the edit routine found an error did you update the subfile record setting SFLNXTCHG?

    Comment


    • #3
      Originally posted by UserName10 View Post
      After the edit routine found an error did you update the subfile record setting SFLNXTCHG?
      Yes.
      Everyday's a school day, what grade are you in?

      Comment


      • #4
        Did you set on the SFLNXTCHG indicator and update the subfile record? You have to do both.

        Comment


        • #5
          ... and then REDISPLAY the subfile (i.e. execute an EXCFMT)?

          Comment


          • #6
            Originally posted by Vectorspace View Post
            Did you set on the SFLNXTCHG indicator and update the subfile record? You have to do both.
            Yes
            Everyday's a school day, what grade are you in?

            Comment


            • #7
              Originally posted by B.Hauser View Post
              ... and then REDISPLAY the subfile (i.e. execute an EXCFMT)?
              Yes
              Everyday's a school day, what grade are you in?

              Comment


              • #8
                Found the problem; copied a line from another SFL edit routine in the program to this one and didn't change the sub file number from 1 to 2 (UPDATE SFL1 should have been UPDATE SFL2)

                Thanks for your time and effort.

                Red.
                Everyday's a school day, what grade are you in?

                Comment

                Working...
                X