CFnn (Command Function)
This keyword is used to make
the function key available to the program.
This keyword is used in a case
we want to pass the information from the display device to the program. e.g. F8
It can be used at file level or
The format of this keyword is :
CFnn(response indicator ‘Text’)
Response indicator can be from
01 through 99.
nn varies from 01 through 24.
Where we press the function key
specified by CFnn, then the response indicator gets turned on and we can take
the necessary action based on if the response indicator is on or off.
Display file entry: CF08 has been used here to
control the UPDATE action of the file used in the program.
We can control the UPDATE with the help of option indicator
used here i.e. 08.
0002.00 A CA08(08
We can check the option indicator 08 in the program
and can take necessary action when it is pressed, as shown below:
0023.00 C *IN08 IFEQ *ON
0024.00 C EXSR UPDATE
0026.00 C ENDIF
0115.00 C UPDATEPF BEGSR
0116.00 C READC ACC_SFL
0117.00 C DOW NOT %EOF( )
0118.00 C EVAL ORG=A_ORG
0119.00 C EVAL ACC=A_ACCNO
0120.00 C EVAL CCY=A_CCY
0121.00 C EVAL PARTY=S_PNUM
0122.00 C EVAL ACCMNGR=A_ACCMNG
0123.00 C EVAL COUNTRY=A_CNTRY
0124.00 C WRITE REC5
0125.00 C READC ACC_SFL
0126.00 C ENDDO
0127.00 C ENDSR