Page 1 of 1

generate sequence number ! old stuff !!!

Posted: Fri Sep 21, 2012 1:10 am
by karthi_gana
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".

Posted: Fri Sep 21, 2012 1:53 am
by ray.wurlod
Yes but you don't need either. You can do it with system variables.

Posted: Fri Sep 21, 2012 7:06 am
by chulett
OK... how would one generate a "sequence number" with the new transformer looping? Forgive me but not getting the how of that. :?

Posted: Fri Sep 21, 2012 3:16 pm
by ray.wurlod
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.

Posted: Fri Sep 21, 2012 3:18 pm
by chulett
Errr... ok. :shock:

:wink:

Posted: Fri Sep 21, 2012 3:21 pm
by ray.wurlod
So long as you don't run out of memory!

Posted: Sun Sep 23, 2012 9:54 pm
by karthi_gana
system variable? which one?

Posted: Sun Sep 23, 2012 10:02 pm
by chulett
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 "@".

Posted: Mon Sep 24, 2012 12:06 am
by ray.wurlod
You probably meant "system variables", in particular @NUMPARTITIONS, @PARTITIONNUM and @INROWNUM.