WebSphere Message Brokers
File: ab00083_
Writer: Bill Oppenheimer

Reference topic

This build: July 31, 2007 21:16:11

ESQL editor

The ESQL editor is the default editor provided by the Broker Application Development perspective for editing ESQL (.esql) files.

The editor is launched in the editor area when you select the menu item Open ESQL for a Compute, Database, or Filter node, or when you double click an ESQL file in the Broker Development view.

ESQL editor views

The ESQL editor has the following views:

Broker Development view
The Broker Development view shows all the resources in your workspace, that is all message set resources and all message flow resources, including ESQL files.
Editor view
The editor view shows the contents of the resource that is currently open. It also shows tabs for each of the resource that you have open so that you can quickly switch between them.
Outline view
The Outline view displays any schemas, defined constants, modules, and routines that you have referenced in this ESQL file.
Problems view
The problems view displays the warning and error messages that are generated by the editor's validation when you save the ESQL file. If you double click an error, the editor indicates where it is located by moving the cursor to the corresponding ESQL code.

ESQL editor functions

The ESQL editor provides:

  • A context sensitive Content Assist. You can invoke Content Assist from the Edit menu or, on some systems, by pressing Ctrl+Space if that has not been assigned to another function.

    Content Assist helps you construct references to the content of the Properties folder. When you use the ESQL editor with predefined messages, it also helps you construct field references.

    When you use the ESQL editor with the database schema definitions, Content Assist helps you construct schema, table, and column references. You can also use the ESQL editor to call user-defined maps.

    When you create functions and procedures within the ESQL file, the names that you define must not start with the characters IBM_ (IBM underscore).

    Note: To get Content Assist to work, you must set up a project reference from the project containing the ESQL or mappings to the project containing the message set. For information about setting up a project reference, see Project references.
  • Automatic code formatting.

Right-click in the editor view to access the following additional functions:

  • Undo and Revert File. To undo a change that you have made to the ESQL file, click Undo. If you want to undo all of the changes since the last time you saved you can reinstate them by clicking Revert File.
  • Cut, Copy, and Paste. These are standard editor functions.
  • Shift Right and Shift Left. These are standard editor functions.
  • Save. Click this to save your changes.
  • Comment and Uncomment. Click Comment to change a line of ESQL code into a comment. Click Uncomment to change a comment into a line of ESQL code.
  • Format. This function formats all selected lines of code (unless only partially selected, when they are ignored), or, if no lines are selected, formats the entire file (correcting alignments and indentation).
  • Organize Schema Paths and Add Schema Path. These functions assist you with broker schema management.

    Click Organize Schema Paths and any broker schema containing procedures or function called by the ESQL file is automatically added to the PATH statement (if you have not already added it). This function scans the ESQL file for instances of procedures or function residing in schemas not already fully qualified in the file.

    Click Add Schema Path when you code a call to a procedure or function residing in a different broker schema to any you have included on the PATH statement, and this schema is added to the PATH statement. Ensure that the cursor is on the name of the procedure you are calling.

ESQL editor preferences

You can modify settings that affect the way the ESQL code is handled:

  • Editor Settings (how code is displayed in the editor view):
    • Text font
    • Displayed tab width (default 4)
    • Background and foreground colors (for comments, statements, and so on)
  • Validation Settings (what level of validation is performed when you save the file):

    Validation detects four potential problems:

    Unresolved identifiers
    The validator attempts to resolve any identifiers that you have referenced (for example, a message field).
    Message references mismatch message definition
    If a message definition exists (messages in the MRM domain only), the validator checks that the use of the reference is consistent with its definition (for example, the action against a numeric field is a valid numeric action).
    Database references mismatch database schema
    The validator checks that the use of the reference is consistent with the database schema (for example, the action against a numeric field is a valid numeric action).
    Use of deprecated keywords
    The validator checks if you have used any keywords that have been deprecated in this release.

    For each of these situations, select one of the following validation settings:

    Ignore
    No validation is performed.
    Warning
    The validator writes warning messages to the Tasks view for each potential problem that it detects. This is the default setting.
    Error
    The validator writes error messages to the Tasks view for each potential problem that it detects.

    Validation does not check that you have specified names in the case in which you declared them. The names of modules, functions, and procedures are not case sensitive; all other names (schemas, constants, variables, and labels) are case sensitive. Check that the names that you use match the declarations for those names because the broker handles these names in a case sensitive way and generates a runtime error if they do not match.

For details of how to change these preferences, see Changing ESQL preferences.

ESQL editor toolbar

The ESQL editor does not provide any additional icons and actions on the toolbar.

Related concepts
Project references
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:16:11

ab00083_ This topic's URL is: