ESQL editor
The ESQL editor is the default editor provided by the Integration 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 Application Development view.
ESQL editor views
The ESQL editor has the following views:
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 Referencing resources in other libraries. - 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 the changes since the last time you saved, you can reinstate them by clicking Revert File.
- Cut, Copy, and Paste: Standard editor functions.
- Shift Right and Shift Left: Standard editor functions.
- Save: 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 a broker schema that contain 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 paths 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:
For each of these situations, select one of the following validation settings:
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 integration node 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 additional icons and actions on the toolbar.