sohasaid wrote:1- I need to include the 'Line' column in my output as shown in my example
2- The input file doesn't contain a fixed number of columns, i mean it could be three columns or more! :S
Ok you will need to do the following:
1. Have a stage variable which determines the number of columns that you have.
2. Create/Read in your column headings into a single string with some form of delimiter, eg '|'.
3. Add the above string of header values into a stage variable (sv1).
4. Create/Read in your column values into a single string with some form of delimiter eg '|'.
5. In the loop: Loop While @ITERATION <= number of columns
6. Set up 2 loop variables:
LoopVar1: Sv1['|',@ITERATION,1]
LoopVar2:InputCol.ValueString['|',@ITERATION,1]
7. Set your output columns accordingly
ID: InputCol.ID
Line: LoopVar1
Value: LoopVar2
Enjoy.