Saturday, 6 March 2010

BCI.IMPORT posted on website

In my last blog I wrote about using UniVerse as a prototyping tool for rapidly modelling complexity. Creating a prototype application may require a different approach to regular development, with the onus being on dividing a process into stages to ensure that each one can be individually verified. Therefore when modelling financial calculations in particular, I take the approach of generating each step as a workfile, which is less efficient but allows the data from each stage to be assessed and proven.


To assist me in doing this I have been leveraging a set of dictionary-driven tools, along with the much-neglected REFORMAT (often a better choice than INSERT and UPDATE) to handle each stage.

As promised, the first of these is now available on the website, in the hope that it may prove useful to other developers.

BCI.IMPORT, as the name suggests, is an import routine using BCI, the Basic Calling Interface built into UniVerse and enabling access to remote data sources using ODBC. Whilst ODBC has its limitations, the BCI implementation is sufficiently near to the metal that it can be a very fast choice when directed to natively relational databases such as SQL Server. It requires ODBC drivers, which are an additional expense if running on UNIX platforms.

BCI.IMPORT runs either a SQL statement or stored procedure and assigns the results to one or more UniVerse files deriving the keys and fields to be updated from the dictionary. It supports a range of update operations for multivalued data in particular, and provides simple structural validation. More importantly, it enables you to specify expressions using the incoming data following the UniVerse I-Descriptor format, giving full reign to massage and to enrich the incoming data before assigning it.

BCI.IMPORT is free, and can be downloaded from the Freebies section of the website. As always, comments and suggestions welcome.

0 comments: