I do not understand very well,
So that the Stage Folder works, I have to put all my lines in a single column and a single row.
Do I have to a Stage Variable to transform it (how can it be done?), add Aggregator? To put all this in a Routine?
Thank you for helping me.
Create output file names based on data in a column
Moderators: chulett, rschirm, roy
That's the problem - "all my lines". Ray responded as he did because you said you needed your output to be:
1;2;3;4;5;6;8
You showed a subset of your input fields in the output. Everything before this point assumed a simple concatenation of one record to the next without any 'intelligence' in the process, meaning you should send to the Folder stage:
1;2;3;3;4;5;6;7;8
Based on your sample input. Are you certain that is really what you need? Or is that a typo? Nothing in the conversation up to this point indicated a need for any such thing and it's certainly not a requirement for the Folder stage, hence the question.
Now, to further add to your confusion, you actually need a single row that includes all of the records that the Folder needs to write out. Meaning you need to add record delimiters (not just the data) to the work you do in the stage variable. On Windows that would be a <CR><LF> pair while on UNIX you just need a <LF> between the records:
1;2;3<CR><LF>3;4;5<CR><LF>6;7;8
Use a stage variable with the proper initial value and no derivation so it is a constant during the run. Set the initial value to CHAR(13):CHAR(10) for Windows.
1;2;3;4;5;6;8
You showed a subset of your input fields in the output. Everything before this point assumed a simple concatenation of one record to the next without any 'intelligence' in the process, meaning you should send to the Folder stage:
1;2;3;3;4;5;6;7;8
Based on your sample input. Are you certain that is really what you need? Or is that a typo? Nothing in the conversation up to this point indicated a need for any such thing and it's certainly not a requirement for the Folder stage, hence the question.
Now, to further add to your confusion, you actually need a single row that includes all of the records that the Folder needs to write out. Meaning you need to add record delimiters (not just the data) to the work you do in the stage variable. On Windows that would be a <CR><LF> pair while on UNIX you just need a <LF> between the records:
1;2;3<CR><LF>3;4;5<CR><LF>6;7;8
Use a stage variable with the proper initial value and no derivation so it is a constant during the run. Set the initial value to CHAR(13):CHAR(10) for Windows.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
I guess his output to be a typo, as he even missed '7'.
If my guess is right, you can have your stage variable as below:
StagVar1: StagVar1 : ';' : ColumnA : ';' : ColumnB : ';' : ColumnC
StagVar2: Trim(StagVar1,';',"L")
set you stage variable's initial value as Empty ( '' )
Assuming that your column values will not be null or empty
And if you have problem working with Aggregators, you can just write your output to a Hashed file with a dummy key column with a static value, say '1' and then pass it on to the folder from hashed file.
If my guess is right, you can have your stage variable as below:
StagVar1: StagVar1 : ';' : ColumnA : ';' : ColumnB : ';' : ColumnC
StagVar2: Trim(StagVar1,';',"L")
set you stage variable's initial value as Empty ( '' )
Assuming that your column values will not be null or empty
And if you have problem working with Aggregators, you can just write your output to a Hashed file with a dummy key column with a static value, say '1' and then pass it on to the folder from hashed file.
Arun