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 ?    13 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

Errors in Sql query will be in which state?

1 Answers  


Can we possible to key with the date field?

1 Answers   IBM,


Job is in MSGW while reading the input file and writing a new record / updating a reacod due to Duplicate data error. What action would you take ( C D I R )...?

4 Answers  


What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?

1 Answers  


In single page subfile,if I select the mutiple options in 1 page and without pressing enter,I press rollup key (pagedown).In such case how I can handle it in rpg becasue in single page we have to handle it in pgm. It would be helpful if any one answer with coding

4 Answers   Infinite Computer Solutions,


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,


CAN WE READ RECORDS WITHOUT USING SETLL,READ,CHAIN IN RPG?

6 Answers   Satyam,


Have a join logical file with more than one members with different record formats. So how can we read the different members from this file and also how we can read the different record format from the join logical?

3 Answers  


1.WHAT IS WRONG WITH THE CODE BELOW? C CUSTNO CHAIN CUSTMAST IF %ERROR can any body find the wrong please? 2.What builtin function will you use to achieve the following functionality? C QTY IFLT *ZERO C QTY MULT-1 QTY ENDIF

5 Answers   CTS,


what is file identifier wher we can use

1 Answers   IBM,


1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?

2 Answers   TCS,


How to read a record from file where there is multiple record occurrence is available?

1 Answers  


Categories