Sequence no column in transform stage

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
femil
Participant
Posts: 27
Joined: Mon Nov 02, 2009 10:54 am
Location: chennai

Sequence no column in transform stage

Post by femil »

how to create a sequence value for a column in transform stage?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Depends on what you need it for and what it needs to start from. Simplest way is the @IN/OUTROWNUM system variables. There's also the KeyMgmt routines in the sdk branch. The former starts at 1 but can be given an offset that you increment by them, the latter keeps track per 'object' tracked and each call gets you the next value.
-craig

"You can never have too many knives" -- Logan Nine Fingers
femil
Participant
Posts: 27
Joined: Mon Nov 02, 2009 10:54 am
Location: chennai

Post by femil »

can i simply type @IN/OUTROWNUM in the value field of the output column

of transform stage?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Yes. Sorta. Check the ellipsis (...) in the editor for System Variables and you'll find there are two of them: @INROWNUM and @OUTROWNUM and it's important to understand the difference between them.
-craig

"You can never have too many knives" -- Logan Nine Fingers
femil
Participant
Posts: 27
Joined: Mon Nov 02, 2009 10:54 am
Location: chennai

Post by femil »

thank you craig...
Post Reply