ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Issues with Subfile

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

  • Issues with Subfile

    In my DDS, I have used RRN1 along with SFLRCDNBR keyword. It is a load all subfile, so after loading all the 7 records, while displaying since the RRN1 = 7, my screen is showing the last page which has 7. Do I need to set the RRN1 back to 1 before the ExFmt? Then after displaying the subfile, I have changed Name field in the 3rd record. I need to update this changed value to the file when user presses F6 after the edit. But how to catch the RRN of the changed record so that I can perform a chain on the PF with that RRN? I have used ReadC here, But after readc when I checked RRN1, it still shows 7?

  • #2
    Re: Issues with Subfile

    I got the issue.. I was using F9= Update, When I press enter, then only it is reading the changed record. But how to do if I want to perform update only when user press F9?

    Comment


    • #3
      Re: Issues with Subfile

      post some code and repost exactly what you are trying to do and we will help.

      Jamie
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #4
        Re: Issues with Subfile

        You are executing your update subroutine with checking the relevant indicator first.
        You should be doing something like this:
        Code:
        readc MySfl;
        dow not %eof;
            if *in09;
               exsr UpdSflRec;
            endif;
            readc MySfl;
        enddo;
        Regards

        Kit
        http://www.ecofitonline.com
        DeskfIT - ChangefIT - XrefIT
        ___________________________________
        There are only 3 kinds of people -
        Those that can count and those that can't.

        Comment


        • #5
          Re: Issues with Subfile

          If you eval the 7 to the SFLRCDNBR then it SFL displays the next SFLPAG records from the 7

          READC can find the changed record.. just do the Chain with key fields on PF..
          Thanks
          Venkat

          Comment

          Working...
          X