User`s guide

Customizing SQL and transformation rules
60 Sybase IQ ETL 4.1
2 Click Go on the last breakpoint to execute the rest of the script.
Inline inspection of variables
You can perform an inline inspection of the current value of a variable while
stepping through the code in Debug mode or after the code has been executed.
Right-click the variable to open the pop-up menu, which displays the variable
name and value.
Monitoring values in the Watch List
You can use the Watch List to monitor the changes of variable values during
the execution of the code. When stepping through the code you can see any
change that occurs to one or more variables in the Watch List.
To add a variable to the Watch List
1 Right-click the variable.
2 Select the Add to Watchlist from the pop-up menu.
To remove a variable form the Watch List
1 Right-click the variable in the Watch List tab of the Monitor area.
2 Select Remove <variable> from Watchlist from the pop-up menu.
Special JavaScript features
Interrupting execution
From inside the Editor, click the Interrupt button to interrupt a JavaScript
execution.
Creating user-defined
errors
Using the throw("xx") function, an error can be enforced to interrupt the
execution of the project. For example, stop execution if the name of a product
(PR_NAME) exceeds the length of 20 characters:
if (uLength(IN.PR_NAME) > 20) (
throw(“Product name exceeds maximum length”);
)
Creating user-defined
functions
Functions can be defined inside a script and functions can be nested. For
example, the following script results in a value 6 for variable b:
var a = 2;
var b = 20;
b = IncA(a);
// end