From: Karl Hanson on
Dave Hughes wrote:
> Ion Freeman wrote:
>
>> Hi!
>> My database work has been largely with SQL Server, PostgreSQL and
>> Oracle, so when I have a DB2 question, I don't really know where to
>> turn. I could find the documentation for the current version of DB2 on
>> IBM's website, but I don't know if what's true for the current version
>> is true for the version my client has. Can someone point me to older
>> docs?
>
> Sure - as you're dealing with DB2 for AS/400 (aka iSeries), you'll need
> the i5/OS InfoCenter (which documents everything about i5/OS, including
> the integrated DB2 database).
>
<snip>
>
>> The question is simply this:
>> 1. There are a number of tables on a DB2 database
>> 2. The client pushes this data out to our data store
>> 3. We'd like to know if there is some way for them to only publish the
>> data that's been added, updated or deleted since the last time they
>> published.
>>
>> Now, they're not going to change the tables, and we don't want to ask
>> a lot of their DBAs. Does DB2 always supply this functionality?
>
> Not on any edition I know of - you'd need some column indicating the
> last modification timestamp of a row to know whether it'd changed since
> the last time you checked it.
>
> Certainly on DB2 for Linux/UNIX/Windows, tables don't include such a
> column by default. While I'm less familiar with DB2 for z/OS and DB2
> for i5/OS, I don't believe they include such a column by default either.
>
>> I'm working on finding out what version of DB2 they have, but it's on
>> AS/400. Does this exclude DataPropagator as a solution?
>
> I'm not familiar with DataPropogator, so I can't say whether it'll do
> what you want, but according to [4] it does appear to be available for
> iSeries.
>
> [1] http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp
>
> [2]
> http://publib.boulder.ibm.com/infocenter/systems/scope/i5os/index.jsp
>
> [3] http://www-304.ibm.com/systems/support/i/forums/index.html
>
> [4]
> http://www-306.ibm.com/software/data/integration/replication/edition_i.h
> tml
>

This is probably a long shot, but if the client tables are journaled (eg
for commitment control), there may be a way to use journal APIs along
with the data captured in journals to determine "new" data since it was
last published. I mention this because it might provide a means to
either determine which rows have changed (to formulate SQL queries), or
perhaps the new data could be extracted from journal entries, without
actually changing table definitions.

http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaki/rzakiconcepts.htm
http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/apis/jc1.htm

Fyi - another newsgroup where many System i (aka iSeries, AS/400)
experts contribute is: comp.sys.ibm.as400.misc
You might ask for ideas there as well.

--
Karl Hanson