Hi,
I am using Server and trying to generate a job to read in a record, divide one field into multiple rows. Example --
Record in informix source
Record 1
Field 1: A
Field 2: XYZ
Records needed in informix target
Record 1
Field 1:A
Field 2:X
Record 2
Field 1:A
Field 2:Y
Record 3
Field 1:A
Field 2:Z
both fields are dynamic so I will have to loop through until there is no more data in field Field 2 before moving on to the next record.
Thanks in advance --- Brian
Generate Multiple Rows from a single row
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Are there always exactly three characters in Field002? If so, you can use something like this.
The Transformer stage writes a single column to the SeqFile stage, of the form
NL is the appropriate new-line character(s) for your operating system.
Output from the SeqFile stage treats it as a regular comma-delimited file.
Code: Select all
source ----> Transformer -----> SeqFile -----> Target
Code: Select all
Key:",":Field001:",":Field002[1,1]:NL:Key:",":Field001:",":Field002[2,1]:NL:Key:",":Field001:",":Field002[3,1]
Output from the SeqFile stage treats it as a regular comma-delimited file.
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: 224
- Joined: Tue Sep 24, 2002 7:32 am
- Location: Denver, CO USA