Checking the transformation code

When you have finished writing the transformation code associated with a destination attribute, you can perform a limited syntax check on the code. By checking as you proceed, you reduce debugging time required at the end of the map development process. You can check attribute code using the technique of finding unmatched delimiters.

Note:
This technique is also useful when you have a compilation error whose cause you cannot immediately determine from the error message.

Finding unmatched delimiters

Map Designer Express provides the Check for Unmatched Delimiters feature to help you resolve one of the errors in a program that is most difficult to identify. This feature checks for unmatched delimiters in an attribute's transformation code. Map Designer Express checks for these paired tokens: ( ), [ ], { }, " ", and ' '.

Steps for finding unmatched delimiters

Perform the following steps to do a syntax check on an attribute's transformation code:

  1. Invoke Activity Editor in Java mode.

    For information on how to display Activity Editor, see Starting Activity Editor.

  2. Use the Check for Unmatched Delimiters option in Activity Editor. Right-click and select Check for Unmatched Delimiters from the Context menu.
    Note:
    If an unpaired instance of one of the delimiters exists, Activity Editor displays a message in the output window, providing the line number where the error was unable to be resolved. This line number might not be the actual line of the missing delimiter.
  3. To go to the source of the unmatched delimiter, note the line number displayed at the bottom of the window.

    Tip: To move to this line, use the Goto Line option from either the Edit menu or the Context menu of Activity Editor. Enter a line number to navigate to the line where the problem occurred.

Note:
If the problem is caused by unmatched quotation marks at one end of a string literal, the string does not appear pink as it should. When you add the missing quotation mark, the entire string turns pink.

Copyright IBM Corp. 2004, 2005