Reading input&output rows

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
datastage_lost
Participant
Posts: 21
Joined: Thu Nov 18, 2010 3:39 pm

Reading input&output rows

Post by datastage_lost »

Hello

I need to read the number of records that come from one source and verify that are inserted into a target.
source schema -> transform -> destination

to know how they recover and how many are rejected and all who successfully complete ..

any idea how to do this task
gTy
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Download ETLstats from Kim Duke's website and save re-inventing the wheel.

Otherwise "roll your own" using DataStage API functions including DSGetStageInfo() and DSGetLinkinfo().
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
datastage_lost
Participant
Posts: 21
Joined: Thu Nov 18, 2010 3:39 pm

I think

Post by datastage_lost »

I think I explain bad.

The scenario is as follows: I have a job that reads an XML file, this XML file is generated through the Job propierties < After subroutine instruction -> dsJobreport > of each job executed.

With an independent job, I need to read the information from the XML file and take some fields to insert into a table and a follow-up audit, the scheme of this job is the following:

FOLDER -> XML STAGE -> Transform -> Table 1
-> Table 2

Inside the transformer stage, there are some operations, such as calculating time, add tags, etc, etc, and this is where I need to add 2 fields,

how much records come through the XML and insert into the database, but my understanding is that I can not have this information until the job is finished running.

Is this correct?

And I need this information when the job still running...
gTy
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You didn't say why you needed the information while the job is running. Actually this is easier - the row count on the input link is given by the @INROWNUM system variable, while the row count on the output link is given by the @OUTROWNUM system variable.

Note that, if running a parallel job on more than one node, these values will be per node.
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