IBM AS400 Question: Download IBM AS400 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?

Tweet Share WhatsApp

Answers:

Answer #1This can be done using the Key Field.

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

Answer #3we can use chain concept and other then if condition means we can use DOW.


Download IBM AS400 PDF Read All 25 IBM AS400 Questions
Previous QuestionNext Question
Explain this error: "All Record Formats for externally-described file ABCD ignored or dropped due to error; file ignored."?What is difference between array and multi dimensional data structure?