Use SETLL to read set of records

20 pts.
Tags:
RPG
RPG/400
Set Lower Limit
SETLL
Hi I have a set of records whose key has duplicates. Can SETLL be used to read these set of records? I need this to be done as part of a loop.
ASKED: April 1, 2009  10:08 AM
UPDATED: June 25, 2013  4:12 PM

Answer Wiki

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

Hi,

You can use SETLL to position to the first of your records and then just use READ in your loop.

Regards,

Martin Gilbert.

Discuss This Question: 3  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
  • Flint
    Is this ok Keyvalue SETLL Filename READ File name 90 *IN90 DOWEQ *OFF MOVE MOVE READ 90 ENDDO
    20 pointsBadges:
    report
  • Gilly400
    Hi, Your code will start reading at your Keyvalue and will continue until the end of file. You may need to add a check to stop when you've processed the records you need. For example :- Keyvalue SETLL Filename READ File name 90 *IN90 DOWEQ *OFF Keyfield ANDLE Keyvalue MOVE MOVE READ 90 ENDDO Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • LBurkett99
    Better yet, use READE instead of READ. It will fail the first time if there is no exact match on Keyvalue, and will read all records with this value.
    830 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