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 |
A rpg or clp command to find if the file field is defined as a character or numeric field.
Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?
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?
How to read data from Nth member of a physical file containing some X number of members in it? "Provided member names are unknown"
Hi, can any one tell me :IN CASE OF SINGLE PAGE FILE HOW WILL I LOAD THE PREVIOUS PAGE WITHOUT THE USE OF SFLCLR INDICATOR ?
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 ?
what is EXCEPT command in rpg and use
i)What is the command to lock a file in a program ii)2. Can you get a level check error in a CL program
suppose one file is used by 100 user and file is locked by 100 user, what are the impact analysis?
1. I have2 records in a PF. READ PF DO DSPLY EMPNO RETRN DSPLY EMPNO ENDDO What was the output 2. SETON LR vs RETURN 3. Primary File 4. How to delete a deleted spaces 5. How to read a PF in reverse order in CL 6. I have a object in Lib A, B and C. But it shows in D Lib..Why? 7.
can anybody explain significance of *loval setll with example code????
I want my simple Green screen should refersh every 1 min ,How can I do it..? Please share the logic