Set up the user defined statistics definition in the iSeries

Related topics

The following desribes how to set up a user defined SALES statistics definition in the iSeries, allowing you to eventually view the results in Analyser.

The following three programs are used for the set up, in the order outlined. You access all via the Logistics C/S Setup Tasks menu:

  • Work with user defined statistics
  • Work with sales statistics definitions or Work with purchase statistics definitions
  • Update user defined statistics

Defining a User-defined statistics definition

  1. Select the Work with user defined statistics menu item.
  2. Click Add to add a new record.
  3. You access the Work with user defined statistics panel where you enter the basic information for the definition. Complete the information for the following fields:
  4. Statistics identity
    Enter the identity of this user defined sales statistics.
    Update program name
    Enter the name of the program for which the statistics will be updated. For sales statistics, the program that will be updated is CSBR043. For purchase statistics, the program that will be updated is CSBR045.
    Description
    Enter the description for the definition.
    Selected keys only
    If you set this field to YES, only those keys you select for sorting (which is done in step 4 below) will be displayed when it is time to select the key values (which is done in step 6 below). If you keep the NO setting, all keys will be displayed when it is time to select the key values. For this example leave the NO setting.
    Time summary level
    Although seven fields are displayed under this heading, only the first four are currently used in the system. The selection for Hour, Minute and Second are not currently supported. These fields must therefore be set to NO. Set the first four fields to YES or NO under this section indicating if you want to summarise the statistical information on these levels. When viewing the output in Analyser you will be able to view the summarised values on the levels you define here.

    Click OK.

  5. You access Work with user defined statistics, Select key numbers.
  6. On this panel you select the keys for which the statistical information will be sorted.

    Select any or all of the six available selection keys and click OK. You access the Select key numbers panel where you select the applicable key and click OK to update.

  7. You return to the Work with user defined statistics panel. Click OK.
  8. You access Work with user defined statistics, Select key values.
  9. Since you chose not to display Selected keys only in step 3, all available keys are displayed. Scroll to see all.

    Complete the From, To and Mask fields as desired, or leave blank to retrieve all valid values and click OK.

  10. You return to the Work with user defined statistics panel. Exit the routine.

Defining a Sales statistics definition

The next step is to define a sales statistics definition. When doing so you not only connect the User defined statistics definition to this sales statistics definition, but you also define the columns you want to appear in your analysis.

Do as follows:

  1. Select the Work with sales statistics definitions menu item.
  2. You access Sales stat definition table maintenance. Add a new record.
  3. On the detail panel, complete the following fields:
  4. Definition
    Enter the name of this new sales definition.
    Description
    Enter the description of the definition.
    User defined stat ID
    Enter the name of the User defined statistics definition you created.

    Complete the remaining fields as desired (see the Panel help for a description of the fields) and click OK.

  5. You access Statistical columns selection, Select sales columns where you select the columns you want to appear in your analysis. Press F4 in each of the fields under the Col column to retrieve a window panel where you can select from a list of available columns. Repeat for all columns that you want to display.
  6. Tip: You can also enter a Target value, Minimum and Maximum values for each or any column. If you do so, you will be able to view this information and compare the target value against the real values when analysing this information in Analyser.

    Complete the information as desired. Click OK to update and then exit the routine.

Updating user defined statistics

The next step is done to update the statistical values from Distribution. Since the information is retrieved from the applicable files in Distribution, and a large volume of statistical information may be generated for your company on a daily basis, it is important that you refresh these values so the information you analysis is accurate.

Tip: If you have existing statistical data that is up to a certain date or period, you can change your definition to start after that date or period and then re-run the update. When you re-run the update you would specify No deletion of existing data. The result will be that the new data will be added to the existing data.

Note: Although the merging of statistical data exists, it is important to be aware that no check is performed for overlapping information or any gaps.

Do as follows:

  1. Select the Update user defined statistics menu item.
  2. You access Update user defined statistics, Sales. If you are working with a Purchase statistics definition, click Purchase to toggle to the equivalent Purchase panel. Select the definition that you want to update and click OK.
  3. You access the next Update user defined statistics, Sales panel where you can choose to delete existing data.
  4. Leave the default, which is delete existing data and click OK. Any existing statistical information is deleted before the new statistics are created.

    You can now view the output of the statistical information in Analyser.

Related topics