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 1 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 9 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

The PGMA calls PGMB.PGMB generates a report.The report should contain the called program name(PGMA).How do i get the called program name in PGMB to print it on the spool file?(calling program name should NOT be hard coded or passed as parameter to called program?

6 Answers  


How to change the name of physical members Dynamically?

1 Answers  


Difference between RESET and CLEAR

1 Answers   TCS,


What is the purpose of PUTOVR keyword?

2 Answers  


Can an indexed file be accessed in arrival sequence in RPG?

3 Answers  






how we retrieve records without using key field (ex:name) from Physical File through RPG in as/400?

8 Answers  


Let?s consider a variable X of length 20. Move value ?ABC? to it.How to determine how many characters does X have?

1 Answers  


which MONMSG will give higher priority in CL program? I know MONMSG are of two types. Program Level Monmsg and Command Monmsg?

1 Answers  


Im traying to get out put of this below mention simple logic code.But im geting out of different.(im trying with my laptop trhough my company server. DCL &FIELD1 *CHAR 10 VALUE('TCS AS/400') DCL &FIELD2 *CHAR 10 CHGVAR(%SST(&FIELD2 1 10))(%SST(&FIELD1 10 1) Can you tell me the value of field2 after excuted of CHGVAR command.

2 Answers  


what is the difference between the procedure and module in ILERPG?

4 Answers  


I want to add 10 days in current date. how it is possible in CL program...?

11 Answers   CSC,


What are the types of identifiers?

0 Answers  


Categories