HI.
Lets say i have 4 records
aaardtg
basertydfi
cdrefitjf
deryihlffg
There is only one column
point to note is first record start with a, second with b, third with c and last one with d. I read this data from a sequenctial file. Now i have to split this 4 records to 4 individual flat files such that record starting with a goes to first file, records that start with b goes to secodn file and so on. i tried to do this using a switch stage. but i couldnt figure out how to write the wildchar character( like a*, b*). Can you please tell me how can i move the records to individual files. All the records belong to a single column
switch stage
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
switch stage
I have tried that and its working. But the original job has lots of transformers in it. so i want to get rid of any transformers (i have used transformer to substring the first character) if i can. Is there any other solution using other stages like filter, switch. I will be happy if i can do this without xformer.chulett wrote:Why not just substring the first character and check that?
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
"They" did a lot of work with Transformers for version 7.5 - they now generate code that's quite close to an operator. The incentive to remove them is not as great as it once was.
There is no real alternative to taking the first character somewhere - the Switch stage does not have any computational capability. You could use a Filter stage, with a LIKE comparison.
There is no real alternative to taking the first character somewhere - the Switch stage does not have any computational capability. You could use a Filter stage, with a LIKE comparison.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
switch stage
Thanks Ray. That was a nice response. Really helped me.ray.wurlod wrote:"They" did a lot of work with Transformers for version 7.5 - they now generate code that's quite close to an operator. The incentive to remove them is not as great as it once was.
There is no real alternative to taking the first character somewhere - the Switch stage does not have any computational capability. You could use a Filter stage, with a LIKE comparison.