ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Record that cursor is on

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

  • Record that cursor is on

    I have a SFL displaying one record at at a time in output mode from a file. Each record contains 20-25 fields spread out on the screen with headings. I want to know which record the user pages down to so I can use it to provide details when they press a function key.

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

  • #2
    Use keyword SFLCSRRRN(sfl_rrn_number) to return the subfile record number in a variable that the cursor is on. You may have to position the cursor somewhere within the subfile record on the screen for this to work.

    Comment


    • #3
      Originally posted by Brian Rusch View Post
      Use keyword SFLCSRRRN(sfl_rrn_number) to return the subfile record number in a variable that the cursor is on. You may have to position the cursor somewhere within the subfile record on the screen for this to work.
      Brian,
      Do I need to add anything to the program to make it work?

      I added an input field with ND on the SFL record so the cursor would always go to that field but still not getting anything.

      I've done something like this before but I can't recall, been a while. In this case there is no editing done on the screen. It's only displaying the SFL records for output.
      Last edited by redvan; October 10, 2022, 09:56 AM.
      Everyday's a school day, what grade are you in?

      Comment


      • #4
        You have to read (chain) the subfile record using the subfile RRN that was returned in the variable so the contents of the subfile record that is displayed comes back into the program variables so you can use it to get the other information. Also make sure that the function key is defined as CFxx and not CAxx.

        Comment

        Working...
        X