You are here: Automating Analyzer > Creating Procedures > Procedure Editor Tab

Procedure Editor Tab

To create a procedure using the Procedure Editor tab, do the following:

1. In the Overview, select the appropriate table.

Tip: By opening the desired table first, this allows you to use the F2 lookup in the procedure editor to easily select fields.

2. Right-click the Analyzer Project title or a project folder in the Overview, click “New” and select “Procedure...”.
3. Analyzer displays a Procedure item in the Overview with a highlighted title called “New_Procedure”. Enter a meaningful name and press [Enter].
4. Analyzer opens an empty Procedure Editor tab.
5. Enter commands in the Procedure Editor by doing one of the following:
Enter commands manually, starting each one on a new line.
Right-click in the procedure and select “Capture Commands”, then make selections from the Data or Analyze menus to open a command dialog. Enter command options, fields, parameters and keywords and click [OK]. Commands are written to the open procedure but are not executed in this mode.

Note: To turn off capturing of commands, right-click in the procedure and select “Capture Commands" to uncheck and turn of the command capture.

Copy commands from the Command Log and paste them into the Procedure Editor tab. For ease of use, click the drop-down list in the Command Log and choose Commands Only. Because the log now displays only commands, you can copy a number of commands at once.
Copy commands from another procedure.

Note: The commands and parameters entered are not executed until you run the procedure. For more information, see Running Procedures.

6. When you have finished entering commands, close the Procedure Editor tab.
7. Analyzer prompts you to save your changes. Do one of the following:
Click [Yes] to close the procedure and save changes
Click [No] to discard changes and close the procedure
Click [Cancel] to stop save and return to editing in Procedure Editor tab

For more detailed instructions for using the Procedure Editor, see Using the Procedure Editor.

Entering Commands

When entering commands manually, observe the following guidelines:

Start each command in the procedure on a new line.
Insert a new command by moving the insertion point to the end of a line and pressing RETURN.
Do not insert a carriage return within a command line.
You can enter commands in uppercase or lowercase or a combination of both.
To make changes, use the Cut, Copy and Paste options from the Edit menu or their standard keyboard shortcuts.
Right-click in the procedure and select “Find” to search for and optionally replace, a string.

Also note that use of the TAB key will always indent, by default, two spaces on a line in a procedure. This is useful for making code more visually intuitive, especially when working with the Group and Loop commands discussed later.

Note: Long commands are automatically wrapped within the procedure tab with wrapped lines indented. The amount of the indenting can be edited.

Adding Comments

Comments are useful for documenting important considerations and characteristics of a procedure. Analyzer provides two options for commenting your procedures: comments and notes. Comments are visible in the Procedure Editor tab and can be single-line or multi-line. Notes are visible only by right-clicking the procedure in the Overview and editing its properties.

To add a comment to a procedure, do one of the following:

On a new line in the Procedure Editor tab, enter “Comment” followed by the text of your comment. For multi-line comments, the first line must consist of “Comment” only, followed by the text on immediately subsequent lines, followed by “End” or a blank on the last line. (A blank line is equivalent to “End”.)
Select Comment from the Tools menu, enter text in the Comment dialog and click [OK].

To add, View or edit a procedure note, do the following:

1. In the Overview, right-click on the procedure and select “Properties”. In the properties dialog, select the Note tab to display the Procedure Notes.
2. Enter or modify note text, then close the Properties dialog.