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 |
2. Which of the following statement(s) explains the difference(s) between the /INCLUDE and ICOPY directives? a.) No difference, they function the same b.) ACOPY cannot be used as a conditional directive c.) IINCLUDE files cannot contain embedded SQL d.) Nesting /TNCLUDE directives is not allowed
which program rpg or cl is efficent to update a transaction onto a database file and why ?
suppose i i am changing / updating record of subfile and i want to change the record in reverse order . means i want to change the bottom record first and so on through readc . how i do it please any one explain .
Suppose we have one database file and it is used by 5 programs and in 3 program we have to add some records in datbase file s what is the impact on other program?
Difference between RESET and CLEAR
I am Submitting one job in batch that job calls three progams(PGMA, PGMB, PGMC). PGMB should be called after sucessfully completion of PGMA as like for PGMC also. So Can you please tell me how can we do that (without using data area)
how we retrieve records without using key field (ex:name) from Physical File through RPG in as/400?
difference between 1:%found and %equal built function in detail with example .
CAN WE READ RECORDS WITHOUT USING SETLL,READ,CHAIN IN RPG?
Are all these RPG/400 Interviewed Questions being asked recently? are current?
suppose we have 10 members in physical file and i have to use 4 out of 10 so how can we read this in RPG
1) How to declare a file? 2) How to define a display file? 3) How to monitor error messages in RPG? 4) How to find the attributes for subfiles? and what is the DDS for subfiles?