Creating an Unpaged Autoload Control

When you create an unpaged control–a combo box, list box, or grid–using the Autoload interface, the list in the bottom, right portion of the window provides a number of ways for you to modify the generated code used to load data into the control at runtime.

The steps are as follows:

  1. Open the Drag and Drop window and click Combo-Box, Grid, or List-Box from the list of controls.
  2. Click one or more fields from a single data set in the list of available data items.

    Note that combo boxes take only a single data field (loaded into a single column of data).

  3. Click OK.

    This opens the Autoload interface.

  4. On the left side of the screen, verify that you have chosen the intended data set and data fields.

    To change data sets, use the arrow keys next to the Source entry-field. To add data fields to the control, select the new field, then click the right arrow symbol. To remove data fields from the control, highlight the item in the Selected list and click the left arrow symbol.

  5. Use the list in the bottom, right portion of the screen, shown here, to determine how the generated code will load data into the control at run-time.

    The interface is similar to that of the Screen Designer Property window:

    BKBEBEWSCR07-low.gif

    You can enter variable names, paragraph names, or condition clauses to be inserted into the AcuBench-generated load paragraph for the control. The options are as follows:

    Option Description
    Start Key Specifies which key to use when reading data into the control from a file
    Start Value The value used to start reading the record. The default is low-value
    Start Value Variable If you want the start value to vary depending on some condition, you can specify a start value variable. AcuBench adds this variable to Working-Storage and uses it during code generation
    Start Value Variable Pic      The picture clause for the start value variable that you have specified
    Start Direction Determines the KEY clause of the START phrase. By default, the value is >=:
       START filename KEY >= keyname
    Invalid Key Perform Allows you to specify a paragraph to be performed when an INVALID KEY condition is encountered
    Read Direction Determines whether a file is read start to end or end to start. The default value is next
    Perform Until Condition Allows you to enter the end condition for the PERFORM statement used to load the control. Uses the same syntax as the Expression Builder. The default is not valid-filename. valid-filename is an AcuBench-generated file status condition
    End Value Variable Used with Perform Until Condition to specify when to stop loading information into the control. Enter a variable to be used to determine the end condition for the PERFORM statement used to load the control. AcuBench adds this variable to Working-Storage
    End Value Variable Pic The picture clause for the end value variable
    At End Perform Allows you to specify a paragraph to be performed when an AT END condition is encountered
    Not At End Perform Allows you to specify a paragraph to be performed when a NOT AT END condition is encountered
    Add Item Condition Creates a condition to determine whether or not to add a record to the control. Uses the same syntax as the Expression Builder
  6. When you have finished making changes, click OK.

    AcuBench draws the control on the screen form.

The code generated to load unpaged controls is generated into the .prd COPY file and should not be modified directly.