Subfile whats the difference between in READC and SFLNXTCHG

35 pts.
Tags:
READC
SFLNXTCHG
Subfile
Hi Friends, I am new learner of as/400. Can somebody tell me that whats diff. between in READC and SFLNXTCHG ..can somebody gv me a practical example of sflnxtchg means why and when we use this keyword.... Thanks in advance....

Answer Wiki

Thanks. We'll let you know when a new response is added.

ReadC Reds the Changed Record Once
means when it reads thefirst Subfile Record it sets off the Modified tag
so next time ReadC will ignore that record even if it gets changed

SFLNXTCHG keyword is used to set the modified Tag on after READC so if it will not ignore the Same Records if gets changed next time

Discuss This Question: 4  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Gilly400
    Hi, READC will read the record ONLY when it has changed (for example a record is selected on the subfile with an option - think of PDM with an option 2 next to a source member). SFLNXTCHG sets all records in the subfile to be marked as changed, so that READC will read all records in the subfile. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • TomLiotta
    SFLNXTCHG sets all records in the subfile to be marked as changed... SFLNXTCHG only sets the tag for the subfile records that are written when SFLNXTCHG is on. It only affects "all" subfile records if you have it on for every subfile record you write. READC will read any subfile record that was updated by the user (regardless of whether or not READC read the same subfile record in a previous I/O cycle through the subfile.) READC will also read any subfile record that wasn't changed by the user if that record was written while SFLNXTCHG was enabled. The difference between the two is that READC is a RPG program I/O instruction and SFLNXTCHG is an attribute of a row written to a subfile regardless of whether it was written by RPG or a different language. READC is a RPG instruction; SFLNXTCHG is a DDS keyword. They're not words from the same language. Tom
    125,585 pointsBadges:
    report
  • pdraebel
    A practical use of SLFNXTCHG and READC would be if you have a subfile where the user can enter data. The program than checks this data for errors and returns the wrongly entered data on the subfile in reverse image. It the users enters without changing the erroneous data these subfile records would not be read with a READC. So whenever you encounter a subfile record that does not meet validity checking and you return the subfile display with the indications of which fields are wrong make sure the SFLNXTCHG is in effect when you update the subfile record. This way you make sure the subfile record is read and validated even if the user did not change a thing on the record. So again he will be presented with the same error screen.
    3,230 pointsBadges:
    report
  • Kalyansun
    i would like to know about
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following