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 use of sflnxtchg and use of MDT(modify data tag).both r same r not and can we use these on dspf and subfile.
why subproc not run in dftactgrp?????/plz explain
How to find d key field of a pf that doesn’t have source physical file?
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...?
which MONMSG will give higher priority in CL program? I know MONMSG are of two types. Program Level Monmsg and Command Monmsg?
In ProgramB there is a SBMJOB, which is a call to program C .There is also a CALL to program D from B. How would you check the program C has been executed in D?
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’
Hi, can any one tell me :IN CASE OF SINGLE PAGE FILE HOW WILL I LOAD THE PREVIOUS PAGE WITHOUT THE USE OF SFLCLR INDICATOR ?
i 'm new to as/400.in an interview i was asked this question.give a practical example for passing information or data through local data area. I know only that data area is an object used to store tiny bits of data or it can store one value at a time and it is used to store frequently changing values or datas.thats all i know about data area can any one tell me how local data area and user defined data area are used to pass data between jobs with a example or coding.thanks in advance.
How to create a key field for a logical file inside RPG?
what r drawbacks of OPM? Why do we go for ILE RPG?
I have one cl program which calls two rpg programs named a & b. I am loading a run time array in Pgm A and the control comes back to cl pgm. i call pgmb and I want to read the runtime array in pgmb which was loaded in pgma. How it can be acheived. I should not use any intermediate file or dataarea to store the loaded values.