Forum Stats

  • 3,769,907 Users
  • 2,253,029 Discussions


User-Defined Callbacks on OpenVMS

user1867402 Member Posts: 1
edited May 5, 2015 7:29AM in Oracle Call Interface (OCI)

Hello all,

I've been experimenting recently with User-Defined Callbacks (OCI Programming Advanced Topics) and I'm curious if they are supported on OpenVMS.

I've had no trouble getting the sample programs (cdemoucb.c and cdemoucbl.c) or my own code to work on Linux.  The directions given in the link above for Solaris also work well on Linux.  Basically, you just create the module, name it something like (with the .so.0.1 extension), copy it to $ORACLE_HOME/lib and set the environment variable ORA_OCI_UCBPKG=ucbtest.

Does anyone know if UCB's work on OpenVMS?  If so, what's the trick?

I can create a shareable image.  I can verify that it is possible to load functions from it using LIB$FIND_IMAGE_SYMBOL and run them.  I can set either a symbol or a logical ORA_OCI_UCBPKG=ucbtest.  I'm having trouble getting it to work from an OCI program though.  In my test program, if the logical or symbol is set, then OCIEnvCreate fails with OCI_ERROR, even if OCI_NO_UCB is specified.  If I use OCIInitialize, it also fails with OCI_ERROR.

Poking around in the Oracle libraries, I see the ORA_OCI_UCBPKG string, and since OCIEnvCreate/OCIInitialize fails, it would appear that they are actually trying to do something to load the module.

So, maybe I'm just doing something wrong.

* Should the module be created as a shareable image, or something else?

* Must the image be installed (using the INSTALL utility), or is it ok if it's not?

* How should the module be named?  Files can't have more than 1 dot in their names on OpenVMS.  I've tried the default of .EXE.  I also tried .SO and .DLL, but no luck.

* Where should the module be located?  The default location for shareable images on OpenVMS is SYS$SHARE.  Should it go there, or in ORACLE_HOME:[lib]?  Or somewhere else?  I've tried all combinations of .EXE, .SO, .DLL and both of those locations, but nothing has worked so far.

* Should ORA_OCI_UCBPKG be a logical, a symbol, or something else?

* Are there any other logicals/symbols that need to be set too?

Any help that anyone could give me would be great.


This discussion has been closed.