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 Question
IBM AS400 Interview Question

Answers:

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

KEY1(NAME FIELD) SETLL FILENAME
KEY1(NAME FILED) READE FILENAME

Answer #2
We 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 #3
we can use chain concept and other then if condition means we can use DOW.

Download IBM AS400 Interview Questions And Answers PDF

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?