- No longer maintaned -

The project has retired. While I still think that the proposed memory structure would combine the best of both worlds (the ease of processing the old buffer structure combined with the flexible field lengths of the new buffer structure), it is obvious that this approach requires the backing of the vendor to be fully effective.

Thats why the related DbtuTools project - see [here] - is using an different approach for its dbtuwho tool. There, it was choosen to implement a parsing mechanism (see the DbtuTools_Parser_FindSnapshotBufferElement() function in libdbtubase.sqc) which is able to "find" the location of the data in question. It then returns an array of pointers to the matching data elements.

DbtuFpsLib (V0.99/R002)


Abstract

DbtuFpsLib is a library released under the GNU Lesser General Public License. The sample implementation dbtuwho is released under the GNU General Public License.

When I started with the developement of dbtuwho, I tryed to use the new so called "self-describing data stream". The first job was to check the status of the monitor switches. With the old "fixed size structures" in mind I wasn't glad about the more of coding to get the needed informations.

So I decided to build up an layer between the calling application and the "self-describing data stream". The idear was to combine

The result is the FPS (Flow of Pointer Structs) model.

Figure 1: Illustrates the type of use of the DbtuFpsLib

In an typical scenario for the DbtuFpsLib a program takes an snapshot using the offical API function db2GetSnapshot(). The results are stored in the output buffer. Within this buffer the data is organized in a unsorted*) sequence of sqlm_header_info (one per group) and sqlm_header_data (one per element) structs.

The next step is to call the FPS library function DbtuFps_BuildUp(). This function walks through the given output buffer and builds up the FPS buffer. The FPS buffer always starts with an sFpsInfoStruct_Begin struct and ends with an sFpsInfoStruct_End struct - in between the sFpsDataStruct_* structs are placed. Every sFpsDataStruct_* struct stands for a group of elements (like in the fixed structure method, defined in DB2 Version 5 and lower) and contains pointers to the data fields within the output buffer.

In a last step the calling program processes the FPS buffer and navigates through the collected data group-/structwise. Within the group/struct the elements can directly accessed using its name (defined in the struct).

More details can be found in the header file MyDbtuFps.h

*)Only within the same level the data can be unsorted.


Download

The library and its sample implementation is packed into one tarball.

DbtuFpsLib-0.99.002.tar.gz

The history of changes and new features can be found in the CHANGELOG


Feedback

When you have further neads, comments, found bugs or something else, please feal free to contact me.
-> Positive feedback is good for motivation, constructive feedback is good for the product!