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 MEANT BY SIGNATURE VAILOTION ERROR
What is Multi Occurrence Data Structure(MODS)?
How to create a key field for a logical file inside RPG?
how to convert date format from one format to another i think in CL/400 its CVTDAT,Please tell in RPG/400 sir not in RPGILE
How to change the name of physical members Dynamically?
Can we trigger an rpg program which has user interaction with display file when updating a file using the command ADDPFTRG?
Errors in Sql query will be in which state?
1.Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation? 2. Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF? 3.I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program? 4.What is difference between Bind by copy and bind by reference?
3. Given the DOS Specification below and the following information: • Indicator 50 is off • No records have been written to the subfile What will be the result if the EXFMT operation code is performed on the record format CTLR? A R SUBFL A DESCRIP 101 6 1ODSPATR(UL) A DFT(’NOT FOUND’) A R CTLR SFLCTL(SUBFL) A N50 SFLDSP A SFLDSPCTL A SFLINZ A 67 SFIJEND A SFLSIZ(13) A SFLPAG(12) A ACCOUNTNO 100 S 10 a.) Only AccountNo will display b.) SUBFL will be initialized with 13 blank records c.) An I/O exception error will occur d.) The screen will display 12 records with ‘NOT FOUND’
1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real time ?.what is difference between them?
wat is curser?? and its types???
Hi friends, Can you give the solution for the below mention simple code.and explain.what is output D CHR1 S 4A INZ('PEN') D CHR2 S 10A INZ('MYGET') D CHR3 S 8A INZ('GOOD') D CHR4 S 22A INZ C MOVEL CHR1 CHR4 C MOVE CHR2 CHR4 C EVAL CHR4=CHR3 C MOVE CHR1 CHR4