Rowcount in Transformer

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
bhags
Participant
Posts: 2
Joined: Thu May 31, 2007 12:50 pm
Location: St Louis

Rowcount in Transformer

Post by bhags »

Datastage Server Job (Version 8)
Table(in)----->Transformer---------->Sequential file (Out)

Need to determine the row number in the transformer.
In parallel job we can use @@INROWNUM system variable.I can reset the variable after reading 'n' number of rows and update the data with same set of entries consecutively in a parallel job.

Need to achieve the same logic in server job.Please guide
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Stage variable svRowCount. Initialize to 0. Derive as something like

Code: Select all

If Mod(@INROWNUM, #ResetCount#) = 0 Then 0 Else svRowCount + 1
Last edited by ray.wurlod on Wed Jul 04, 2007 3:01 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jguerrero
Participant
Posts: 21
Joined: Wed Aug 27, 2003 5:12 pm
Location: Chile -South America
Contact:

Post by jguerrero »

...just a simple correction

If Mod(@INROWNUM, #ResetCount#) = 0 Then 0 Else Mod(@INROWNUM, #ResetCount#)

:idea:
jguerrero
Participant
Posts: 21
Joined: Wed Aug 27, 2003 5:12 pm
Location: Chile -South America
Contact:

Post by jguerrero »

...just a simple correction

If Mod(@INROWNUM, #ResetCount#) = 0 Then 0 Else Mod(@INROWNUM, #ResetCount#)

:idea:
Post Reply