BENFORD command

Used to count the number of times each leading digit or digit combination occurs in a field, and compares the actual count to the expected count. The expected count is calculated using the Benford formula.

Syntax

BENFORD <ON> numeric_field <LEADING n> <IF test> <BOUNDS>
<TO SCREEN|table_name|GRAPH|PRINT> <HEADER header_text> <FOOTER footer_text>
<WHILE test> <{FIRST|NEXT} range> <APPEND> <OPEN> <LOCAL>

Parameters

ON numeric_field

Specifies the numeric field to analyze. The ON parameter can be omitted.

LEADING n

Optional. Specifies the number of leading digits to analyze. The value of n must be between 1 to 6. If the parameter is omitted, the default value of 1 is used.

IF test

Optional. Specifies a condition that must be met. The command is only executed on records that pass the test.

BOUNDS

Optional. Specifies that the upper and lower bound values should be included in the output. This parameter should be specified if you want to display counts that are significantly outside expected values.

TO SCREEN | table_name | GRAPH | PRINT
  • Specify TO SCREEN to display the results on screen in ACL. This is the default output if the TO parameter is not specified.

  • Specify TO table_name to write the results to an ACL table. You must specify the table_name value as a quoted string with a .FIL file extension to create an ACL table.

    For example: TO "Output.FIL"

    You can also specify an absolute or relative file path to an existing folder to write the .FIL file to.

    For example: TO "C:\Output.FIL" or TO "Results\Output.FIL"

  • Specify TO PRINT to send the results to the default printer.

  • Specify TO GRAPH to create a graph of the command results and display it on screen in ACL.

HEADER header_text

Optional. Specifies the text to insert at the top of each page of a report. The header_text value must be specified as a quoted string. The value overrides any value set for the ACL HEADER system variable.

FOOTER footer_text

Optional. Specifies the text to insert at the bottom of each page of a report. The footer_text value must be specified as a quoted string. The value overrides any value set for the ACL FOOTER system variable.

WHILE test

Optional. Specifies that the command should only be executed while a condition is true. The command processing terminates as soon as the specified test evaluates as false, or the end of the table is reached.

FIRST | NEXT range

Optional. Specify FIRST to start processing at the first record or NEXT to start processing at the currently selected record. Use the range value to specify the number of records to process.

APPEND

Optional. Specifies that command output should be appended to the end of an existing file instead of overwriting the existing file. You must ensure that the structure of the two files is identical when using this parameter, if maintaining a consistent file structure is important (e.g., when you are appending data to an existing ACL table), because ACL appends output to an existing file regardless of its structure.

OPEN

Optional. Specifies that the table created by the command should be opened after the command executes. This parameter is only valid if the command creates an output table.

LOCAL

Optional. Specifies that the output file should be saved in the same location as the ACL project. This parameter only applies when the command is run on an ACL Server table and the output file is an ACL table.

Example

The following example outputs the results of the BENFORD command to a graph.

BENFORD ON Amount LEADING 2 BOUNDS TO GRAPH



(C) 2013 ACL Services Ltd. All Rights Reserved. | Send feedback