DataStage Scenario?

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
A_SUSHMA
Participant
Posts: 43
Joined: Fri Apr 12, 2013 10:34 am

DataStage Scenario?

Post by A_SUSHMA »

Hi All,

I have I/P is

EMPNO
1
2
3

I want O/P

EMPNO
1,2,3
ssnegi
Participant
Posts: 138
Joined: Thu Nov 15, 2007 4:17 am
Location: Sydney, Australia

Reply

Post by ssnegi »

In transformer create dummy deptno column and hard code 1.
Then in another transformer
deptno - partition hash, sort ascending
empno - no partition, sort only ascending

stage variable :
svempno :- if input.deptno = svdeptnold then svempnold :',': input.empno else input.empno
svdeptnold :- input.deptno
svempnold :- svempno

you can also modify the svempno stage variable to include the deptno :
svempno :- if input.deptno = svdeptnold then svempnold :',': input.empno else input.deptno:',':input.empno
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Pivot.
Column Export.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

:evil:

I am seriously considering deleting posts that literally contain nothing but input and output examples. We must put an end to this madness. I cannot say this enough -

Spell out your requirements in words
Tell us what you've tried
Tell us what issues you've had


Do not simply drop off your dirty laundry here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply