SETLL/READE/CHAIN

540 pts.
Tags:
AS 400
RPGLE
ID NAME VALUE1 VALUE2 VALUE3 MARKS
1 A 9 1 1 85
1 B 9 1 1 75
1 C 9 3 1 60
1 C 9 3 2 30
1 C 9 5 1 70
I have a file that contains fields as shown above. First 5 fields are the keyfields for the file. Now, i have a scenario where i need to fetch records pertaining to ID = 1, Type = C, Value1 = 9 (basically the last 3 records are selected here). The result i am expecting is as below -
ID NAME VALUE1 VALUE2 MARKS
1 C 9 3 90
1 C 9 5 75
How to perform this task using setll/reade/chain?
1

Answer Wiki

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

Build your KLIST to include the 3 fields, SETLL on the file then READE.

This is very basic and should have been covered. Post your code if you still have issues and we can help you further.

Discuss This Question: 1  Reply

 
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.
  • sri8707
    Hi ToddN2000, thanks for your reply. Sorry, i made a silly mistake with ReadE and posted the issue here. Thanks again for your help.
    540 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: