-----Original Message-----
From: Kim Duke [mailto:
Kim_G_Duke@Yahoo.com]
Sent: Thursday, October 16, 2003 10:29 AM
To:
datastage-users@oliver.com
Subject: RE: How to check for 0 update on DB2 stage
Kenneth
I am sorry. I meant you could use DSGetJobInfo() and all the routines in
BASIC to get the row counts of a job after the fact. I don't know of any
SQL to do what they wanted.
Thanks Kim.
Kim Duke
DsWebMon - Safely Monitor DataStage from the Web
www.Duke-Consulting.com
-----Original Message-----
From: Kenneth Bland [mailto:
kcbland_2000@yahoo.com]
Sent: Thursday, October 16, 2003 8:42 AM
To:
datastage-users@oliver.com
Subject: RE: How to check for 0 update on DB2 stage
Respectfully, Kim, I think your answer is not correct
for the stated question. Tom asked if he could check
the return value from DB2 for each row passed. Even
using custom SQL, as he stated, will not help you.
You have NO mechanism for accumulating information
with custom SQL as to how each row is being handled by
the target and then publishing that information,
outside of using a stored procedure. Link statistics
only state how many rows went down a link.
I repeat my original statement: The only way to know
if a row is going to insert or update is to first
query the table to see if it's already there and
branch your output.
If you attempt an update when a row is not there,
DataStage is oblivious to this. You can pass 100
billion rows down a link with update existing rows
only SQL and it will look like you updated 100 billion
rows, even if the rows aren't there.
-Ken
--- Kim Duke wrote:
> Tom
>
> After the job finished you can check the row counts.
> If you search
>
http://www.dsxchange.com/ then you can find code to
> show you how.
>
> Thanks Kim.
> Kim Duke
> DsWebMon - Safely Monitor DataStage from the Web
>
www.Duke-Consulting.com
>
>
> -----Original Message-----
> From: Kenneth Bland [mailto:
kcbland_2000@yahoo.com]
> Sent: Thursday, October 16, 2003 7:38 AM
> To:
datastage-users@oliver.com
> Subject: Re: How to check for 0 update on DB2 stage
>
> No. There is no inherent mechanisms for feedback as
> to how SQL in performing, with the exception of
> truncation/warning/reject messages from any
> database.
>
> It behooves you greatly to predetermine the path
> your
> row will take, insert or update, and partition the
> data into those two groups. You greatly enhance
> restart capability if you first spooled your data to
> load ready files. This is the great difference
> between restart and reload if your jobstream should
> fail. In addition, you collect the appropriate
> metadata, as well as open up the possibility of bulk
> loading inserts (highly desirable).
>
> Good luck!
> -Ken
>
>
>
> ---
tom.peter.nielsen@nordea.com wrote:
> > Hi,
> >
> > I'm using a user defined SQL on a DB2 stage, AIX
> > 5.2, DS 6.0.1R5.
> >
> > Is there anyway to check if i'm not finding any
> rows
> > to update ?
> > DB2 return values:
> > SQLCODE of +100 or an SQLSTATE of '02000'
> >
> > Any idea how i can check for these values from
> > DataStage ?
> >
> > br
> > Tom
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site
> design software
>
http://sitebuilder.yahoo.com
>
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com