Enabling or Disabling Lock Keys to Terminate an ACCEPT

By default, all of the lock keys are disabled during an ACCEPT operation, or the x"AF" call used to obtain a key. However, this routine enables you to enable or disable the lock keys dynamically.

Use the following call to enable or disable lock keys:

call x"AF" using    adis-function
                    adis-parameter 

where adis-function and adis-parameter are defined in the Working-Storage Section of your program as follows:

 01 adis-function             pic 9(2) comp-x.
 01 adis-parameter.
    03 lock-key-setting       pic 9(2) comp-x.
    03 filler                 pic x value "5".
    03 first-lock-key         pic 9(2) comp-x.
    03 number-of-lock-keys    pic 9(2) comp-x.

where:

adis-function
is 1.
lock-key-setting
is the action of the keys affected, as follows:
0
the keys are disabled. If the key is pressed it will be ignored.
1
the keys are enabled.
first-lock-key
is the number of the first key to be affected. The keys to enable are numbered as follows:
0
Ins Lock
1
Caps Lock
2
Num Lock
3
Scroll Lock
number-of-lock-keys
is the number of consecutive keys to be affected.