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
karthi_gana
Premium Member
Posts: 729 Joined: Tue Apr 28, 2009 10:49 pm
Post
by karthi_gana » Fri Sep 21, 2012 1:10 am
All,
We are using Datastage 8.5 version. I have a requirement to generate the sequence number based on some code.
This can be done with the help of 2 or 3 stage variables. But i just wanted to know is this can be done with the use of "TRANSFORMER LOOP".
Karthik
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Fri Sep 21, 2012 1:53 am
Yes but you don't need either. You can do it with system variables.
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Sep 21, 2012 7:06 am
OK... how would one generate a "sequence number" with the new transformer looping? Forgive me but not getting the how of that.
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Fri Sep 21, 2012 3:16 pm
By storing the entire data stream on the SaveInputRecord stack, generating the counter while popping records off the stack once end of data has occurred.
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Fri Sep 21, 2012 3:18 pm
Errr... ok.
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Fri Sep 21, 2012 3:21 pm
So long as you don't run out of memory!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
karthi_gana
Premium Member
Posts: 729 Joined: Tue Apr 28, 2009 10:49 pm
Post
by karthi_gana » Sun Sep 23, 2012 9:54 pm
system variable? which one?
Karthik
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Sun Sep 23, 2012 10:02 pm
The ones you're using when you said "This can be done with the help of 2 or 3 stage variables" - they're the ones in there that start with an "@".
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Mon Sep 24, 2012 12:06 am
You probably meant "system variables", in particular @NUMPARTITIONS, @PARTITIONNUM and @INROWNUM.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.