Ü
SFLRCDNBR
·
This keyword is used at field
level.
·
It is used to display the page
having RRN value that is in the hidden field defined as a parameter of
SFLRCDNBR.
·
If we do not specify this keyword,
first page of the subfile is displayed by default.
·
The format of the keyword is:
·
SFLRCDNBR ( CURSOR or
*TOP)
·
Here, if CURSOR is specified as
parameter, then the cursor will be placed at the record whose RRN value is in
the hidden field(RCDNBR below).
A RCDNBR 4S 0H SFLRCDNBR(CURSOR)
·
Here, if *TOP is specified as
parameter, then the very first record that will be displayed on the subfile
screen, is the one having RRN value as specified in the hidden field.
Example
Columns . . . : 1 80 Browse AMIT/QRPGLESRC
SEU==> REC9999DSP
FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++++++++++++++++
*************** Beginning of data **********************************************
0001.00 A DSPSIZ(24 80 *DS3)
0002.00 A CA03(03 'EXIT')
0003.00 A R RECSFL SFL
0004.00 A S_FLD01 5 0B 07 20
0005.00 A R RECCTL SFLCTL(RECSFL)
0006.00 A SFLPAG(15)
0007.00 A SFLSIZ(9999)
0008.00 A 40 SFLCLR
0009.00 A 41 SFLDSP
0010.00 A 42 SFLDSPCTL
0011.00 A 45 SFLEND(*MORE)
0012.00 A RCDNBR 4S 0H SFLRCDNBR(CURSOR)
0013.00 A 01 25'TEST TO CHECK THE BUFFER OVERFLOW'
0014.00 A 05 20'FLD01'
0015.00 A DSPATR(HI)
****************** End of data **************************************************
REC11000PF physical file used in
the below program contains 1100 records.
Columns . . . : 6 80 Browse AMIT/QRPGLESRC
SEU==> REC9999RPG
FMT FX FFilename++IPEASF.....L.....A.Device+.Keywords+++++++++++++++++++++++++++++
*************** Beginning of data ****************************************************
0001.00 FREC11000PFUF A E K DISK
0002.00 FREC9999DSPCF E WORKSTN SFILE(RECSFL:RRN)
0003.00 DI S 5 0
0004.00 DRRN S 5 0
0005.00 C EVAL RCDNBR=9999
0006.00 C DOW *IN03=*OFF
0007.00 C 03 LEAVE
0008.00 C EXSR CLRSFL
0009.00 C EXSR FILSFL
0010.00 C EXSR DSPSFL
0011.00 C ENDDO
0012.00 C SETON LR
0013.00 *
0014.00 C CLRSFL BEGSR
0015.00 C SETON 40
0016.00 C WRITE RECCTL
0017.00 C SETOFF 40
0018.00 C ENDSR
0019.00 *
0020.00 C FILSFL BEGSR
0021.00 C FOR I=0001 BY 1 TO 9999
0022.00 C EVAL RRN=RRN+1
0023.00 C EVAL S_FLD01=I
0024.00 C WRITE RECSFL
0025.00 C ENDFOR
0026.00 C ENDSR
0027.00 *
0028.00 C DSPSFL BEGSR
0029.00 C SETON 4142
0030.00 C EXFMT RECCTL
0031.00 C SETOFF 4142
0032.00 C ENDSR
****************** End of data *******************************************************
OUTPUT
Here,
the subfile is containing the record 9999 which is specified in the SFLRCDNBR
hidden field value i.e. RCDNBR=9999
TEST TO CHECK THE BUFFER OVERFLOW
FLD01
9991
9992
9993
9994
9995
9996
9997
9998
9999