增加oracle 11g x86版 instantclient
diff --git a/sdk/demo/cdemo81.c b/sdk/demo/cdemo81.c
new file mode 100755
index 0000000..f9db754
--- /dev/null
+++ b/sdk/demo/cdemo81.c
@@ -0,0 +1,445 @@
+#ifdef RCSID
+static char *RCSid =
+   "$Header: cdemo81.c 14-apr-2006.10:55:52 lburgess Exp $ ";
+#endif /* RCSID */
+
+/* Copyright (c) 1996, 2006, Oracle. All rights reserved.  
+*/
+
+/*
+
+   NAME
+     cdemo81.c - Basic OCI V8 functionality
+
+   DESCRIPTION
+
+ *  An example program which adds new employee
+ *  records to the personnel data base.  Checking
+ *  is done to insure the integrity of the data base.
+ *  The employee numbers are automatically selected using
+ *  the current maximum employee number as the start.
+ *
+ *  The program queries the user for data as follows:
+ *
+ *  Enter employee name:
+ *  Enter employee job:
+ *  Enter employee salary:
+ *  Enter employee dept:
+ *
+ *  The program terminates if return key (CR) is entered
+ *  when the employee name is requested.
+ *
+ *  If the record is successfully inserted, the following
+ *  is printed:
+ *
+ *  "ename" added to department "dname" as employee # "empno"
+
+   Demonstrates creating a connection, a session and executing some SQL.
+   Also shows the usage of allocating memory for application use which has the
+   life time of the handle.
+
+   MODIFIED   (MM/DD/YY)
+   lburgess    04/14/06 - lowercase passwords 
+   aliu        04/21/06 - use OCIEnvCreate and exit if it fails 
+   mjaeger     07/14/99 - bug 808870: OCCS: convert tabs, no long lines
+   dchatter    10/14/98 - add the usage of xtrmemsz and usrmempp
+   azhao       06/23/97 - Use OCIBindByPos, OCIBindByName; clean up
+   echen       12/17/96 - OCI beautification
+   dchatter    07/18/96 - delete spurious header files
+   dchatter    07/15/96 - hda is a ub4 array to prevent bus error
+   mgianata    06/17/96 - change ociisc() to OCISessionBegin()
+   aroy        04/26/96 - change OCITransCommitt -> OCITransCommit
+   slari       04/24/96 - use OCITransCommitt
+   aroy        02/21/96 - fix bug in get descriptor handle call
+   lchidamb    02/20/96 - cdemo81.c converted for v8 OCI
+   lchidamb    02/20/96 - Creation
+
+*/
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <oci.h>
+
+static text *username = (text *) "SCOTT";
+static text *password = (text *) "tiger";
+
+/* Define SQL statements to be used in program. */
+static text *insert = (text *)"INSERT INTO emp(empno, ename, job, sal, deptno)\
+  VALUES (:empno, :ename, :job, :sal, :deptno)";
+static text *seldept = (text *)"SELECT dname FROM dept WHERE deptno = :1";
+static text *maxemp = (text *)"SELECT NVL(MAX(empno), 0) FROM emp";
+static text *selemp = (text *)"SELECT ename, job FROM emp";
+
+static OCIEnv *envhp;
+static OCIError *errhp;
+
+static void checkerr(/*_ OCIError *errhp, sword status _*/);
+static void cleanup(/*_ void _*/);
+static void myfflush(/*_ void _*/);
+int main(/*_ int argc, char *argv[] _*/);
+
+static sword status;
+
+int main(argc, argv)
+int argc;
+char *argv[];
+{
+
+  sword    empno, sal, deptno;
+  sword    len, len2, rv, dsize, dsize2;
+  sb4      enamelen = 10;
+  sb4      joblen = 9;
+  sb4      deptlen = 14;
+  sb2      sal_ind, job_ind;
+  sb2      db_type, db2_type;
+  sb1      name_buf[20], name2_buf[20];
+  text     *cp, *ename, *job, *dept;
+
+  sb2      ind[2];                                              /* indicator */
+  ub2      alen[2];                                         /* actual length */
+  ub2      rlen[2];                                         /* return length */
+
+  OCIDescribe  *dschndl1 = (OCIDescribe *) 0,
+               *dschndl2 = (OCIDescribe *) 0,
+               *dschndl3 = (OCIDescribe *) 0;
+
+  OCISession *authp = (OCISession *) 0;
+  OCIServer *srvhp;
+  OCISvcCtx *svchp;
+  OCIStmt   *inserthp,
+            *stmthp,
+            *stmthp1;
+  OCIDefine *defnp = (OCIDefine *) 0;
+
+  OCIBind  *bnd1p = (OCIBind *) 0;             /* the first bind handle */
+  OCIBind  *bnd2p = (OCIBind *) 0;             /* the second bind handle */
+  OCIBind  *bnd3p = (OCIBind *) 0;             /* the third bind handle */
+  OCIBind  *bnd4p = (OCIBind *) 0;             /* the fourth bind handle */
+  OCIBind  *bnd5p = (OCIBind *) 0;             /* the fifth bind handle */
+  OCIBind  *bnd6p = (OCIBind *) 0;             /* the sixth bind handle */
+
+  sword errcode = 0;
+
+  errcode = OCIEnvCreate((OCIEnv **) &envhp, (ub4) OCI_DEFAULT,
+                  (dvoid *) 0, (dvoid * (*)(dvoid *,size_t)) 0,
+                  (dvoid * (*)(dvoid *, dvoid *, size_t)) 0,
+                  (void (*)(dvoid *, dvoid *)) 0, (size_t) 0, (dvoid **) 0);
+
+  if (errcode != 0) {
+    (void) printf("OCIEnvCreate failed with errcode = %d.\n", errcode);
+    exit(1);
+  }
+
+  (void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &errhp, OCI_HTYPE_ERROR,
+                   (size_t) 0, (dvoid **) 0);
+
+  /* server contexts */
+  (void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &srvhp, OCI_HTYPE_SERVER,
+                   (size_t) 0, (dvoid **) 0);
+
+  (void) OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &svchp, OCI_HTYPE_SVCCTX,
+                   (size_t) 0, (dvoid **) 0);
+
+  (void) OCIServerAttach( srvhp, errhp, (text *)"", strlen(""), 0);
+
+  /* set attribute server context in the service context */
+  (void) OCIAttrSet( (dvoid *) svchp, OCI_HTYPE_SVCCTX, (dvoid *)srvhp,
+                     (ub4) 0, OCI_ATTR_SERVER, (OCIError *) errhp);
+
+  (void) OCIHandleAlloc((dvoid *) envhp, (dvoid **)&authp,
+                        (ub4) OCI_HTYPE_SESSION, (size_t) 0, (dvoid **) 0);
+
+  (void) OCIAttrSet((dvoid *) authp, (ub4) OCI_HTYPE_SESSION,
+                 (dvoid *) username, (ub4) strlen((char *)username),
+                 (ub4) OCI_ATTR_USERNAME, errhp);
+
+  (void) OCIAttrSet((dvoid *) authp, (ub4) OCI_HTYPE_SESSION,
+                 (dvoid *) password, (ub4) strlen((char *)password),
+                 (ub4) OCI_ATTR_PASSWORD, errhp);
+
+  checkerr(errhp, OCISessionBegin ( svchp,  errhp, authp, OCI_CRED_RDBMS,
+                          (ub4) OCI_DEFAULT));
+
+  (void) OCIAttrSet((dvoid *) svchp, (ub4) OCI_HTYPE_SVCCTX,
+                   (dvoid *) authp, (ub4) 0,
+                   (ub4) OCI_ATTR_SESSION, errhp);
+
+  checkerr(errhp, OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &stmthp,
+           OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0));
+
+  checkerr(errhp, OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &stmthp1,
+           OCI_HTYPE_STMT, (size_t) 0, (dvoid **) 0));
+
+  /* Retrieve the current maximum employee number. */
+  checkerr(errhp, OCIStmtPrepare(stmthp, errhp, maxemp,
+                                (ub4) strlen((char *) maxemp),
+                                (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT));
+
+  /* bind the input variable */
+  checkerr(errhp, OCIDefineByPos(stmthp, &defnp, errhp, 1, (dvoid *) &empno,
+                   (sword) sizeof(sword), SQLT_INT, (dvoid *) 0, (ub2 *)0,
+                   (ub2 *)0, OCI_DEFAULT));
+
+  /* execute and fetch */
+  if (status = OCIStmtExecute(svchp, stmthp, errhp, (ub4) 1, (ub4) 0,
+               (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT))
+  {
+    if (status == OCI_NO_DATA)
+      empno = 10;
+    else
+    {
+      checkerr(errhp, status);
+      cleanup();
+      return OCI_ERROR;
+    }
+  }
+
+
+  /*
+   * When we bind the insert statement we also need to allocate the storage
+   * of the employee name and the job description.
+   * Since the lifetime of these buffers are the same as the statement, we
+   * will allocate it at the time when the statement handle is allocated; this
+   * will get freed when the statement disappears and there is less
+   * fragmentation.
+   *
+   * sizes required are enamelen+2 and joblen+2 to allow for \n and \0
+   *
+   */
+
+
+  checkerr(errhp, OCIHandleAlloc( (dvoid *) envhp, (dvoid **) &inserthp,
+           OCI_HTYPE_STMT, (size_t) enamelen + 2 + joblen + 2,
+           (dvoid **) &ename));
+  job   = (text *) (ename+enamelen+2);
+
+
+  checkerr(errhp, OCIStmtPrepare(stmthp, errhp, insert,
+                                (ub4) strlen((char *) insert),
+                                (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT));
+
+  checkerr(errhp, OCIStmtPrepare(stmthp1, errhp, seldept,
+                                (ub4) strlen((char *) seldept),
+                                (ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT));
+
+
+  /*  Bind the placeholders in the INSERT statement. */
+  if ((status = OCIBindByName(stmthp, &bnd1p, errhp, (text *) ":ENAME",
+             -1, (dvoid *) ename,
+             enamelen+1, SQLT_STR, (dvoid *) 0,
+             (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) ||
+      (status = OCIBindByName(stmthp, &bnd2p, errhp, (text *) ":JOB",
+             -1, (dvoid *) job,
+             joblen+1, SQLT_STR, (dvoid *) &job_ind,
+             (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) ||
+      (status = OCIBindByName(stmthp, &bnd3p, errhp, (text *) ":SAL",
+             -1, (dvoid *) &sal,
+             (sword) sizeof(sal), SQLT_INT, (dvoid *) &sal_ind,
+             (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) ||
+      (status = OCIBindByName(stmthp, &bnd4p, errhp, (text *) ":DEPTNO",
+             -1, (dvoid *) &deptno,
+             (sword) sizeof(deptno), SQLT_INT, (dvoid *) 0,
+             (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)) ||
+      (status = OCIBindByName(stmthp, &bnd5p, errhp, (text *) ":EMPNO",
+             -1, (dvoid *) &empno,
+             (sword) sizeof(empno), SQLT_INT, (dvoid *) 0,
+             (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT)))
+  {
+    checkerr(errhp, status);
+    cleanup();
+    return OCI_ERROR;
+  }
+
+  /*  Bind the placeholder in the "seldept" statement. */
+  if (status = OCIBindByPos(stmthp1, &bnd6p, errhp, 1,
+           (dvoid *) &deptno, (sword) sizeof(deptno),SQLT_INT,
+           (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT))
+  {
+    checkerr(errhp, status);
+    cleanup();
+    return OCI_ERROR;
+  }
+
+  /*  Allocate the dept buffer now that you have length. */
+  /* the deptlen should eventually get from dschndl3.    */
+  deptlen = 14;
+  dept = (text *) malloc((size_t) deptlen + 1);
+
+  /*  Define the output variable for the select-list. */
+  if (status = OCIDefineByPos(stmthp1, &defnp, errhp, 1,
+                             (dvoid *) dept, deptlen+1, SQLT_STR,
+                             (dvoid *) 0, (ub2 *) 0, (ub2 *) 0, OCI_DEFAULT))
+  {
+    checkerr(errhp, status);
+    cleanup();
+    return OCI_ERROR;
+  }
+
+  for (;;)
+  {
+    /* Prompt for employee name.  Break on no name. */
+    printf("\nEnter employee name (or CR to EXIT): ");
+    fgets((char *) ename, (int) enamelen+1, stdin);
+    cp = (text *) strchr((char *) ename, '\n');
+    if (cp == ename)
+    {
+      printf("Exiting... ");
+      cleanup();
+      return OCI_SUCCESS;
+    }
+    if (cp)
+      *cp = '\0';
+    else
+    {
+      printf("Employee name may be truncated.\n");
+      myfflush();
+    }
+    /*  Prompt for the employee's job and salary. */
+    printf("Enter employee job: ");
+    job_ind = 0;
+    fgets((char *) job, (int) joblen + 1, stdin);
+    cp = (text *) strchr((char *) job, '\n');
+    if (cp == job)
+    {
+      job_ind = -1;            /* make it NULL in table */
+      printf("Job is NULL.\n");/* using indicator variable */
+    }
+    else if (cp == 0)
+    {
+      printf("Job description may be truncated.\n");
+      myfflush();
+    }
+    else
+      *cp = '\0';
+
+    printf("Enter employee salary: ");
+    scanf("%d", &sal);
+    myfflush();
+    sal_ind = (sal <= 0) ? -2 : 0;  /* set indicator variable */
+
+    /*
+     *  Prompt for the employee's department number, and verify
+     *  that the entered department number is valid
+     *  by executing and fetching.
+     */
+    do
+    {
+      printf("Enter employee dept: ");
+      scanf("%d", &deptno);
+      myfflush();
+      if ((status = OCIStmtExecute(svchp, stmthp1, errhp, (ub4) 1, (ub4) 0,
+               (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT))
+          && (status != OCI_NO_DATA))
+      {
+        checkerr(errhp, status);
+        cleanup();
+        return OCI_ERROR;
+      }
+      if (status == OCI_NO_DATA)
+        printf("The dept you entered doesn't exist.\n");
+      } while (status == OCI_NO_DATA);
+
+      /*
+       *  Increment empno by 10, and execute the INSERT
+       *  statement. If the return code is 1 (duplicate
+       *  value in index), then generate the next
+       *  employee number.
+       */
+      empno += 10;
+      if ((status = OCIStmtExecute(svchp, stmthp, errhp, (ub4) 1, (ub4) 0,
+               (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT))
+               && status != 1)
+      {
+        checkerr(errhp, status);
+        cleanup();
+        return OCI_ERROR;
+      }
+      while (status == 1)
+      {
+        empno += 10;
+        if ((status = OCIStmtExecute(svchp, stmthp, errhp, (ub4) 1, (ub4) 0,
+               (CONST OCISnapshot *) NULL, (OCISnapshot *) NULL, OCI_DEFAULT))
+                && status != 1)
+        {
+          checkerr(errhp, status);
+          cleanup();
+          return OCI_ERROR;
+        }
+      }  /* end for (;;) */
+
+      /* Commit the change. */
+      if (status = OCITransCommit(svchp, errhp, 0))
+      {
+        checkerr(errhp, status);
+        cleanup();
+        return OCI_ERROR;
+      }
+      printf("\n\n%s added to the %s department as employee number %d\n",
+                 ename, dept, empno);
+  }
+}
+
+
+void checkerr(errhp, status)
+OCIError *errhp;
+sword status;
+{
+  text errbuf[512];
+  sb4 errcode = 0;
+
+  switch (status)
+  {
+  case OCI_SUCCESS:
+    break;
+  case OCI_SUCCESS_WITH_INFO:
+    (void) printf("Error - OCI_SUCCESS_WITH_INFO\n");
+    break;
+  case OCI_NEED_DATA:
+    (void) printf("Error - OCI_NEED_DATA\n");
+    break;
+  case OCI_NO_DATA:
+    (void) printf("Error - OCI_NODATA\n");
+    break;
+  case OCI_ERROR:
+    (void) OCIErrorGet((dvoid *)errhp, (ub4) 1, (text *) NULL, &errcode,
+                        errbuf, (ub4) sizeof(errbuf), OCI_HTYPE_ERROR);
+    (void) printf("Error - %.*s\n", 512, errbuf);
+    break;
+  case OCI_INVALID_HANDLE:
+    (void) printf("Error - OCI_INVALID_HANDLE\n");
+    break;
+  case OCI_STILL_EXECUTING:
+    (void) printf("Error - OCI_STILL_EXECUTE\n");
+    break;
+  case OCI_CONTINUE:
+    (void) printf("Error - OCI_CONTINUE\n");
+    break;
+  default:
+    break;
+  }
+}
+
+
+/*
+ *  Exit program with an exit code.
+ */
+void cleanup()
+{
+  if (envhp)
+    (void) OCIHandleFree((dvoid *) envhp, OCI_HTYPE_ENV);
+  return;
+}
+
+
+void myfflush()
+{
+  eb1 buf[50];
+
+  fgets((char *) buf, 50, stdin);
+}
+
+
+/* end of file cdemo81.c */
+
diff --git a/sdk/demo/demo.mk b/sdk/demo/demo.mk
new file mode 100755
index 0000000..78dfb0c
--- /dev/null
+++ b/sdk/demo/demo.mk
@@ -0,0 +1,153 @@
+#/bin/make
+###############################################################################
+#                       Make file for OCI and OCCI demos
+###############################################################################
+#  Usage :
+# For compiling & linking the cdemo81.c file
+#    make -f demo.mk buildoci EXE=cdemo81 OBJS=cdemo81.o 
+#
+# For compiling & linking the occidml.cpp
+#    make -f demo.mk buildocci EXE=occidml OBJS=occidml.o
+#
+# For compiling & linking the occiobj.cpp
+#    make -f demo.mk occiobj 
+#
+# In general, for any occi program
+#    make -f demo.mk buildocci EXE=<exename> OBJS="<list of dependent objs>"
+#
+# For compiling all demos
+#    make -f demo.mk
+#
+# NOTE: Please change cc and CC to point to the appropiate location on your
+#       machine.
+#
+###############################################################################
+
+.SUFFIXES: .o .c .cpp
+
+CC=/opt/SunProd/SUNWspro6.1/bin/CC
+cc=/opt/SunProd/SUNWspro6.1/bin/cc
+
+ICINCHOME=../
+ICLIBHOME=../../
+ICLIBPATH=-L$(ICLIBHOME)
+THREADLIBS=-lthread
+CCLIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS)
+
+CCINCLUDES = -I$(ICINCHOME)include
+
+CCFLAGS=$(CCINCLUDES) -D_REENTRANT -g -xs 
+LDFLAGS=
+SO_EXT=.so
+
+REMOVE=rm -rf
+MKLINK=ln
+MAKE=make
+MAKEFILE=demo.mk
+CLNCACHE=cleancache
+CACHEDIR=SunWS_cache
+
+CDEMOEXE=cdemo81
+CDEMOOBJS=cdemo81.o
+OCCIDEMO=occidml
+OCCIOBJDEMO=occiobj
+OTT=../ott
+OCCIOTTUSR=hr
+OCCIOTTPWD=hr
+
+.cpp.o:
+	$(CC) -c -I$(ICINCHOME)include $(CCFLAGS) $<
+
+.c.o:
+	$(cc) -c -I$(ICINCHOME)include $(CCFLAGS) $<
+
+all: clean buildoci $(OCCIDEMO) $(OCCIOBJDEMO)
+
+buildoci: $(CLNCACHE) $(LIBCLNT) $(CDEMOOBJS)
+	$(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
+	$(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
+	$(CC) -o $(CDEMOEXE) $(LDFLAGS) $(CDEMOOBJS) $(CCLIB)
+	$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+	$(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+buildocci: $(CLNCACHE) $(LIBCLNT) $(OBJS)
+	$(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
+	$(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT)
+	$(CC) -o $(EXE) $(LDFLAGS) $(OBJS) $(CCLIB)
+	$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+	$(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+$(OCCIDEMO):
+	$(MAKE) -f $(MAKEFILE) buildocci OBJS=$@.o EXE=$@
+
+$(OCCIOBJDEMO):
+	$(OTT) userid=$(OCCIOTTUSR)/$(OCCIOTTPWD) \
+                intype=$@.typ \
+                outtype=$@out.type \
+                code=cpp \
+                hfile=$@.h \
+                cppfile=$@o.cpp \
+                attraccess=private \
+                unicode=none
+	$(MAKE) -f $(MAKEFILE) buildocci OBJS="$@.o $@m.o $@o.o" EXE=$@
+
+cleancache:
+	$(REMOVE) $(CACHEDIR)
+	$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+	$(REMOVE) $(ICLIBHOME)libocci$(SO_EXT)
+
+clean: $(CLNCACHE)
+	$(REMOVE) cdemo81 cdemo81.o occidml occidml.o occiobj occiobj.o occiobjo* occiobjm* occiobj.h occiobjout.type
+
+
+
+#
+# This port-specific file is currently empty on Solaris. Product
+# lines may use this file to override compiler definitions and
+# flags used in occi.mk.
+#
+
+# Linux compiler definitions
+CC=/usr/bin/gcc
+cc=/usr/bin/gcc
+
+ifeq ($(BUILD32),T)
+CCFLAGS=$(CCINCLUDES) -DLINUX -D_GNU_SOURCE -D_REENTRANT -g -m32
+LDFLAGS=-g -m32
+else
+CCFLAGS=$(CCINCLUDES) -DLINUX -D_GNU_SOURCE -D_REENTRANT -g
+LDFLAGS=-g
+endif
+CLNCACHE=
+
+# This macro CCINCLUDES has to be redefined on Linux because of
+# the existence of the 'new' directory in t_work. The name new
+# clashes with a system header file.
+CCINCLUDES = -I$(SRCHOME)/rdbms/public/ \
+-I$(SRCHOME)/oracore/include -I$(SRCHOME)/oracore/public \
+-I$(SRCHOME)/oracore/port/include \
+-I$(SRCHOME)/nlsrtl/include -I$(SRCHOME)/plsql/public \
+-I$(SRCHOME)/plsql/include -I$(SRCHOME)/network/public \
+-I$(SRCHOME)/network/include -I$(SRCHOME)/otrace/public \
+-I$(SRCHOME)/otrace/include/ -I$(SRCHOME)/precomp/public \
+-I$(SRCHOME)/precomp/include/ -I$(SRCHOME)/slax/include \
+-I$(SRCHOME)/ordts/public -I$(SRCHOME)/ordts/include \
+-I$(SRCHOME)/javavm/include \
+-I$(SRCHOME)/javavm/include/osds/unix/solaris \
+-I$(SRCHOME)/ctx/public -I$(SRCHOME)/ordvir/public \
+-I$(SRCHOME)/ordvir/include -I$(SRCHOME)/rdbms/src/hdir \
+-idirafter .
+
+THREADLIBS=-lpthread
+
+ifdef BUILD_CCC296
+CC=/usr/bin/g++296
+CCFLAGS = -include /ee/dev/bastring.h $(CCINCLUDES) -wchar-stdc++ -DLINUX -D_GNU_SOURCE -D_REENTRANT -g
+endif
+
+ifdef BUILD_ICC
+COMPDIR=/usr/local/packages/icc_remote/10.1.022
+CC=$(COMPDIR)/bin/icpc
+CCFLAGS += -DOCCI_NO_WSTRING=1
+endif
+
diff --git a/sdk/demo/demo_proc_ic.mk b/sdk/demo/demo_proc_ic.mk
new file mode 100755
index 0000000..107f6a9
--- /dev/null
+++ b/sdk/demo/demo_proc_ic.mk
@@ -0,0 +1,128 @@
+#/bin/make
+###############################################################################
+#                       Make file for PROC demos
+###############################################################################
+#  Usage :
+# For compiling proc demos
+#    make -f demo_proc_ic.mk
+#
+# For precompiling, compiling & linking the procdemo.pc file
+#    make -f demo_proc_ic.mk build EXE=procdemo OBJS=procdemo.o
+#
+# In general, for any proc program
+#    make -f demo_proc_ic.mk build EXE=<exename> OBJS="<list of dependent objs>"
+#
+#    To make use of any PROC options during precompilation, 
+#        make -f demo_proc_ic.mk build PROCFLAGS="<list of proc options>" 
+#            EXE=<exename> OBJS="<list of dependent objs>"
+#
+# NOTES: 
+#    1. Please change "cc/CC" and the "InstantClient directories" to point to 
+#       appropiate locations on your machine before using this makefile.
+#    2. In case of RPM installation, please change the following variables
+#       as mentioned below:
+#         PROC=/usr/lib/oracle/VV.v/client/bin/proc
+#         CCINCLUDES=$(I_SYM)/usr/include/oracle/VV.v/client
+#         PRECOMPPUBH=/usr/include/oracle/VV.v/client
+#         ICLIBHOME=/usr/lib/oracle/VV.v/client/lib/
+#       Legend:
+#         VV - Major Oracle version number
+#          v - Minor Oracle version number
+#         (Ex:  For the release 11.2, VV = 11 and v = 2)
+#
+###############################################################################
+
+
+CC=/usr/bin/gcc
+cc=/usr/bin/gcc
+
+# InstantClient Directories.
+ICSDKHOME=../
+ICLIBHOME=../../
+
+MKLINK=ln
+REMOVE=rm -rf
+CLNCACHE=cleancache
+CACHEDIR=SunWS_cachea
+MAKE=make
+MAKEFILE=demo_proc_ic.mk
+PROCDEMO=procdemo
+
+PROC=$(ICSDKHOME)proc
+SO_EXT=.so
+I_SYM=-I
+
+CCINCLUDES= $(I_SYM)$(ICSDKHOME)include
+
+# Pre-compiler Flags.
+PRECOMP_INCLUDE=$(I_SYM). $(SYS_INCLUDE)
+PRECOMPPUBH=$(ICSDKHOME)include
+SYS_INCLUDE=sys_include=\($(PRECOMPPUBH),/usr/include,/usr/lib/gcc-lib/x86_64-redhat-linux/3.2.3/include,/usr/lib/gcc/x86_64-redhat-linux/4.1.1/include,/usr/lib64/gcc/x86_64-suse-linux/4.1.2/include,/usr/lib64/gcc/x86_64-suse-linux/4.3/include,/usr/lib/gcc/x86_64-redhat-linux/4.4.6/include,/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include\)
+
+# Compiler Flags.
+OPTIMIZE=-O2
+LDPATHFLAG=-L
+SPFLAGS=-DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS
+CCFLAGS= -fPIC -DPRECOMP
+LDFLAGS=-g
+LPFLAGS=
+GFLAG=
+CDEBUG=
+USRFLAGS=
+ICLIBPATH=$(LDPATHFLAG)$(ICLIBHOME)
+PFLAGS=$(CCINCLUDES) $(SPFLAGS) $(LPFLAGS)
+CFLAGS=$(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS) $(USRFLAGS)
+
+# Libraries.
+PROLDLIBS=$(LDCLIENTLIBS) $(THREADLIBS)
+LDCLIENTLIBS=$(ICLIBPATH) $(LLIBCLNTSH) $(LDLIBS)
+LLIBCLNTSH=$(LDLIBFLAG)$(LIBCLNTSHNAME)
+LDLIBFLAG=-l
+LIBCLNTSHNAME=clntsh
+LDLIBS=$(EXSYSLIBS) $(MATHLIB) $(USRLIBS)
+EXSYSLIBS=-ldl
+MATHLIB=-lm
+THREADLIBS=-lpthread
+
+C2O=$(CC) $(CFLAGS) -c $*.c
+PCC2C=$(PROC) $(PROCFLAGS) iname=$(PCCSRC) $(PRECOMP_INCLUDE)
+DEMO_PROC_BUILD=$(CC) -o $(EXE) $(OBJS) $(LDFLAGS) $(PROLDLIBS)
+
+#-----------------------------------------------------------------------------
+# Targets for building the proc sample programs.
+all: clean $(PROCDEMO)
+
+$(PROCDEMO):
+	$(MAKE) -f $(MAKEFILE) build OBJS=$@.o EXE=$@
+	
+build: $(CLNCACHE) $(OBJS)
+	$(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
+	$(DEMO_PROC_BUILD)
+	$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+
+#-----------------------------------------------------------------------------
+# Here are some rules for converting .pc -> .c -> .o
+.SUFFIXES: .pc .c .o
+
+pc1:
+	$(PCC2C)
+
+.pc.c:
+	$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCFLAGS)" PCCSRC=$* I_SYM=include= pc1
+
+.pc.o:
+	$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCFLAGS)" PCCSRC=$* I_SYM=include= pc1
+	$(C2O)
+
+.c.o:
+	$(C2O)
+
+#-----------------------------------------------------------------------------
+# Clean up all executables, *.o and generated *.c files
+clean: $(CLNCACHE)
+	$(REMOVE) $(PROCDEMO) $(PROCDEMO).o $(PROCDEMO).c $(PROCDEMO).lis
+
+cleancache:
+	$(REMOVE) $(CACHEDIR)
+	$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+
diff --git a/sdk/demo/demo_procob_ic.mk b/sdk/demo/demo_procob_ic.mk
new file mode 100755
index 0000000..25723ed
--- /dev/null
+++ b/sdk/demo/demo_procob_ic.mk
@@ -0,0 +1,99 @@
+
+###############################################################################
+#                       Make file for PROCOB demos
+###############################################################################
+#  Usage :
+# For compiling procob demos
+#    make -f demo_procob_ic.mk
+#
+# For precompiling, compiling & linking the procobdemo.pco file
+#    make -f demo_procob_ic.mk build EXE=procobdemo COBS=procobdemo.cob
+#
+# In general, for any procob program
+#    make -f demo_procob_ic.mk build EXE=<exename> COBS="<list of dependent cobs>"
+#    To make use of any PROCOB options during precompilation, 
+#        make -f demo_procob_ic.mk build PROCOBFLAGS="<list of procob options>" 
+#            EXE=<exename> COBS="<list of dependent cobs>"
+#
+# NOTES: 
+#    1. Please change "COB" and the "InstantClient directories" to point to 
+#       appropiate locations on your machine before using this makefile.
+#    2. In case of RPM installation, please change the following variables
+#       as mentioned below:
+#         PROCOB=/usr/lib/oracle/VV.v/client/bin/procob
+#         ICLIBHOME=/usr/lib/oracle/VV.v/client/lib/
+#       Legend:
+#         VV - Major Oracle version number
+#          v - Minor Oracle version number
+#         (Ex:  For the release 11.2, VV = 11 and v = 2)
+#
+###############################################################################
+
+COB=cob
+
+# InstantClient Directories.
+ICSDKHOME=../
+ICLIBHOME=../../
+
+MKLINK=ln
+REMOVE=rm -rf
+CLNCACHE=cleancache
+CACHEDIR=SunWS_cachea
+MAKE=make
+MAKEFILE=demo_procob_ic.mk
+PROCOBDEMO=procobdemo
+
+PROCOB=$(ICSDKHOME)/procob
+ICLIBPATH=$(LDPATHFLAG)$(ICLIBHOME)
+SO_EXT=.so
+COBFLAGS=-C IBMCOMP -C NESTCALL -t -x
+LDPATHFLAG=-L
+COBSQLINTF=$(ICLIBHOME)cobsqlintf.o
+LDLIBS=$(EXSYSLIBS) $(MATHLIB) $(USRLIBS)
+EXSYSLIBS=-ldl
+MATHLIB=-lm
+COBOL_PROLDLIBS=$(SHARED_CLIENTLIBS) $(LDLIBS)
+SHARED_CLIENTLIBS=$(LLIBCLNTSH) $(LDFLAGS)
+LLIBCLNTSH=$(LDLIBFLAG)$(LIBCLNTSHNAME)
+LDLIBFLAG=-l
+LIBCLNTSHNAME=clntsh
+LDFLAGS=-g
+
+DEMO_PROCOB_BUILD=$(COB) $(COBFLAGS) -o $(EXE) $(COBS) $(ICLIBPATH) $(COBSQLINTF) $(COBOL_PROLDLIBS)
+
+#-----------------------------------------------------------------------------
+# Targets for building the procob sample programs.
+#
+# The target 'build' puts together an executable $(EXE) from the cobol
+# sources in $(COBS) and the libraries in $(COBOL_PROLDLIBS).
+# The rules to make .cob files from .pco files are later in this file.
+#
+all: clean $(PROCOBDEMO)
+
+$(PROCOBDEMO):
+	$(MAKE) -f $(MAKEFILE) build COBS=$@.cob EXE=$@
+	
+build: $(CLNCACHE) $(COBS)
+	$(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
+	$(DEMO_PROCOB_BUILD)
+	$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
+
+#-----------------------------------------------------------------------------
+# Here are some rules for converting .pco -> .cob -> .o and for .cob -> .gnt.
+#
+.SUFFIXES: .cob .cbl .o .pco $(GNT)
+
+.pco.cob:
+	$(PROCOB) $(PROCOBFLAGS) iname=$*.pco
+
+.cob$(GNT):
+	$(COB2GNT)
+
+#-----------------------------------------------------------------------------
+# Clean up all executables, *.o and generated *.cob files
+clean: $(CLNCACHE)
+	$(REMOVE) $(PROCOBDEMO) $(PROCOBDEMO).o $(PROCOBDEMO).cob $(PROCDEMO).lis $(PROCOBDEMO).int $(PROCOBDEMO).idy 
+
+cleancache:
+	$(REMOVE) $(CACHEDIR)
+	$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
diff --git a/sdk/demo/occidemo.sql b/sdk/demo/occidemo.sql
new file mode 100755
index 0000000..6d1c6a8
--- /dev/null
+++ b/sdk/demo/occidemo.sql
@@ -0,0 +1,344 @@
+/* Copyright (c) 2002, 2004, Oracle. All rights reserved.  */
+
+/*
+  NAME
+    occidemo.sql - Create OCCI demo objects
+
+  DESCRIPTION
+    SQL Script to create OCCI demo objects
+    Assumes HR schema is setup
+    Assumes system's account passwd to be manager
+    Execute this before any of the OCCI demos are run
+    To drop the objects created by this SQL use occidemod.sql
+
+  MODIFIED
+    sudsrini   03/06/03  - sudsrini_occi_10ir1_demos (include occidemod)
+    idcqe      03/13/01  - Created
+
+*/
+
+
+/* Drop objects before creating them */ 
+
+@occidemod.sql
+
+connect hr/hr
+
+CREATE TABLE elements (
+  element_name VARCHAR2(25),
+  molar_volume BINARY_FLOAT,
+  atomic_weight BINARY_DOUBLE
+);
+
+CREATE TABLE author_tab ( 
+  author_id NUMBER, 
+  author_name VARCHAR2(25) 
+); 
+
+INSERT INTO author_tab (author_id, author_name) VALUES (333, 'JOE');
+INSERT INTO author_tab (author_id, author_name) VALUES (444, 'SMITH');
+
+CREATE OR REPLACE TYPE publ_address AS OBJECT ( 
+  street_no NUMBER, 
+  city VARCHAR2(25) 
+) 
+/ 
+
+CREATE TABLE publisher_tab ( 
+  publisher_id NUMBER, 
+  publisher_add publ_address 
+); 
+
+INSERT INTO publisher_tab (publisher_id, publisher_add) VALUES 
+(11, publ_address (121, 'NEW YORK'));
+
+CREATE TABLE publ_address_tab OF publ_address; 
+
+INSERT INTO publ_address_tab VALUES (22, 'BOSTON');
+INSERT INTO publ_address_tab VALUES (33, 'BUFFALO');
+INSERT INTO publ_address_tab VALUES (44, 'CALIFORNIA');
+
+
+CREATE OR REPLACE TYPE journal AS TABLE OF VARCHAR2(50) 
+/ 
+CREATE TABLE journal_tab (jid NUMBER, jname journal) 
+NESTED TABLE jname STORE AS journal_store;
+
+INSERT INTO journal_tab (jid, jname) VALUES (22, journal ('NATION', 'TIMES'));
+INSERT INTO journal_tab (jid, jname) VALUES (33, journal ('CRICKET', 'ALIVE'));
+
+CREATE OR REPLACE TYPE people_obj AS OBJECT ( 
+  ssn NUMBER, 
+  name VARCHAR2(25) 
+) NOT FINAL; 
+/ 
+
+CREATE OR REPLACE TYPE librarian UNDER people_obj( 
+   empno NUMBER, 
+   sal   NUMBER(7,2), 
+   dob   DATE, 
+   photo BLOB 
+) 
+/ 
+
+CREATE TABLE librarian_tab OF librarian; 
+
+INSERT INTO librarian_tab VALUES 
+(101, 'DAVE', 1001, 10000, '12-Jan-1970', empty_blob());
+INSERT INTO librarian_tab VALUES 
+(102, 'BOB', 1002, 12000, '17-Jan-1970', empty_blob());
+
+CREATE TABLE article_tab ( 
+  artid NUMBER, 
+  artdesc VARCHAR2(4000), 
+  artsummary LONG,
+  artfeedbk VARCHAR2(2000)
+); 
+
+CREATE OR REPLACE PROCEDURE demo_proc (col1 IN NUMBER, col2 IN OUT VARCHAR2,
+col3 OUT CHAR) AS
+BEGIN 
+  col2 := col1 || ' ' || col2 || ' ' || 'IN-OUT';
+  col3 := 'OUT'; 
+END;
+/
+
+CREATE OR REPLACE FUNCTION demo_fun (col1 IN NUMBER,
+col2 IN OUT VARCHAR2, col3 OUT CHAR) RETURN CHAR AS 
+BEGIN 
+  col2 := col1 || ' ' || col2 || ' ' || 'IN-OUT'; 
+  col3 := 'OUT'; 
+  RETURN 'abcd';
+END;
+/
+
+CREATE TABLE book (bookid NUMBER, summary VARCHAR2(4000));
+
+CREATE TABLE cover (c1 NUMBER(5), c2 VARCHAR2(20));
+
+DECLARE 
+ch1 VARCHAR2(4000) := 'aa'; 
+ch2 VARCHAR2(4000):= '';
+nu NUMBER := 0; 
+BEGIN 
+  FOR nu IN 1..11 LOOP
+    ch2 := ch1 || ch2; ch1 := ch2; 
+  END LOOP; 
+  INSERT INTO book (bookid, summary) VALUES (11, ch1); 
+END;
+/
+
+CREATE TYPE elecdoc_typ AS OBJECT
+    ( document_typ      VARCHAR2(32)
+    , formatted_doc     BLOB
+    ) ;
+/
+CREATE TYPE elecdoc_tab AS TABLE OF elecdoc_typ;
+/
+
+CREATE TYPE elheader_typ AS OBJECT
+    ( header_name        VARCHAR2(256)
+    , creation_date      DATE
+    , header_text        VARCHAR2(1024)
+    , logo               BLOB
+    );
+/
+
+CREATE TABLE electronic_media
+    ( product_id        NUMBER(6)
+    , ad_id             NUMBER(6)
+    , ad_composite      BLOB
+    , ad_sourcetext     CLOB
+    , ad_finaltext      CLOB
+    , ad_fltextn        NCLOB
+    , ad_elecdocs_ntab  elecdoc_tab
+    , ad_photo          BLOB
+    , ad_graphic        BFILE
+    , ad_header         elheader_typ
+    , press_release     LONG
+    ) NESTED TABLE ad_elecdocs_ntab STORE AS elecdocs_nestedtab;
+CREATE UNIQUE INDEX printmedia_pk
+    ON electronic_media (product_id, ad_id);
+
+ALTER TABLE electronic_media
+ADD ( CONSTRAINT printmedia__pk
+      PRIMARY KEY (product_id, ad_id)
+    ) ;
+
+
+
+CREATE TYPE people_typ AS OBJECT
+(
+  name VARCHAR2(30),
+  ssn NUMBER,
+  dob DATE
+) not final;
+/
+
+CREATE TABLE people_tab OF people_typ;
+
+INSERT INTO people_tab VALUES (people_typ('john', 111, '01-Jan-1970'));
+INSERT INTO people_tab VALUES (people_typ('jill', 666, '06-Jan-1976'));
+
+CREATE TYPE student UNDER people_typ
+(
+  stud_id NUMBER,
+  teammate REF people_typ
+) NOT FINAL;
+/
+
+CREATE TABLE student_tab OF student;
+INSERT INTO student_tab VALUES ('jimmy',222,'02-Feb-1976',200,
+(SELECT REF(a) FROM people_tab a where name='john'));
+
+CREATE TYPE parttime_stud UNDER student
+(
+  course_id NUMBER,
+  partner REF student
+)NOT FINAL;
+/
+CREATE TABLE parttime_stud_tab OF parttime_stud;
+
+INSERT INTO parttime_stud_tab VALUES ('james',333,'03-Feb-1976',300,
+(SELECT REF(a) FROM people_tab a where name='john'),3000,
+(SELECT REF(a) FROM student_tab a));
+
+
+CREATE TYPE foreign_student UNDER parttime_stud
+(
+  country VARCHAR2(30),
+  leader REF parttime_stud
+);
+/
+CREATE TABLE foreign_student_tab OF foreign_student;
+
+COMMIT;
+
+
+/* OCCI AQ Objects */
+
+
+connect system/manager 
+
+grant aq_administrator_role, aq_user_role to hr;
+grant execute on dbms_aq to hr;
+grant execute on dbms_aqadm to hr;
+
+BEGIN
+  dbms_aqadm.grant_system_privilege('ENQUEUE_ANY','hr',FALSE);
+  dbms_aqadm.grant_system_privilege('DEQUEUE_ANY','hr',FALSE);
+END;
+/
+
+connect hr/hr
+
+CREATE OR REPLACE TYPE hr_obj AS OBJECT
+(a1 NUMBER, a2 VARCHAR2(25));
+/
+
+BEGIN
+  dbms_aqadm.create_queue_table (
+  queue_table => 'hr.table01',
+  queue_payload_type => 'RAW',
+  comment => 'single-consumer',
+  multiple_consumers => false,
+  compatible => '8.1.0'
+);
+END;
+/
+
+BEGIN
+  dbms_aqadm.create_queue (
+  queue_name => 'queue01', 
+  queue_table=> 'hr.table01' 
+);
+END;
+/
+BEGIN
+  dbms_aqadm.start_queue(queue_name => 'queue01');
+END;
+/
+
+BEGIN
+  dbms_aqadm.create_queue_table (
+  queue_table => 'hr.table02',
+  queue_payload_type => 'SYS.ANYDATA',
+  comment => 'multi-consumer',
+  multiple_consumers => true,
+  compatible => '8.1.0'
+);
+END;
+/
+
+BEGIN
+  dbms_aqadm.create_queue (
+  queue_name => 'queue02',
+  queue_table=> 'hr.table02'
+);
+END;
+/
+BEGIN
+  dbms_aqadm.start_queue(queue_name => 'queue02');
+END;
+/
+
+BEGIN
+  dbms_aqadm.create_queue_table (
+  queue_table => 'hr.table03',
+  queue_payload_type => 'hr_obj',
+  comment => 'multi-consumer',
+  multiple_consumers => true,
+  compatible => '8.1.0'
+);
+END;
+/
+
+BEGIN
+  dbms_aqadm.create_queue (
+  queue_name => 'queue03',
+  queue_table=> 'hr.table03'
+);
+END;
+/
+BEGIN
+  dbms_aqadm.start_queue(queue_name => 'queue03');
+END;
+/
+
+BEGIN
+  dbms_aqadm.create_queue_table (
+  queue_table => 'hr.table04',
+  queue_payload_type => 'RAW',
+  comment => 'multiple-consumer',
+  multiple_consumers => true,
+  compatible => '8.1.0'
+);
+END;
+/
+
+BEGIN
+  dbms_aqadm.create_queue (
+  queue_name => 'queue04',
+  queue_table=> 'hr.table04'
+);
+END;
+/
+BEGIN
+  dbms_aqadm.start_queue(queue_name => 'queue04');
+END;
+/
+
+Rem Add default local subscribers to the queues
+
+BEGIN
+  dbms_aqadm.add_subscriber( queue_name=> 'queue03',
+           subscriber=> sys.aq$_agent('AGT1','hr.queue03', 0));
+END;
+/
+
+BEGIN
+  dbms_aqadm.add_subscriber( queue_name=> 'queue04',
+           subscriber=> sys.aq$_agent('AGT1','hr.queue04', 0));
+END;
+/
+
diff --git a/sdk/demo/occidemod.sql b/sdk/demo/occidemod.sql
new file mode 100755
index 0000000..d5d4ce7
--- /dev/null
+++ b/sdk/demo/occidemod.sql
@@ -0,0 +1,121 @@
+/* Copyright (c) 2002, 2003, Oracle Corporation.  All rights reserved.  */
+
+/*
+  NAME
+    occidemod - SQL Script to drop OCCI demo objects
+
+  DESCRIPTION
+    SQL Script to drop OCCI demo objects created by occidemo.sql
+    To be run in the end to drop OCCI demo objects from HR schema
+
+  MODIFIED
+    sudsrini   03/06/03  - sudsrini_occi_10ir1_demos
+    sudsrini   02/21/03  - Created
+
+*/
+
+connect hr/hr
+
+DROP PROCEDURE demo_proc;
+DROP FUNCTION demo_fun;
+
+DROP TABLE elements;
+DROP TABLE author_tab;
+DROP TABLE publisher_tab;
+DROP TABLE publ_address_tab;
+DROP TABLE journal_tab;
+DROP TABLE article_tab;
+DROP TABLE librarian_tab;
+DROP TABLE book;
+DROP TABLE cover;
+
+DROP TYPE journal;
+DROP TYPE publ_address;
+DROP TYPE librarian;
+DROP TYPE people_obj;
+
+
+DROP TABLE electronic_media;
+DROP TYPE elheader_typ;
+DROP TYPE elecdoc_tab;
+DROP TYPE elecdoc_typ;
+
+DROP TABLE foreign_student_tab;
+DROP TABLE parttime_stud_tab;
+DROP TABLE student_tab;
+DROP TABLE people_tab;
+DROP TYPE foreign_student;
+DROP TYPE parttime_stud;
+DROP TYPE student;
+DROP TYPE people_typ;
+
+/* OCCI AQ Object */
+
+connect system/manager 
+
+revoke aq_administrator_role from hr;
+
+connect hr/hr
+
+BEGIN
+  dbms_aqadm.stop_queue(queue_name => 'queue01');
+END;
+/
+
+BEGIN
+  dbms_aqadm.drop_queue('queue01');
+END;
+/
+
+BEGIN
+  dbms_aqadm.drop_queue_table('hr.table01');
+END;
+/
+
+BEGIN
+  dbms_aqadm.stop_queue(queue_name => 'queue02');
+END;
+/
+
+BEGIN
+  dbms_aqadm.drop_queue('queue02');
+END;
+/
+
+BEGIN
+  dbms_aqadm.drop_queue_table('hr.table02');
+END;
+/
+
+BEGIN
+  dbms_aqadm.stop_queue(queue_name => 'queue03');
+END;
+/
+
+BEGIN
+  dbms_aqadm.drop_queue('queue03');
+END;
+/
+
+BEGIN
+  dbms_aqadm.drop_queue_table('hr.table03');
+END;
+/
+
+BEGIN
+  dbms_aqadm.stop_queue(queue_name => 'queue04');
+END;
+/
+
+BEGIN
+  dbms_aqadm.drop_queue('queue04');
+END;
+/
+
+BEGIN
+  dbms_aqadm.drop_queue_table('hr.table04');
+END;
+/
+
+DROP TYPE hr_obj;
+
diff --git a/sdk/demo/occidml.cpp b/sdk/demo/occidml.cpp
new file mode 100755
index 0000000..ec5381c
--- /dev/null
+++ b/sdk/demo/occidml.cpp
@@ -0,0 +1,292 @@
+/* Copyright (c) 2001, 2008, Oracle. All rights reserved.  */
+/*
+   NAME
+     occidml.cpp - Basic DML Operations demo
+
+   DESCRIPTION
+     To exhibit the insertion, selection, updating and deletion of
+     a row using OCCI interface
+
+   MODIFIED   (MM/DD/YY)
+   mvasudev   05/22/08 - Add try/catch blocks
+   sudsrini   10/22/06 - Username/Password lower case
+   lburgess   04/14/06 - lowercase passwords 
+   sudsrini   07/23/04 - Copyright Info
+   idcqe      03/05/01 - Creation
+
+*/
+
+#include <iostream>
+#include <occi.h>
+using namespace oracle::occi;
+using namespace std;
+
+class  occidml
+{
+  private:
+
+  Environment *env;
+  Connection *conn;
+  Statement *stmt;
+  public:
+
+  occidml (string user, string passwd, string db)
+  {
+    env = Environment::createEnvironment (Environment::DEFAULT);
+    conn = env->createConnection (user, passwd, db);
+  }
+
+  ~occidml ()
+  {
+    env->terminateConnection (conn);
+    Environment::terminateEnvironment (env);
+  }
+
+  /**
+   * Insertion of a row with dynamic binding, PreparedStatement functionality.
+   */
+  void insertBind (int c1, string c2)
+  {
+    string sqlStmt = "INSERT INTO author_tab VALUES (:x, :y)";
+    stmt=conn->createStatement (sqlStmt);
+    try{
+    stmt->setInt (1, c1);
+    stmt->setString (2, c2);
+    stmt->executeUpdate ();
+    cout << "insert - Success" << endl;
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for insertBind"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    conn->terminateStatement (stmt);
+  }
+
+  /**
+   * Inserting a row into the table.
+   */
+  void insertRow ()
+  {
+    string sqlStmt = "INSERT INTO author_tab VALUES (111, 'ASHOK')";
+    stmt = conn->createStatement (sqlStmt);
+    try{
+    stmt->executeUpdate ();
+    cout << "insert - Success" << endl;
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for insertRow"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    conn->terminateStatement (stmt);
+  }
+
+  /**
+   * updating a row
+   */
+  void updateRow (int c1, string c2)
+  {
+    string sqlStmt = 
+      "UPDATE author_tab SET author_name = :x WHERE author_id = :y";
+    stmt = conn->createStatement (sqlStmt);
+    try{
+    stmt->setString (1, c2);
+    stmt->setInt (2, c1);
+    stmt->executeUpdate ();
+    cout << "update - Success" << endl;
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for updateRow"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    conn->terminateStatement (stmt);
+  }
+
+
+  /**
+   * deletion of a row
+   */
+  void deleteRow (int c1, string c2)
+  {
+    string sqlStmt = 
+      "DELETE FROM author_tab WHERE author_id= :x AND author_name = :y";
+    stmt = conn->createStatement (sqlStmt);
+    try{
+    stmt->setInt (1, c1);
+    stmt->setString (2, c2);
+    stmt->executeUpdate ();
+    cout << "delete - Success" << endl;
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for deleteRow"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    conn->terminateStatement (stmt);
+  }
+
+  /**
+   * displaying all the rows in the table
+   */
+  void displayAllRows ()
+  {
+    string sqlStmt = "SELECT author_id, author_name FROM author_tab \
+    order by author_id";
+    stmt = conn->createStatement (sqlStmt);
+    ResultSet *rset = stmt->executeQuery ();
+    try{
+    while (rset->next ())
+    {
+      cout << "author_id: " << rset->getInt (1) << "  author_name: " 
+        << rset->getString (2) << endl;
+    }
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for displayAllRows"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    stmt->closeResultSet (rset);
+    conn->terminateStatement (stmt);
+  }
+
+  /**
+   * Inserting a row into elements table.
+   * Demonstrating the usage of BFloat and BDouble datatypes
+   */
+  void insertElement (string elm_name, float mvol=0.0, double awt=0.0)
+  {
+    BFloat mol_vol;
+    BDouble at_wt;
+
+    if (!(mvol))
+      mol_vol.isNull = TRUE;
+    else
+      mol_vol.value = mvol;
+
+    if (!(awt))
+      at_wt.isNull = TRUE;
+    else
+      at_wt.value = awt;
+
+    string sqlStmt = "INSERT INTO elements VALUES (:v1, :v2, :v3)";
+    stmt = conn->createStatement (sqlStmt);
+
+    try{
+    stmt->setString(1, elm_name);
+    stmt->setBFloat(2, mol_vol);
+    stmt->setBDouble(3, at_wt);
+    stmt->executeUpdate ();
+    cout << "insertElement - Success" << endl;
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for insertElement"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+    conn->terminateStatement (stmt);
+  }
+
+  /**
+   * displaying rows from element table
+   */
+  void displayElements ()
+  {
+    string sqlStmt = 
+           "SELECT element_name, molar_volume, atomic_weight FROM elements \
+    order by element_name";
+    stmt = conn->createStatement (sqlStmt);
+    ResultSet *rset = stmt->executeQuery ();
+    try{
+    cout.precision(7);
+    while (rset->next ())
+    {
+      string elem_name = rset->getString(1);
+      BFloat mol_vol = rset->getBFloat(2);
+      BDouble at_wt = rset->getBDouble(3);
+
+      cout << "Element Name: " << elem_name << endl;
+
+      if ( mol_vol.isNull )
+        cout << "Molar Volume is NULL" << endl;
+      else
+        cout << "Molar Volume: " << mol_vol.value << " cm3 mol-1" << endl;
+
+      if ( at_wt.isNull )
+        cout << "Atomic Weight is NULL" << endl;
+      else
+        cout << "Atomic Weight: " << at_wt.value << " g/mole" << endl;
+    }
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for displayElements"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    stmt->closeResultSet (rset);
+    conn->terminateStatement (stmt);
+  }
+
+}; // end of class  occidml
+
+
+int main (void)
+{
+  string user = "hr";
+  string passwd = "hr";
+  string db = "";
+  try{
+  cout << "occidml - Exhibiting simple insert, delete & update operations" 
+       << endl;
+  occidml *demo = new occidml (user, passwd, db);
+  cout << "Displaying all records before any operation" << endl;
+  demo->displayAllRows ();
+
+  cout << "Inserting a record into the table author_tab " 
+    << endl;
+  demo->insertRow ();
+
+  cout << "Displaying the records after insert " << endl;
+  demo->displayAllRows ();
+
+  cout << "Inserting a records into the table author_tab using dynamic bind"
+    << endl;
+  demo->insertBind (222, "ANAND");
+ 
+  cout << "Displaying the records after insert using dynamic bind" << endl;
+  demo->displayAllRows ();
+
+  cout << "deleting a row with author_id as 222 from author_tab table" << endl;
+  demo->deleteRow (222, "ANAND");
+
+  cout << "updating a row with author_id as 444 from author_tab table" << endl;
+  demo->updateRow (444, "ADAM");
+
+  cout << "displaying all rows after all the operations" << endl;
+  demo->displayAllRows ();
+
+  cout << "inserting radio active element properties" << endl;
+  demo->insertElement ("Uranium", 12.572, 238.0289 );
+  demo->insertElement ("Plutonium", 12.12, 244.0642 );
+  demo->insertElement ("Curium", 18.17, 247.0703 );
+  demo->insertElement ("Thorium");
+  demo->insertElement ("Radium", 41.337, 226.0254);
+
+  cout << "displaying all radio active element properties" << endl;
+  demo->displayElements ();
+
+  delete (demo);
+  }
+  catch (SQLException ex){
+    cout << ex.getMessage() << endl;
+  }
+  cout << "occidml - done" << endl;
+}
diff --git a/sdk/demo/occiobj.cpp b/sdk/demo/occiobj.cpp
new file mode 100755
index 0000000..499595a
--- /dev/null
+++ b/sdk/demo/occiobj.cpp
@@ -0,0 +1,196 @@
+/* Copyright (c) 2001, 2006, Oracle. All rights reserved.  */
+/*
+   NAME
+     occiobj.cpp - OCCI Embedded Object demo
+
+   DESCRIPTION
+     This demo performs all DML operations using OCCI interface
+     on embedded object column of table
+
+
+   MODIFIED   (MM/DD/YY)
+   sudsrini    10/22/06 - Username/Password lower case
+   lburgess    04/14/06 - lowercase passwords 
+   sudsrini    07/23/04 - Copyright Info
+   idcqe       03/05/01 - Creation
+
+*/
+
+#include <iostream>
+#include "occiobjm.h"
+
+using namespace oracle::occi;
+using namespace std;
+
+class occiobj
+{
+  private:
+
+  Environment *env;
+  Connection *con;
+  Statement *stmt;
+  public:
+
+  occiobj (string user, string passwd, string db)
+  {
+    env = Environment::createEnvironment (Environment::OBJECT);
+    occiobjm (env);
+    con = env->createConnection (user, passwd, db);
+  }
+
+  ~occiobj ()
+  {
+    env->terminateConnection (con);
+    Environment::terminateEnvironment (env);
+  }
+
+  /**
+   * Insertion of a row 
+   */
+  void insertRow (int c1, int a1, string a2)
+  {
+    cout << "Inserting record - Publisher id :" << c1 << 
+      ", Publisher address :" << a1 << ", " << a2 <<endl; 
+    string sqlStmt = "INSERT INTO publisher_tab VALUES (:x, :y)";
+    try{
+    stmt = con->createStatement (sqlStmt);
+    stmt->setInt (1, c1);
+    address *o = new address ();
+    o->setStreet_no (Number (a1));
+    o->setCity (a2);
+    stmt->setObject (2, o);
+    stmt->executeUpdate ();
+    cout << "Insert - Success" << endl;
+    delete (o);
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for insertRow"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    con->terminateStatement (stmt);
+  }
+
+
+  /**
+   * updating a row
+   */
+  void updateRow (int c1, int a1, string a2)
+  {
+    cout << "Upadating record with publisher id :"<< c1 << endl;
+    string sqlStmt = 
+      "UPDATE publisher_tab SET publisher_add= :x WHERE publisher_id = :y";
+    try{
+    stmt = con->createStatement (sqlStmt);
+    address *o = new address ();
+    o->setStreet_no (Number (a1));
+    o->setCity (a2);
+    stmt->setObject (1, o);
+    stmt->setInt (2, c1);
+    stmt->executeUpdate ();
+    cout << "Update - Success" << endl;
+    delete (o);
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for updateRow"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+    con->terminateStatement (stmt);
+  }
+
+
+  /**
+   * deletion of a row
+   */
+  void deleteRow (int c1, int a1, string a2)
+  {
+    cout << "Deletion of record where publisher id :" << c1 <<endl; 
+    string sqlStmt = 
+    "DELETE FROM publisher_tab WHERE publisher_id= :x AND publisher_add = :y";
+    try{
+    stmt = con->createStatement (sqlStmt);
+    stmt->setInt (1, c1);
+
+    address *o = new address ();
+    o->setStreet_no (Number (a1));
+    o->setCity (a2);
+    stmt->setObject (2, o);
+    stmt->executeUpdate ();
+    cout << "Delete - Success" << endl;
+    delete (o);
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for deleteRow"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    con->terminateStatement (stmt);
+  }
+
+  /**
+   * displaying all the rows in the table
+   */
+  void displayAllRows ()
+  {
+    string sqlStmt = "SELECT publisher_id, publisher_add FROM publisher_tab \
+    order by publisher_id";
+    try{
+    stmt = con->createStatement (sqlStmt);
+    ResultSet *rset = stmt->executeQuery ();
+   
+    while (rset->next ())
+    {
+      cout << "publisher id: " << rset->getInt (1) 
+           << " publisher address: address (" ;
+      address *o =  (address *)rset->getObject (2);
+      cout << (int)o->getStreet_no () << ", " << o->getCity () << ")" << endl;
+    }
+
+    stmt->closeResultSet (rset);
+    }catch(SQLException ex)
+    {
+     cout<<"Exception thrown for displayAllRows"<<endl;
+     cout<<"Error number: "<<  ex.getErrorCode() << endl;
+     cout<<ex.getMessage() << endl;
+    }
+
+    con->terminateStatement (stmt);
+  }
+
+};//end of class occiobj;
+
+
+int main (void)
+{
+  string user = "hr";
+  string passwd = "hr";
+  string db = "";
+
+  try
+  {
+    cout << "occiobj - Exhibiting simple insert, delete & update operations" 
+     " on Oracle objects" << endl;
+    occiobj *demo = new occiobj (user, passwd, db);
+
+    cout << "displaying all rows before operations" << endl;
+    demo->displayAllRows ();
+  
+    demo->insertRow (12, 122, "MIKE");
+  
+    demo->deleteRow (11, 121, "ANNA");
+  
+    demo->updateRow (23, 123, "KNUTH");
+  
+    cout << "displaying all rows after all operations" << endl;
+    demo->displayAllRows ();
+  
+    delete (demo);
+    cout << "occiobj - done" << endl;
+  }catch (SQLException ea)
+  {
+    cerr << "Error running the demo: " << ea.getMessage () << endl;
+  }
+}
diff --git a/sdk/demo/occiobj.typ b/sdk/demo/occiobj.typ
new file mode 100755
index 0000000..dd788cd
--- /dev/null
+++ b/sdk/demo/occiobj.typ
@@ -0,0 +1,3 @@
+CASE=SAME
+MAPFILE=occiobjm.cpp
+TYPE publ_address as address
diff --git a/sdk/demo/procdemo.pc b/sdk/demo/procdemo.pc
new file mode 100755
index 0000000..a9175cf
--- /dev/null
+++ b/sdk/demo/procdemo.pc
@@ -0,0 +1,118 @@
+/*
+ *  procdemo.pc
+ *
+ *  This program connects to ORACLE, declares and opens a cursor, 
+ *  fetches the names, salaries, and commissions of all
+ *  salespeople, displays the results, then closes the cursor. 
+ */ 
+
+#include <stdio.h>
+#include <string.h>
+#include <sqlca.h>
+#include <stdlib.h>
+#include <sqlda.h>
+#include <sqlcpr.h>
+
+#define UNAME_LEN      20 
+#define PWD_LEN        11 
+ 
+/*
+ * Use the precompiler typedef'ing capability to create
+ * null-terminated strings for the authentication host
+ * variables. (This isn't really necessary--plain char *'s
+ * would work as well. This is just for illustration.)
+ */
+typedef char asciiz[PWD_LEN]; 
+
+EXEC SQL TYPE asciiz IS CHARZ(PWD_LEN) REFERENCE; 
+asciiz     username; 
+asciiz     password; 
+
+struct emp_info 
+{ 
+    asciiz     emp_name; 
+    float      salary; 
+    float      commission; 
+}; 
+
+void sql_error(msg) 
+    char *msg;
+{ 
+    char err_msg[512];
+    size_t buf_len, msg_len;
+
+    EXEC SQL WHENEVER SQLERROR CONTINUE;
+
+    printf("\n%s\n", msg);
+
+/* Call sqlglm() to get the complete text of the
+ * error message.
+ */
+    buf_len = sizeof (err_msg);
+    sqlglm(err_msg, &buf_len, &msg_len);
+    printf("%.*s\n", msg_len, err_msg);
+
+    EXEC SQL ROLLBACK RELEASE;
+    exit(EXIT_FAILURE);
+} 
+
+void main() 
+{ 
+    struct emp_info *emp_rec_ptr; 
+
+/* Allocate memory for emp_info struct. */ 
+    if ((emp_rec_ptr = 
+        (struct emp_info *) malloc(sizeof(struct emp_info))) == 0)
+    { 
+        fprintf(stderr, "Memory allocation error.\n"); 
+        exit(EXIT_FAILURE); 
+    } 
+ 
+/* Connect to ORACLE. */ 
+    strcpy(username, "scott"); 
+    strcpy(password, "tiger"); 
+ 
+    EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error--");
+ 
+    EXEC SQL CONNECT :username IDENTIFIED BY :password; 
+    printf("\nConnected to ORACLE as user: %s\n", username); 
+ 
+/* Declare the cursor. All static SQL explicit cursors
+ * contain SELECT commands. 'salespeople' is a SQL identifier,
+ * not a (C) host variable.
+ */
+    EXEC SQL DECLARE salespeople CURSOR FOR 
+        SELECT ENAME, SAL, COMM 
+            FROM EMP 
+            WHERE JOB LIKE 'SALES%'; 
+ 
+/* Open the cursor. */
+    EXEC SQL OPEN salespeople; 
+ 
+/* Get ready to print results. */
+    printf("\n\nThe company's salespeople are--\n\n");
+    printf("Salesperson   Salary   Commission\n"); 
+    printf("-----------   ------   ----------\n"); 
+ 
+/* Loop, fetching all salesperson's statistics.
+ * Cause the program to break the loop when no more
+ * data can be retrieved on the cursor.
+ */
+    EXEC SQL WHENEVER NOT FOUND DO break; 
+
+    for (;;) 
+    { 
+        EXEC SQL FETCH salespeople INTO :emp_rec_ptr; 
+        printf("%s %9.2f %12.2f\n", emp_rec_ptr->emp_name, 
+                emp_rec_ptr->salary, emp_rec_ptr->commission); 
+    } 
+ 
+/* Close the cursor. */
+    EXEC SQL CLOSE salespeople; 
+ 
+    printf("\nGOOD-BYE!!\n\n");
+
+    EXEC SQL COMMIT WORK RELEASE; 
+    exit(EXIT_SUCCESS); 
+} 
+
diff --git a/sdk/demo/procobdemo.pco b/sdk/demo/procobdemo.pco
new file mode 100755
index 0000000..245a69e
--- /dev/null
+++ b/sdk/demo/procobdemo.pco
@@ -0,0 +1,90 @@
+      *****************************************************************
+      * procobdemo.pco - Pro*COBOL demo file for Instant Client.      *
+      *                                                               *
+      * This program logs on to ORACLE, declares and opens a cursor,  *
+      * fetches the names, salaries, and commissions of all           *
+      * salespeople, displays the results, then closes the cursor.    * 
+      *****************************************************************
+
+       IDENTIFICATION DIVISION.
+       PROGRAM-ID. CURSOR-OPS.
+       ENVIRONMENT DIVISION.
+       DATA DIVISION.
+       WORKING-STORAGE SECTION.
+
+           EXEC SQL BEGIN DECLARE SECTION END-EXEC.
+       01  USERNAME          PIC X(10) VARYING.
+       01  PASSWD            PIC X(10) VARYING.
+       01  EMP-REC-VARS.
+           05  EMP-NAME      PIC X(10) VARYING.
+           05  SALARY        PIC S9(6)V99
+                             DISPLAY SIGN LEADING SEPARATE.
+           05  COMMISSION    PIC S9(6)V99
+                             DISPLAY SIGN LEADING SEPARATE.
+           EXEC SQL VAR SALARY IS DISPLAY(8,2) END-EXEC.
+           EXEC SQL VAR COMMISSION IS DISPLAY(8,2) END-EXEC.
+           EXEC SQL END DECLARE SECTION END-EXEC.
+
+           EXEC SQL INCLUDE SQLCA END-EXEC.
+
+       01  DISPLAY-VARIABLES.
+           05  D-EMP-NAME    PIC X(10).
+           05  D-SALARY      PIC Z(4)9.99.
+           05  D-COMMISSION  PIC Z(4)9.99.
+
+       PROCEDURE DIVISION.
+
+       BEGIN-PGM.
+           EXEC SQL WHENEVER SQLERROR
+               DO PERFORM SQL-ERROR END-EXEC.
+           PERFORM LOGON.
+           EXEC SQL DECLARE SALESPEOPLE CURSOR FOR
+               SELECT ENAME, SAL, COMM
+               FROM EMP
+               WHERE JOB LIKE 'SALES%'
+           END-EXEC.
+           EXEC SQL OPEN SALESPEOPLE END-EXEC.
+           DISPLAY " ".
+           DISPLAY "SALESPERSON  SALARY      COMMISSION".
+           DISPLAY "-----------  ----------  ----------".
+
+       FETCH-LOOP.
+           EXEC SQL WHENEVER NOT FOUND
+               DO PERFORM SIGN-OFF END-EXEC.
+           EXEC SQL FETCH SALESPEOPLE
+               INTO :EMP-NAME, :SALARY, :COMMISSION
+           END-EXEC.
+           MOVE EMP-NAME-ARR TO D-EMP-NAME.
+           MOVE SALARY TO D-SALARY.
+           MOVE COMMISSION TO D-COMMISSION.
+           DISPLAY D-EMP-NAME, "     ", D-SALARY, "    ", D-COMMISSION.
+           MOVE SPACES TO EMP-NAME-ARR.
+           GO TO FETCH-LOOP.
+
+       LOGON.
+           MOVE "scott" TO USERNAME-ARR.
+           MOVE 5 TO USERNAME-LEN.
+           MOVE "tiger" TO PASSWD-ARR.
+           MOVE 5 TO PASSWD-LEN.
+           EXEC SQL
+               CONNECT :USERNAME IDENTIFIED BY :PASSWD
+           END-EXEC.
+           DISPLAY " ".
+           DISPLAY "CONNECTED TO ORACLE AS USER:  ", USERNAME-ARR.
+
+       SIGN-OFF.
+           EXEC SQL CLOSE SALESPEOPLE END-EXEC. 
+           DISPLAY " ".
+           DISPLAY "HAVE A GOOD DAY.".
+           DISPLAY " ".
+           EXEC SQL COMMIT WORK RELEASE END-EXEC.
+           STOP RUN.
+
+       SQL-ERROR.
+           EXEC SQL WHENEVER SQLERROR CONTINUE END-EXEC.
+           DISPLAY " ".
+           DISPLAY "ORACLE ERROR DETECTED:".
+           DISPLAY " ".
+           DISPLAY SQLERRMC.
+           EXEC SQL ROLLBACK WORK RELEASE END-EXEC.
+           STOP RUN.