Page 1 of 1

Vertical Pivot

Posted: Thu Jul 21, 2016 4:56 am
by chandra.shekhar@tcs.com
Dear Team,

We are facing issue while doing vertical pivoting in datastage .

More description as follows:

Job :

db2 ---> Pivot (vertical pivot) ----->fixedwidth File


job functionality :

We have requirement of below output (after vertical Pivot) .

COL1|COL2|COL3
A|1|1|1
B|2|2|2
C|3|3|3

But if db2 query passes only 2 records only then output is like as follows which is disturbing the order of fixed width file.

COL1|COL2|COL3
A|1|1|1
C|3|3|3

Here the missing line is B|2|2|2


Fixedwidth file output as follows:

1|1|1|3|3|3

but if db2 passes only 2 records then it should give me below expected output .

COL1|COL2|COL3
A|1|1|1
B|0|0|0
C|3|3|3


Expected Fixedwidth file output as follows:

1|1|1|0|0|0|3|3|3

How we can achieve the same ?

Thanks

Posted: Thu Jul 21, 2016 2:29 pm
by rkashyap
Could you share the requirement in words. Examples are good, but only in conjunction with a requirement description. ;-)

Posted: Thu Jul 21, 2016 4:07 pm
by ray.wurlod
I should have thought TCS would always require an algorithm specification.

Posted: Sun Jul 24, 2016 6:41 pm
by chulett
rkashyap wrote:Could you share the requirement in words. Examples are good, but only in conjunction with a requirement description. ;-)
Real examples are good. Made up ones? Not so much.

Re: Vertical Pivot

Posted: Tue Jul 26, 2016 12:12 am
by SURA
I think the code is working as expected. If you have master KEY values, then keep it in a table as a source and left out join the data table (present source) so that you can get the result as expected.

Correct me if i haven't paid enough attention!

Posted: Tue Jul 26, 2016 6:43 am
by chulett
SURA - almost 1200 posts and you are still quoting entire messages to reply? Please learn to love the Reply to topic button, less for me to clean up that way. :wink:

Posted: Thu Jul 28, 2016 8:46 pm
by SURA
Noted.

Not by intention.