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

How can you determine the number of characters in a variable?

3 Answers  


HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?

2 Answers  


how do you use commitment control in rpg?

0 Answers   IBM,


what built in function can be used with SETLL.If you want to check whether the search argument is successful or not? Please give me answer with example?

3 Answers  


1)how to do date validation in rpg? 2)how to delete dUPLICATE RECORDS?

12 Answers   IBM, Opus,






how to change the length of the field in a physicalfile?

12 Answers  


can you debug ile rpg program using isdb?

0 Answers   IBM,


is this a rpg channel?

0 Answers   IBM,


WHAT IS MONMSG IDENTIFIER FOR STRTCPFTP command IN cl (as/400)?

3 Answers  


How can you delete records form a file in rpg without using "Delete" OPCODE?

7 Answers  


without logical file we cannot access the data in physical file.but we specify physical file in the program(ie:- Ffile IF E k disk).how can it be accessed?

3 Answers   HSBC, TCS,


what is edit word and edit code

0 Answers   Cap Gemini,


Categories