The RP program is displaying records 11 times .But there
are 10 records in
a pf.(ie last record is displayed twice).How to
display records only 10 times?
Answers were Sorted based on User's Feedback
Answer / sauml
in DDS sepc-
SFLPAG(10)
SFLSIZ(11)
RRN1 H 4 SFLRCDNBR
Rollup 27
in rpgiv:-
in D SPEC:-
SFLpag s 2 0 inz(10)
lstrrn s 4 0
In C Spec:- in load subroutine
Eval rrn = Lstrrn
*Loval Setll Rcd
Do SFLpag
Read Rcd
|
|
|
Eval rrn = rrn + 1
Write Sfl
Enddo
If rrn > 0
on SFLDSP indicator
Endif
Eval lstrrn = rrn
Hope it's enough for u to understand -----cheers
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / mathan kumar
RPG400
FPF IF E DISK k
C *LOVAL SETLLEMP
C READ EMP 90
C *IN90 DOWEQ *OFF
............
C ............
C READ EMP 90
C ENDDO
C SETON LR
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / siva
Try this
Read File1
If %Found
Dou %Eof
|
|
Read File1
Enddo
Endif
Is This Answer Correct ? | 1 Yes | 3 No |
Hi, Can anybody give me real sinario for SFLRCDNBR?with example?
How to read a record from file where there is multiple record occurrence is available?
How to code Page up and Page down in RPG for Single page subfile without using ROLLUP/ROLLDOWN in DSPF ?
how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.
Please tell me how to read the records from a file with load an array of size with error conditions(The logic answer for this question is ARR is array of 99 elements Z-ADD 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN99 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO).So,Please give me the complete of this code.
Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?
How to check which are the pgms using 1 perticulate file.? I know there is many tool available for X-reference...but need to know is there any command available in the system...?
How to find d key field of a pf that doesn’t have source physical file?
I want to declare the number of elements of an array dynamically in RPGLE ? Is it possible? If yes, then how do I do it ?
How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program
what is use of sflnxtchg and use of MDT(modify data tag).both r same r not and can we use these on dspf and subfile.
what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?