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 |
what is edit word and edit code
What is use of IMPORT and EXPORT in RPGLE ? What is activation Group ? What is Service Program ???? How to call another program in RPGLE ?
in which journalling which attributes are necessary
what is program status data structure?
difference betwen keywords and opcodes
please help me answer to this question what is the difference between the binding and srvpgm in ilerpg?
HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?
1.I have a Physical file with 100 records, No duplicates exists, all are Unique,But while i am running Runqry utility i am getting only 80 records..What could be the reason?
Can we have a Physical file without any member ? Please let me know
How do I link an existing logical file to it's Physical File without recompiling?
How to set on/off a group of indicators in a single statement?
When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?