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 |
what is post opcode do
what will happen two jobs have same name are submitted
Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?
i hav 2 logical files(L1,L2) both r derived from one physical file(P1). how can i use both the logical files in one RPG program? if yes what i have to d.
How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...
Can we have a Physical file without any member ? Please let me know
When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?
To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...
suppose a job is running for 15 minutes after that it goes to message wait? what are the impact analysis
what is difference between DSPFD and DSPFFD?please give me real senario with good example?
Need a sql query: retrieve all duplicate records in table?
Suppose i am having 3 programs PgmA,pgmB,pgmC and using source debugger. At debugging time i found that pgmC having some code error..then in debug mode directly how can i debug pgmC