Generating sequence numbers using Stage variables

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

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

Post by chulett »

Assuming, of course, that this load happens in isolation.
-craig

"You can never have too many knives" -- Logan Nine Fingers
karthi_gana
Premium Member
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

jpMaxKeyValue + @INROWNUM

what abt jpMaxKeyValue + DSLinkRowcount?
Karthik
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Too slow. The DSLinkCount macro has to begin an interrogation of the repository for every row processed. The link row count is already available in @OUTROWNUM (or @INROWNUM if an input link).
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
Premium Member
Posts: 729
Joined: Tue Apr 28, 2009 10:49 pm

Post by karthi_gana »

ray.wurlod wrote:Too slow. The DSLinkCount macro has to begin an interrogation of the repository for every row processed. The link row count is already available in @OUTROWNUM (or @INROWNUM if an input link).
Could you please explain it more?
Karthik
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why go back and query the repository every record, which is what the macro does, when you've already got the value you need in a system variable local to the transformer?

(if it starts with '@' it is a system variable, check the online help)
-craig

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