How can we search particular records from the database file
in RPG.
For example, 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?

Answers were Sorted based on User's Feedback



How can we search particular records from the database file in RPG. For example, there are 10..

Answer / prabhakar

This can be done using SETLL and READE

Is This Answer Correct ?    12 Yes 3 No

How can we search particular records from the database file in RPG. For example, there are 10..

Answer / maddy

This can be done using the Key Field.

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

Is This Answer Correct ?    9 Yes 0 No

How can we search particular records from the database file in RPG. For example, there are 10..

Answer / maha

by using runqry *n file name rcdformat(*slt)

Is This Answer Correct ?    0 Yes 0 No

How can we search particular records from the database file in RPG. For example, there are 10..

Answer / arvind

no IF so go wid DOU loop

f pfxx if e k disk
c dou *in90=*on
c name reade r1 90
........
......
enddo
c eval *inlr=*on

cud help i try it working many time

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More RPG400 Interview Questions

what is the difference between SETON RT & RETURN?

5 Answers  


can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.

0 Answers  


How can we receive values from a called procedure in RPG?

1 Answers  


purpose of pannel group??/

2 Answers   CTS,


i'm working on progA , in that program i want to see the userids of the users who work on this program?

10 Answers   Four soft,






What is the Record Address file. How can we use it in RPG program?

4 Answers  


how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.

2 Answers   iGate,


Why Rpg/400 is Famous?

2 Answers   IBM,


How do you know if a record exists without doing a READ and CHAIN?

6 Answers   IBM,


what is a rpg?

0 Answers   IBM,


What is the difference between ITER and DO ? I know both are used to execute set of statements repeatedly, but what is the main difference?

2 Answers   CGI, Wipro,


give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........

0 Answers   CTS,


Categories