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|
what procedure should we use to find whether the following operations are successful or not setll setgt chain read reade readp pls tell with example i'm not lazy to read the manual or not lazy to do anything.but sometimes i cannot understand the things given in manual in high level english its little bit complicated for me,i can't understand their way of writing thats why i ask these questions here and find the solution in simple words that i can understand thats the real reason sir.sorry if i had hurt you or disturbed you.please understand my situation.
i have a file with the values 10, 20, 30, 40, if am setll with the value 25 then readp, so what it will return?
i would like to know under what circumstance the object will get locked on AS400.
i want to retrieve record b/w 2 dates in as400
A particular job executing on the iS is not behaving as expected and is operating in an environment in which it can be debugged. What commands would you use to debug and observe the program?
steps for debugging two rpg programs????
HOW DO YOU DISPLAY A DISPLAYFILE AT OTHER WORKSTATION? CAN WE MOVE A PHYSICAL FILE? WITHOUT MOVING A FILE?
How can a screen field that has changed since the last output operation be detected?
How can we change element of compile time array?Can we do so
what is the difference between the cpyf command crtdupobj command?
can we perform CHAIN operation on Subfile record format....?
which program rpg or cl is efficent to update a transaction onto a database file and why ?