Subfile positioning while adding records

435 pts.
Tags:
AS/400
RPGLE
Hi, I am having problem in repositioning subfile when I add a record. Scenario is like my subfile is self extending and page size is 4 .Data is like a,b,d. Suppose i add e then it gets positioned to e and page up don't work . It shows end of file found. Now if i add c it again position file to c and page up works. Also once i have added c now all subsequent adds like f ,g ,h etc works fine and page up also works. I am bit confused why first time when I add record in last it doesn't respond to page up and when i add any data in between records all other page up works . Please suggest where i am wrong. Basically I am just doing a chain on added record and set rrn=1 and load subfile...Please suggest

Software/Hardware used:
as400

Answer Wiki

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

Discuss This Question: 2  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
  • philpl1jb
    Not sure if I understand your description... Are you saying that you initially load three rows to the subfile (a b d rrn 1,2,and 3)?  Then add a fourth row (c in rrn 4) ?  .. filling the page with cursor on c (row 4)?  So you now see the 4 rows?  Why should page up work??? 
    49,850 pointsBadges:
    report
  • TomLiotta
    ...I am just doing a chain on added record and set rrn=1 and load subfile...   That might be exactly the opposite of what someone might do. But without seeing your code, there's no way to know what might be done.   If you CHAIN first, what are you CHAINing to? How is the subfile defined? How many records are in the subfile at the time <PageUp> is requested? Has the subfile been re-loaded after the record was added but before <PageUp> was requested? Are values typed into a blank subfile record? Or is it a separate record format? If it's a subfile record, how many blank records were available? As Phil asked, is it exactly three records plus one added record? Or was that just an example description?   In short, we need to see the actual logic.   Tom
    125,585 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