By default, all of the shift 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 shift keys dynamically.
Use the following call to enable or disable shift 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 shift-key-setting       pic 9(2) comp-x.
     03 filler                  pic x value "4".
     03 first-shift-key         pic 9(2) comp-x.
     03 number-of-shift-keys    pic 9(2) comp-x.
 
	 The following code enables Ctrl so that it can terminate an ACCEPT operation, then checks to see whether an ACCEPT operation was terminated by Ctrl:
* Enable Ctrl
      move 1 to shift-key-setting
      move 2 to first-shift-key
      move 1 to number-of-shift-keys
      move 1 to adis-function
      call x"AF" using adis-function
                       adis-parameter
      accept data-item at 0101
      if key-type = "5"
          evaluate key-code-1
           when 2     display "Ctrl pressed"
           when other display "Other shift key pressed"
          end-evaluate 
      end-if.