OUTROWNUM function

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
SBSA_DW
Premium Member
Premium Member
Posts: 6
Joined: Thu Jul 24, 2008 1:53 am

OUTROWNUM function

Post by SBSA_DW »

Hi Everyone

I'm rewriting a job on the Enterprise Edition which was originally written on the Standard Edition. The job uses the @OUTROWNUM function on one column to count each row and give each row a unique number which doesn't work as well on the Enterprise Edition because numbers are being repeated because of partitioning, can anyone assist?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

Construct an expression that takes the partition number and number of partitions into account, for example initialize a counter (stage variable) to the partition number and increment it by the number of partitions.

All counters begin at zero; you may wish to add one to your initializations to get something akin to @OUTROWNUM in server jobs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply