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

why we do STRSRVJOB in batch debugging in as400

1 Answers  


Thanks gagan for your answer,i'm new to as400,i don't know embedded sql in rpg.can you send me the coding for the below mentioned question in embedded sql rpg. how to retrieve particular field records from a physical file,say i have a physical file called 'employee' in it i have to retrieve the records of a field 'admin' present in pf 'employee' using rpg,but i should not use logical file or openquery file.

2 Answers   iGate,


Setps to create .csv file on IFS folder in AS/400( V4R3)....?

3 Answers   TCS,


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,


how do you use commitment control in rpg?

0 Answers   IBM,


why subproc not run in dftactgrp?????/plz explain

2 Answers   CSC,


WHAT IS MENT BY RECORD LEVEL IDENTIFIER ? WHAT IS THE PURPOSE OF THIS?

1 Answers  


Whether a module can consists of many procedures or it can consist of subprocedures having a main procedure?If it is possible that it can contain many individual procedures than can we have different name for complete module and how do we call this module in main modul?

3 Answers   Steria,


If there are 1000 member(PGM type) in a SRC file. How can we compile in a CL program? ( It need to be done in a loop)?

1 Answers  


Why did we give STRSRVJOB while debugging batch program

3 Answers   HBL Power Systems,


HI, 1: WHAT IS THE FUNCTION OF %KDS?WITH PROGRAMMING CODES EXAMPLE 2: WHAT IS THE FUNCTION OF Z-ADD AND Z-SUB ? WITH PROGRAMMING CODES EXAMPLE

1 Answers   IBM,


what is difference between DSPFD and DSPFFD?please give me real senario with good example?

1 Answers  


Categories