Page 1 of 1

transformer-2 set of records in o/p link for one i/p record

Posted: Sun Jul 03, 2005 11:27 pm
by Roshni
hi,
i am looking for a solution to pass two set of output records in the transformer to a sequential file for a single incoming record under certain conditions.
i have customerno, accountno and a key coming from the input link. if the key is same for two customerno, i have to log an error which contains the columns: customerno, accountno and key. so, whenever a duplicate record is located using stage variables, i want to write the old customerno and the new customerno with the same key as separate records to the error file along with their curresponding accountno and key.

Posted: Mon Jul 04, 2005 1:00 am
by ray.wurlod
Probably easiest is to write to two separate sequential files, and cat them together afterwards.

You can also construct a line containing record1 : LF : record2 and write that to a single sequential file for which you have defined just one VarChar column.

Posted: Mon Jul 04, 2005 3:22 am
by Sainath.Srinivasan
Or write into a single hash file or read from it or use link collector........

In short you have variety of solutions.