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
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|
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 email@example.com
|Is This Answer Correct ?||4 Yes||0 No|
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|
Answer / swetha
I think you can use setll only if the file has keyfield
|Is This Answer Correct ?||4 Yes||7 No|
Answer / kkk
factor1 setll pfname
|Is This Answer Correct ?||1 Yes||4 No|
why subproc not run in dftactgrp?????/plz explain
What is file identifier where we can use?
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?
which program rpg or cl is efficent to update a transaction onto a database file and why ?
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.
what is the rpg system?
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.....?
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.
If record-format name in an externally-described file has already been defined as a file-name.how to solve this?
3 members in databasefile .how to read records from all the members??
difference between CHAIN and READE?
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