Key-Status

By default, AcuBench generates Key-Status code for any program that contains a program structure file. If you already have Key-Status code defined in your program, you will need to take steps to avoid duplicate definitions.

The simplest option is to disable the AcuBench option that generates Key-Status code. To do this:

  1. Right-click the program in the Structure view and select Properties.
  2. On the Key Status tab of the Program Properties window, mark the Do not generate CRT STATUS variable in .wrk check box.

    This check box appears near the bottom of the dialog.

  3. Click OK to save your changes.

Note that there are five key-status definitions that are required if you are using AcuBench-generated graphical screens. These are:

       88 Exit-Pushed            VALUE 27.
       88 Message-Received       VALUE 95.
       88 Event-Occurred         VALUE 96.
       88 Screen-No-Input-Field  VALUE 97.
       88 Screen-Time-Out        VALUE 99.

If your Key-Status definition does not contain these items and you use the AcuBench Screen Designer to add screens to your program, you will receive errors at compile time.

If you prefer to use the AcuBench-generated Key-Status code, you can copy and paste your own Key-Status variable into the generated definition. To do this:

  1. Right-click the program in the Structure view and select Properties.
  2. On the Key Status tab of the Program Properties window, make sure that the Do not generate CRT STATUS variable in .wrk check box is not selected.

    This check box appears near the bottom of the dialog.

  3. Use the Import or Insert button to add conditions and values to the Key-Status definition.

    The Import option allows you to read in items from a data file; the Insert option allows you to manually add items one at a time.

  4. When you are finished, click OK to save your changes.