Ü
INDARA
·
This keyword is used at file level.
·
It is used to put the field option
indicators and function(response) key indicators in a separate area of memory
called indicator area.
·
By using this keyword, we can make
indicator data structure in our program to give the customized name to
indicators defined in the display file. Hence, it makes the program more
readable and easy to understand.
Example
Columns . . . : 1 80 Browse AMITCC/QRPGLESRC
SEU==> RECDSPIND
FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++++++++
*************** Beginning of data *********************************************
0001.00 A INDARA >>>>>>>> Mandatory keyword
0002.00 A DSPSIZ(24 80 *DS3)
0003.00 A CA03(03)
0004.00 A R RECSFL SFL
0005.00 A S_FLD01 5S 0B 7 20
0006.00 A R RECCTL SFLCTL(RECSFL)
0007.00 A 42 SFLDSPCTL
0008.00 A 41 SFLDSP
0009.00 A 40 SFLCLR
0010.00 A 45 SFLEND(*MORE)
0011.00 A SFLSIZ(9999)
0012.00 A SFLPAG(0010)
0013.00 A RCDNBR 4S 0H SFLRCDNBR(CURSOR)
0014.00 A 1 25'TEST TO CHECK THE BUFFER'
0015.00 A 5 20'FLD01'
****************** End of data ***************************************************
In the below program below
is the alternate name that we have available for the indicators used in the
program;
03 =
KEY_EXIT
40 =
SFL_CLEAR
41 =
SFL_DSP
42 =
SFL_DSPCTL
Hence, we can give any
meaningful name to the indicators by using this data structure.
Columns . . . : 6 80 Browse AMITCC/QRPGLESRC
SEU==> REC1100IND
FMT FX FFilename++IPEASF.....L.....A.Device+.Keywords+++++++++++++++++++++++++++++
*************** Beginning of data ***************************************************
0001.00 FRECDSPIND CF E WORKSTN SFILE(RECSFL:RRN) INDDS(INDDS1)
0002.00 D P_INDDS1 s * inz(%addr(*in))
0003.00 D INDDS1 ds based(P_INDDS1)
0004.00 D KEY_EXIT 1N overlay(INDDS1:03)
0005.00 D SFL_CLEAR 1N overlay(INDDS1:40)
0006.00 D SFL_DSP 1N overlay(INDDS1:41)
0007.00 D SFL_DSPCTL 1N overlay(INDDS1:42)
0008.00 DI S 5 0
0009.00 DRRN S 5 0
0010.00 C EVAL RCDNBR=9900
0011.00 C DOW KEY_EXIT=*OFF
0012.00 C IF KEY_EXIT=*ON
0013.00 C LEAVE
0014.00 C ENDIF
0015.00 C EXSR CLRSFL
0016.00 C EXSR FILSFL
0017.00 C EXSR DSPSFL
0018.00 C ENDDO
0019.00 C SETON LR
0020.00 *
0021.00 C CLRSFL BEGSR
0022.00 C EVAL SFL_CLEAR=*ON
0023.00 C WRITE RECCTL
0024.00 C EVAL SFL_CLEAR=*OFF
0025.00 C ENDSR
0026.00 *
0027.00 C FILSFL BEGSR
0028.00 C FOR I=0001 BY 1 TO 9900
0029.00 C EVAL RRN=RRN+1
0030.00 C IF RRN>9999
0031.00 C LEAVE
0032.00 C ENDIF
0033.00 C EVAL S_FLD01=I
0034.00 C WRITE RECSFL
0035.00 C ENDFOR
0036.00 C ENDSR
0037.00 *
0038.00 C DSPSFL BEGSR
0039.00 C EVAL SFL_DSP=*ON
0040.00 C EVAL SFL_DSPCTL=*ON
0041.00 C IF RRN<=0
0042.00 C EVAL SFL_DSP=*OFF
0043.00 C ENDIF
0044.00 C EXFMT RECCTL
0045.00 C EVAL SFL_DSP=*OFF
0046.00 C EVAL SFL_DSPCTL=*OFF
0047.00 C ENDSR
****************** End of data *****************************************************
OUTPUT
TEST TO CHECK THE BUFFER
FLD01
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
More...