You are here: Commands and the Command Log > Command Log > Issuing Commands

Issuing Commands

You can use one of the following methods to issue a command:

Select a command from the menu or by clicking a command button on the button bar. Analyzer displays the command dialog. Make your selections and click [OK] to execute the command.
Use the command line text box to enter commands using the keyboard. To execute the command, press RETURN or click [Accept Entry]. To clear the command line text box, click [Clear Entry].
Re-issue commands from the Command Log by clicking on a command in the Command Log to automatically cause it to be entered in the command line text box. To execute the command, press RETURN or click [Accept Entry]. To clear the command line text box, click [Clear Entry]. To edit the command, click the Edit Command button to bring up the associated command dialog.

Analyzer displays the same command dialogs whether you use the command line or the menu or buttons. When Analyzer executes the command, the command and its results are displayed in the Command Log. Commands are preceded by an @ symbol. Once a command is executed, the command results cannot be altered in any way.

You can View graphed results of graphable commands by double-clicking on the command in the log. Graphable commands include Age, Benford, Classify and Stratify. For more details, see Graphing from the Command Log.

Command Mode Syntax

If you choose to enter commands in the command line text box, you need to be familiar with command mode syntax. Command mode syntax is the text format in which commands are written. In Analyzer, command names are patterned after the English language. Commands can include a set of required and optional parameters.

For a complete description of Analyzer commands and their command mode syntax, see Commands.

Entering Commands in the Command Line

You can enter commands in uppercase or lowercase characters. Each command is written on a single line.

When the command is long, Analyzer expands the text box to display the entire command. Click outside the text box to collapse it and click inside the text box to display the entire command again.

Using Command Prompting

You do not have to enter all the command parameters and keywords when using command mode. Just enter the command name and Analyzer prompts you to enter any missing information when you attempt to execute the command or right-click “Edit the Command”. In either case, the command dialog for the command is displayed so that you can complete selection of necessary parameters and keywords prior to re-issuing the command.

For example:

1. Enter TOTAL without specifying which fields to total.
2. Right-click the command and select “Edit the Command”, press RETURN or click [Accept Entry]. Analyzer displays the prompt, “Enter the fields to TOTAL”. Click [OK]. Analyzer displays the Total dialog.

Any parameters supplied on the command line are included in the command dialog. For example, if you entered the command TOTAL IF UNCST>100, UNCST>100 would appear in the “Only include records if” text box when clicking on the [More] button.

Using Abbreviations

You can abbreviate commands, functions and keywords in command mode. The abbreviation must include the leading characters of the term or command. The abbreviation can be as short as you like, as long as it uniquely identifies the command or term. In most cases you will need to enter at least the first three or four characters.

The following example shows abbreviations for the Stratify command, the keyword Accumulate and for the Minimum and Maximum parameters.

STRAT ON VALUE ACCUM VALUE MIN 10 MAX 19700

Editing Commands

To edit a command, follow these steps:

1. Click on a previously issued command in the Command Log. Analyzer displays the command in the command line text box. If the command is long, Analyzer expands the text box to display the entire command.
2. Do one of the following:
Edit the command manually in the text box. Press RETURN or click [Accept Entry] to execute the command. Commands cannot include line breaks or carriage returns.
Click the Edit Command button. to display the associated command dialog. Analyzer displays the command dialog showing all the parameters used for the command. Edit the command in the dialog and click [OK] to execute the command.
Right-click the command in the Command Log and select "Edit the Command". Analyzer displays the command dialog showing all the parameters used for the command. Edit the command in the dialog and click [OK] to execute the command.

The new, revised command and its results are displayed in the Command Log.

Editing Tools

When editing a command in the command line text box, you can use right-click, the Edit menu or standard keyboard shortcuts to Cut, Copy and Paste items.

To search for text in the Command Log, right-click and select “Find”. The Find dialog is similar to the search feature in many word processors.

Specifying Fields

You can specify fields using the Insert Fields dialog or from the command line.

Insert Fields Dialog

Use the Insert Fields dialog to quickly select and insert fields or variables at the position of your cursor. Press F2 to display the Insert Fields dialog.

From the Field Types drop-down list you can choose to display all field types or you can display only variables, character, date, logical or numeric fields. Scroll through the list of available fields, select the field to insert and click [OK].

Command Line

You can add the field name to the command syntax using the keyboard. For example, to total the field called Profit, enter:

TOTAL PROFIT

To specify more than one field, separate the fields with a blank:

TOTAL PROFIT SALEPR COST

Expressions

You can include expressions in a command to create values that do not actually exist in the data or to specify an If test. By definition, an expression is a combination of physical and computed fields, functions, constants, variables and operators.

For example:

COUNT IF PAID_DATE - DUE_DATE > 30

This command tells you how many transaction records were paid more than 30 days after the due date.

TOTAL INVOH * PRICE

This command produces the total of a field that is the product of the INVOH and PRICE fields.

An expression can be named with the As clause, can specify the output width and can contain a Picture clause.

Always specify an As clause for ad hoc expressions such as QTYOH * UNCST, because the default name for such expressions (EXPR_1, for example) is not descriptive. Specifying QTYOH * UNCST AS "VALUE" ensures that your results are clearly labeled.

For more information, see Building Expressions.