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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is an online rpg?

723


what is the use of sflnxtchg?

797


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

1891


Interviewer asked me write down DDS for load all subfile .can anybody write dds

1013


If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?

611






How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?

1559


How would display prime numbers using CL program?

5672


what is a rpg?

697


How to write record if no field or the field are different in physical file in rpgle ?

483


How to call one program from another program in RPG? please help me with the code

1256


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...?

1457


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?

496


What are the types of identifiers?

566


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

749


What is the purpose of record level identifier?

724