How to count incoming and outgoing rowsusing datastage

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
raghuv
Participant
Posts: 12
Joined: Thu Aug 19, 2004 7:40 pm
Location: Sterling
Contact:

How to count incoming and outgoing rowsusing datastage

Post by raghuv »

Hi everyone

help me to count the incoming rows and outgoing rows...like how many rows have been extracted and loaded.

suggest me any datastage function or any script...

i tried @inrownum and @outRownum system variable functions but dint see exa
john
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Your link statistics are available for export during and after a job has run. You can use multiple methods to extract these statistics, either use a DS BASIC routine and call the job APIs that give you this information; or use the command line program dsjob with the appropriate switches to extract link information.
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
raghuv
Participant
Posts: 12
Joined: Thu Aug 19, 2004 7:40 pm
Location: Sterling
Contact:

will you be little clear

Post by raghuv »

kcbland wrote:Your link statistics are available for export during and after a job has run. You can use multiple methods to extract these statistics, either use a DS BASIC routine and call the job APIs that give you this information; or use the command line program dsjob with the appropriate switches to extract link information.
Hi .

what klind of DS basic routines can you suggest one appropriate..and call the job api's , wat kind of dsjob shud i use ...be little clear im just a novice in datastage.
john
ketfos
Participant
Posts: 562
Joined: Mon May 03, 2004 8:58 pm
Location: san francisco
Contact:

Post by ketfos »

Hi,
Use two DSMacro in transformer

DSLinkRowCount - will give total number of records written
DSRTIRowCount - will give total number of records read


Ketfos
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Do you need this information on all jobs or just this job? What are you doing with this information?
Mamu Kim
martin
Participant
Posts: 67
Joined: Fri Jul 30, 2004 7:19 am
Location: NewJersy

Post by martin »

If are counting incoming and out going rows or want to count no.of rows passing from a particular link in the job, this will work fine.

DSGetLinkInfo(DSJ.ME,%Arg2%,%Arg3%,%Arg4%)

DSJ.ME is Job Name
Arg2 is Stage Name(Odbc or Seq) with in "" ""
Arg3 is Link Name with in "" ""
Arg3 is DSLinkRowCount with In "" ""
martin
Participant
Posts: 67
Joined: Fri Jul 30, 2004 7:19 am
Location: NewJersy

Post by martin »

I Mean all Argunents With In Double qoutes " "
raghuv
Participant
Posts: 12
Joined: Thu Aug 19, 2004 7:40 pm
Location: Sterling
Contact:

thanks martin

Post by raghuv »

hi..

i'll try this on monday..thanks for your support.

regards
raghu
john
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't do it at all during execution. One of the fundamental principles of performance is not to impact performance by trying to measure it. These statistics are collected for you. You can get them from "active stage finishing" events in the log (using BASIC code if you must). Why not just invoke the Director, select that even, and print the detail using "print to file" option? The link row counts that other posters have suggested remain available after the job completes, provided that the job is not re-compiled or reset.
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