User`s guide
CHAPTER 5 Advanced Concepts and Tools
User’s Guide 61
function IncA (a)
{
var b = 3;
a = IncB(b) + a++;
return a;
function IncB(b)
{
b = b + 1;
return b;
}
}
Converting datatypes
All variables in the Sybase IQ ETL are represented as strings. This may result
in unexpected behavior when working with numeric values. The functions
parseInt() and parseFloat() can be used to convert a string to an integer or a float,
for example:
var a = "123";
var b = "22";
a > b
will return FALSE while
parseInt(a) > parseInt(b)
returns TRUE.
Including files
Use the uScriptLoad(“filename”) function to include external files into a script.
The external file can contain any valid JavaScript constructs, including
functions, thus allowing a kind of reusable code, for example:
uScriptLoad("C:\scripts\myfunc.js");
var a = 11;
var b = 2;
var c = 0;
b = gcd(a, b);
// gcd function defined in C:\scripts\myfunc.js
Using multiple engines to reduce job execution time
The GRID architecture reduces the job execution time by using parallel
execution of projects on multiple distributed engines.
To make use of this scalability you need to: