Concatenating Column Values

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
tonystark622
Premium Member
Premium Member
Posts: 483
Joined: Thu Jun 12, 2003 4:47 pm
Location: St. Louis, Missouri USA

Post by tonystark622 »

Jayaram Nallamothu,

There are several ways to accomplish what you want...

Since it's sorted, you could use a stage variable to hold the current value of A and a stage variable to hold your values that need to be concatenated.

A quick and easy way to do it would be to use a hash file with column A as the key. Do a lookup on column A, concatenate B with hash column field B, concatenate column C with hash file column C, concatenate column D with hash file column D, then write to/update the hash file with the concatenated values... Then read the rows out of the hash file for further processing or to write to your output.

Sorry if I don't explain it too well, but this is the general idea.

Tony
Post Reply