Using Oracle Template Library and CodeGen 'lite'

This page describes a streamlined approach to accessing Oracle data using Sergei Kuchins excellent Oracle Template Library (OTL). I have personally found conventional Oracle Call Interface (OCI) programming to be tedious and ugly, Sergei has done a great job of wrapping this library into what he terms an 'appliance', where i/o is done with otl_streams. An otl_stream is much like any other i/o stream, except it is opened with SQL to be run against the server, and data is shunted back and forth using the >> and << operators.

Lets assume you have an existing Oracle database schema which contains a table named FILESET:

SQL> desc FILESET;
 Name                            Null?    Type
 ------------------------------- -------- ----
 FILESET_NAME                             VARCHAR2(128)
 DS_NAME_ID                               NUMBER(38)
 TAPE_LABEL                               VARCHAR2(128)
 TAPE_PARTITION                           NUMBER(38)
 CREATE_TIME                              NUMBER(38)
 FILE_COUNT                               NUMBER(38)

SQL> 


Dennis Box
Last modified: Fri Dec 10 18:03:36 CST 1999