Siebel Analytics Scheduler Guide > Configuring Siebel Analytics Scheduler Job Scripts > Analytics Scheduler Script Object Methods and Events >

CreateArray Method

Creates an Array object.

Syntax 1

Set array = CreateArray ()

Syntax 2

Set array = CreateArray ( size )

Syntax 3

Set array = CreateArray ( element0, element1, ..., elementn)


Arguments for CreateArray method are shown in Table 27.

Table 27. CreateArray Method Arguments


A long value that specifies the initial size of the array.

element0 ... elementn

The values to place in the array. This creates an array with the lower and upper bounds of 0 (zero) and n, respectively.

Return Value

Returns an Array object.


This method is provided only for JScript because local JScript Array objects cannot be passed directly to the Script methods. This method is called to create an array object and pass the array object to Script methods that accept an array as arguments.

The different syntax versions create arrays as follows:

  • Syntax 1 creates an array of size 0 (zero).
  • Syntax 2 creates an array with the specified size.
  • Syntax 3 creates an array filled with the specified elements.

var i;
var array1= CreateArray(2);
for (i = 0; i < array1.Size; i++)
   array1(i) = i;

for (i = 2; i < array1.Size; i++)
   array1(i) = i;

var array2 = CreateArray(0, 1, 2,3);
for (i = 0; i < array2.Size; i++)
   if (array1(i) != array2(i))

Siebel Analytics Scheduler Guide