By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,333 Members | 1,214 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,333 IT Pros & Developers. It's quick & easy.

XML DAD Library List

P: n/a
Lou
Does anyone know how to use and OS/400 library list with a DAD to
indirectly reference the "collection", a.k.a. "database", a.k.a
"library"?

All of the examples I see have the library name hard coded into the
table elements.

Nov 12 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Lou
Can someone help out an old programmer with the DB2 XML Extenders?

I've tried OVRDBF and putting the objects in QTEMP and using *LIBL as
the collection name. Nothing works.

The only way I can get this to work is with:

<table name="library.table" key="KeyField"/>

In the AS/400 world (oops, the iSeries), library names should not be
hard coded like this. We would use a library list (like a path
statement) to allow the table to be found.

I need some way of indirectly specifying the collection (library) name.

Nov 12 '05 #2

P: n/a
Lou wrote:
Can someone help out an old programmer with the DB2 XML Extenders?

I've tried OVRDBF and putting the objects in QTEMP and using *LIBL as
the collection name. Nothing works.

The only way I can get this to work is with:

<table name="library.table" key="KeyField"/>

In the AS/400 world (oops, the iSeries), library names should not be
hard coded like this. We would use a library list (like a path
statement) to allow the table to be found.

I need some way of indirectly specifying the collection (library) name.


(reposting, as my first attempt apparantly did not take)

I don't know about XML DAD, but perhaps this InfoCenter topic would help:
http://publib.boulder.ibm.com/infoce...zmstch2nam.htm

SQL Reference
Language Elements
Naming Conventions
Qualification of unqualified object names

--
Karl Hanson
Nov 12 '05 #3

P: n/a
Lou
Karl,

Thanks for the reference.

Unfortunately the DB2 XML Extender for decomposition does not allow an
SQL to be run. As for setting values in the job space--it ignores them
(mostly).

The required approach of RDB_Node mapping for decomposition is not very
flexible.

For the time being, I have settled on this approach:

1) Define the tables in the DAD with a library name (no choice). Ex.
MyLib.MyTable.
2) Make sure MyTable is in a library in the library list.
3) CPYF *LIBL/MyTable to QTEMP Create=Yes, Copy data=None.
4) OVRDBF MyTable to QTEMP/MyTable.

Part of the Shred process uses the table sefined in step 1), so this
has to exist.
The data winds up in the table in QTEMP.

At this point I know the table with the data is in QTEMP, and I can use
normal iSeries approaches to manipulate it via a library list.

Not a very elegant approach. You have to make sure all of the MyTable
definistions match, you still have to use a hard coded library name,
and you have to go through all of the gymnastics. Also, putting MyTable
in QTEMP introduces all of the limitations of QTEMP (espcially SQL's
dislike of the library).

Oh well.

Nov 12 '05 #4

P: n/a
Unfortunately, there's no way currently around hard-coding the library name.

Any possibility of using XSLT to programmatically transform the DAD for
each library?

Lou wrote:
Karl,

Thanks for the reference.

Unfortunately the DB2 XML Extender for decomposition does not allow an
SQL to be run. As for setting values in the job space--it ignores them
(mostly).

The required approach of RDB_Node mapping for decomposition is not very
flexible.

For the time being, I have settled on this approach:

1) Define the tables in the DAD with a library name (no choice). Ex.
MyLib.MyTable.
2) Make sure MyTable is in a library in the library list.
3) CPYF *LIBL/MyTable to QTEMP Create=Yes, Copy data=None.
4) OVRDBF MyTable to QTEMP/MyTable.

Part of the Shred process uses the table sefined in step 1), so this
has to exist.
The data winds up in the table in QTEMP.

At this point I know the table with the data is in QTEMP, and I can use
normal iSeries approaches to manipulate it via a library list.

Not a very elegant approach. You have to make sure all of the MyTable
definistions match, you still have to use a hard coded library name,
and you have to go through all of the gymnastics. Also, putting MyTable
in QTEMP introduces all of the limitations of QTEMP (espcially SQL's
dislike of the library).

Oh well.


--
Kent Milligan, DB2 & BI team
PartnerWorld for Developers, iSeries
km***@us.eye-bee-m.com (spam trick) GO HAWKEYES!!
www.iseries.ibm.com/db2

(opinions stated are not necessarily those of my employer)
Nov 12 '05 #5

P: n/a
Lou
There is no hole for that Pigeon.

The call to the XML "Shredder" does not ask for an XSLT object. I see
nothing in the DTD for DAD where one could be specified.

DADX might support it, but I am using DAD.

Nov 12 '05 #6

P: n/a
Correct, you would have to do the XSLT process before calling the "Shredder"

Lou wrote:
There is no hole for that Pigeon.

The call to the XML "Shredder" does not ask for an XSLT object. I see
nothing in the DTD for DAD where one could be specified.

DADX might support it, but I am using DAD.


--
Kent Milligan, DB2 & BI team
PartnerWorld for Developers, iSeries
km***@us.eye-bee-m.com (spam trick) GO HAWKEYES!!
www.iseries.ibm.com/db2

(opinions stated are not necessarily those of my employer)
Nov 12 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.