How can we read a particular record from the database file
which is not having DDS (Flat File). For example, there are
100 records in the flat file. How can we retrive 15th
record in RPG/400 program (Without using CL)




Answers were Sorted based on User's Feedback



How can we read a particular record from the database file which is not having DDS (Flat File). Fo..

Answer / swetha p rao

Yes ,Using RRN of the file we can retrive.

Chain the file with RRN or Query the file with RRN
select * from temp33 where RRN(temp33) = 15

Is This Answer Correct ?    15 Yes 0 No

How can we read a particular record from the database file which is not having DDS (Flat File). Fo..

Answer / pravin

there are too many ways-
1. declare that flat file as a edf in pgm and rename the
rcd-format and field name than set the pointer on 15 record
by setll and then read it.
2. define a per-run time array with fromfile(name of flate
file). then see th2 arrays 15 index value.

this are two methods. i have 2 more methods also
if any one want's contact me on pravin_cse1@yahoo.com

Is This Answer Correct ?    4 Yes 0 No

How can we read a particular record from the database file which is not having DDS (Flat File). Fo..

Answer / prince

My Answer is below
We need to use the following.

Factor 1 = 15
Opcode = CHAIN
Fator 2 = File Name


Please correct me if I am wrong

Is This Answer Correct ?    10 Yes 8 No




How can we read a particular record from the database file which is not having DDS (Flat File). Fo..

Answer / swetha

I think you can use setll only if the file has keyfield

Is This Answer Correct ?    4 Yes 7 No

How can we read a particular record from the database file which is not having DDS (Flat File). Fo..

Answer / kamal

EVAL EMPID=15
EVAL=%FOUND(PF NAME)
READ PFNAME
EMPID DSPLY

Is This Answer Correct ?    0 Yes 3 No

How can we read a particular record from the database file which is not having DDS (Flat File). Fo..

Answer / kkk

ithink
using setll
factor1 setll pfname

Is This Answer Correct ?    1 Yes 4 No

Post New Answer



More RPG400 Interview Questions

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

2 Answers   CSC,


What is file identifier where we can use?

0 Answers  


Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the significance of *MAP and *DROP in the CPY command?

3 Answers  


which program rpg or cl is efficent to update a transaction onto a database file and why ?

0 Answers   IBM,


i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the logical files in one RPG program? if yes what i have to d.

5 Answers   TCS,






what is the rpg system?

0 Answers   IBM,


Can anybody tell me the setps to create .csv file in IFS folder on AS/400. I also need to know how I can send this .csv file to PC in xls sheet.....?

2 Answers  


Suppose we add one field in physical file and this physical file is used by several programs.how do we know which program is using that file? What are the impact analysis.

6 Answers  


If record-format name in an externally-described file has already been defined as a file-name.how to solve this?

2 Answers   CTS,


3 members in databasefile .how to read records from all the members??

6 Answers   CTS,


difference between CHAIN and READE?

8 Answers   HCL,


can any body correct the following code? Following a procedure which returns the maximum of two numbers.Correct the following code. P GETMAX B D GETMAX PI D NUM1 35 0 D NUM2 45 0 C IF NUM1 > NUM2 C RETURN NUM1 C ELSE C RETURN NUM2 C ENDIF P GETMAX E

1 Answers  






Categories