Example 2 (DataStage)

In this example, there are additional columns as well as the ones that will be included in the vector.

The example assumes that the job is running sequentially. The column definitions for the input data set are show below, note the additional columns called name and code:
Table 1. Column definitions
Column name SQL type
name Char
code Char
col0 TinyInt
col1 TinyInt
col2 TinyInt
col3 TinyInt
col4 TinyInt

The following are some rows from the input data set:

Table 2. Input data set
  Name Code col0 col1 col2 col3 col4
row Will D070 3 6 2 9 9
row Robin GA36 3 2 7 2 4
row Beth B777 7 8 8 5 3
row Heathcliff A100 4 8 7 1 6
row Chaz CH01 1 6 2 5 1
row Kayser CH02 0 1 6 7 8
row Jayne M122 9 9 6 4 2
row Ann F234 0 8 4 4 3
row Kath HE45 1 7 2 5 3
row Rupert BC11 7 9 4 7 8
The stage outputs the vectors it builds from the input data in a single column called column_name. The two other columns are output separately. You do not have to explicitly define the output column names, IBM® DataStage® will do this for you as the job runs, but you might wish to do so to make the job more understandable.
Table 3. Output column definitions
Column name SQL type
name Char
code Char
col Char

The Column's Common Partial Name property is set to 'col' in the Properties tab

The output data set will be:
Table 4. Output data set
Vector index     0 1 2 3 4
row Will D070 3 6 2 9 9
row Robin GA36 3 2 7 2 4
row Beth B777 7 8 8 5 3
row Heathcliff A100 4 8 7 1 6
row Chaz CH01 1 6 2 5 1
row Kayser CH02 0 1 6 7 8
row Jayne M122 9 9 6 4 2
row Ann F234 0 8 4 4 3
row Kath HE45 1 7 2 5 3
row Rupert BC11 7 9 4 7 8