AS/400: Changed record on screen

450 pts.
Tags:
AS 400
AS/400 Subfiles
We have subfile and in that there are 5 records in the screen and when we update the 5th record in the screen. The changed record should come first in the screen. How to do this? What is the command used? Is this possible?
1

Answer Wiki

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

It can be done but you need to rewrite it manually and put in the proper order. This is easiest if you have a date/timestamp field in the file to sort on. If not then you need to keep track of the sequence you want manually either in a hidden subfile field or an indexed work file.

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.
  • TheRealRaven
    If you want the 5th row to be first, then rewrite the subfile with the 5th record written first.
    34,430 pointsBadges:
    report
  • azohawk

    If you are looking for data in the subfile to be in a sequence of newest to oldest, your data needs to be stored with a timestamp. Process the file based on the timestamp as the key in descending order.

    When you add new data, you will need to reload the subfile.

    4,055 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.

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

Following

Share this item with your network: