Ü    CAnn (Command Attention)

 

·         This keyword is used to make the function key available to the program.

·         This keyword is used in a case we don’t want to pass any information from the display device to the program. e.g. F3 = EXIT, F12=PREVIOUS/CANCEL.

·         It can be used at file level or record level.

·         The format of this keyword is :

CAnn(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 CAnn, then the response indicator gets turned on and we can take the necessary action based on if the response indicator is on  or off.

 

 

Example

 

Display file entry: CA03 has been used here to control the EXIT from the program.

We can control the EXIT with the help of option indicator used here i.e. 03.

 


0002.00      A                                      CA03(03 'EXIT')

 

 

We can check the option indicator 03 in the program and can take necessary action when it is pressed as shown below:

 


0023.00 C     *IN03         DOWEQ     *OFF
0023.01 C  03               LEAVE
0024.00 C                   EXSR      MAIN
0026.00 C                   ENDDO
0027.00 C                   SETON                                            LR

 

 

 




 

 







User Comments:



Subscribe

.  


Copyright © www.go4as400.com, 2013-2023. Copyright notice   Terms of services   Privacy policy