Programmatic Transform

This an optional step, where the bag of records obtained through the SQL script can be transformed into another one having different fields. Use this step only for transformation that you cannot do by SQL.
If you do not need any programmatic transform or all transformations are carried out in the SQL script, do not enable this step and exit saving your Data Source.

If the original record is (Q1, ..., Qn) , the transformation allows you to create a completely different record (T1, ..., Tm), where each Th, h=1,...,m, can be an arbitrary function of all the Q's: Th = f (Q1, ..., Qn). The function is provided in form of source code.

The code can be edited in the Visual Editor and then pasted into the code windows. The transformation can be anything and you can add any number of subroutines of functions. It is only required that the signature be as specified in the example code.

This transformation is applied on the fly to each record every time the data is actually extracted from the DBMS. The code il compiled on the fly, and therefore execution is fast.

When done, click on "Test" to see whether code has syntax errors.

In any case, it is advisable to work within the Visual Studio debugger, to create the transform program and, when done, to paste it into the code window.

DataTime has also some built-in function which can be useful for data transformation.

For instance, if you are connected to an AS/400 system, you may want to transform the numerical representation of dates into a date field. For that, you can simply use the function AS400NumberToDate().

If you want to suggest more transforming functions, please post your request on our usenet group.