IBM AS400 Question:
Download Job Interview Questions and Answers PDF
How to search particular records from the database file in RPG?
Suppose, there are 100 records in the file.i need to retrieve all the records matching/equal to the particular NAME field. How can we do the above using SEARCH criteria other than using the IF cond?
![IBM AS400 Interview Answer IBM AS400 Interview Question](https://globalguideline.com/public/images/interview/34.png)
Answers:
Answer #1This can be done using the Key Field.
KEY1(NAME FIELD) SETLL FILENAME
KEY1(NAME FILED) READE FILENAME
KEY1(NAME FIELD) SETLL FILENAME
KEY1(NAME FILED) READE FILENAME
Answer #2We can use a Key Field and use chain to search for the perticular record it will work similar to SETLL with READE.
KEY CHAINFILENAME
KEY CHAINFILENAME
Answer #3we can use chain concept and other then if condition means we can use DOW.
Download IBM AS400 Interview Questions And Answers
PDF