ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Subfile EOF condition on readc

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

  • Subfile EOF condition on readc

    Hi Guys,

    As the topic says.

    I am facing an EOF condition on a readc operation.The code goes something like this.

    exfmt ctlrcd
    taking f4 on the subfile record and calling another program to return the value to subfile therefore exfmt it again.
    after returning to the subfile i press enter.
    and do a readc followed by do loop and readc
    on the first readc i get an EOF condition which isn't correct basically according to me the record has changed since i have returned a value from another program.


    i do understand that readc is read next changed record whereas according to me the only changed record is the one where i took f4.and hence eof is reached.how do i set the file pointer to starting of subfile.

    note i did not use sflnxtchg keyword instead i am using MDT for the field and setting it on and off before and after update during f4 lookup

    basically facing the issue this guy faced in another site

  • #2
    A readc only returns subfile records that have been changed by the user - if you didn't make any changes you will receive an EOF on the readc. A function key doesn't mark a subfile record changed.

    Comment

    Working...
    X