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 pravin_cse1@yahoo.com
| Is This Answer Correct ? | 4 Yes | 1 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 | 9 No |
Answer / swetha
I think you can use setll only if the file has keyfield
| Is This Answer Correct ? | 4 Yes | 7 No |
in which journalling which attributes are necessary??/
Why did we give STRSRVJOB while debugging batch program
Errors in Sql query will be in which state?
how do I preserve and clean the array?
difference between 1:%found and %equal built function in detail with example .
what is an online rpg?
What would be the result on writing a data record to a PF file using the "WRITE" opcode after the SETON *ON *INLR statment?
How to print output from openquery in as400 ?
Maximum how many files declare in rpgle
How can we find out whether the job is interactive or Batch through RPG program? 2) How can we find out through CL program?
what r drawbacks of OPM? Why do we go for ILE RPG?
can you debug ile rpg program using isdb?