ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to retrieve the RRN of the record read by READC?

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

  • How to retrieve the RRN of the record read by READC?

    Hi,

    How to retrieve the RRN of the record read by READC?

    Immediate help is very much appreciated.

  • #2
    Re: How to retrieve the RRN of the record read by READC?

    Using the INFDS :
    http://archive.midrange.com/rpg400-l.../msg00363.html
    Patrick

    Comment


    • #3
      Re: How to retrieve the RRN of the record read by READC?

      the field "where" will contain the subfile RRN

      Code:
           A                                      SFLCSRRRN(&WHERE) 
           A  50                                  SFLDSP 
           A  51                                  SFLDSPCTL 
           A  52                                  SFLCLR 
           A  33                                  SFLEND(*MORE) 
           A            SCRRN          4S 0H      SFLRCDNBR 
           A            #REC          10A  H 
           A            #FLD          10A  H 
           A            WHERE          5S 0H
      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: How to retrieve the RRN of the record read by READC?

        Huh Jamie,
        SFLCSRRRN will contain the RRN where the CURSOR is in the subfile.
        The "READC" RRN is on positions 376-377 of the INFDS of the display file
        Code:
        D  sfl_RRN              376    377i 0
        Philippe

        Comment


        • #5
          Re: How to retrieve the RRN of the record read by READC?

          Philippe

          Thanks for catching that..Im still getting old

          I really never use readc always just do loop chain.....

          my bad!

          Happy Wednesday!
          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


          • #6
            Re: How to retrieve the RRN of the record read by READC?

            Jamie,
            I seldom use READC and prefer by far the do loop + chain too.
            I could have make the same mistake, you know...
            If you're getting old, what should I say ?!
            Last edited by Mercury; January 11, 2008, 04:16 AM.
            Philippe

            Comment


            • #7
              Re: How to retrieve the RRN of the record read by READC?

              Thank you very much.

              Comment


              • #8
                Re: How to retrieve the RRN of the record read by READC?

                You seem a much younger 57 then my old 42 and because your in France your are much better looking, smarter and most likely faster
                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

                Working...
                X