solution

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
madhava1238
Participant
Posts: 15
Joined: Mon May 05, 2008 5:12 am
Location: chennai

solution

Post by madhava1238 »

Hi
All,

i have a file like this(data is like this)

a - -
- b -
- - c

and i want result is:
a b c


Thanks & Regards,
Madhava
Madhava
wfis
Premium Member
Premium Member
Posts: 70
Joined: Wed Feb 28, 2007 2:38 am
Location: India

Post by wfis »

Please use a more meaningful subject line for your queries.
Search the forum for 'Pivot'. There are many posts matching your requirement.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: solution

Post by sachin1 »

first try to replace your '-' with blank..........you will get column as
a
b
c
then using stage variable and hash file you will get the required format.

job design

seqfile--------->T1-------------->T2---------->HASHfile

in T1 do trim(ereplace(input.col1,"-",""))

in T2 do concat using stage variable.............use fixed value for key in hashfile like numeric value 1 or 2.........
madhava1238
Participant
Posts: 15
Joined: Mon May 05, 2008 5:12 am
Location: chennai

getting solution

Post by madhava1238 »

Hi
iwas getting answer,

seq.....> aggregator....... .>transfor........>seqfile

in Aggregator we r grouping max(col name) to all then we will get the required format


Regards,
Madhava.
Madhava
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please mark thread as Resolved.

The present tense plural form of the verb "to be" is spelled "are", not "r".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply