This chapter describes how to create an environment on BS2000/OSD, where external procedure calls can operate. It complements the chapter about External Routines in the Fundamentals section of Oracle Database Application Developer's Guide - Fundamentals.
This section complements the corresponding part in Oracle Database Application Developer's Guide - Fundamentals.
Follow these steps to load external procedures:
Set up the environment.
An external procedure does not run in the same process and address space as the caller. Oracle creates separate processes for them to operate in a safe and secure manner. For this purpose Oracle Net Services features are used and it is the responsibility of the user to provide suitable Oracle Net Services control files. In this section, we have documented an example of how it can work. For more information, refer to Oracle Database Application Developer's Guide - Fundamentals, Oracle Database Data Cartridge Developer's Guide , and Oracle Database Net Services documentation set.
listener.ora file should have the following entry:
(SID_DESC = (SID_NAME = ep_agt1) (ENVS = EXTPROC_DLLS=ANY) (ORACLE_SID = sid_of_your_database) (PROGRAM = EXTPROC) )
tnsnames.ora file should have the following entry:
extproc_connection_data = (DESCRIPTION =(ADDRESS =(PROTOCOL=ipc) (KEY = sid_of_your_database)(CONNECT_DATA =(PRESENTATION=RO) (SID = ep_agt1)))
Then you can start a listener.
Identify the 'DLL'.
A DLL in the BS2000 environment is a
modlib containing the functions called as external procedures. When
EXTPROC is loaded these functions are dynamically bound to the program.
Use the following command to identify your library to Oracle:
CREATE LIBRARY my_c_library AS '$myuserid.my-modlib';
The external C routine has to be compiled and the generated LLM has to be stored in the
modlib. Note that if you set the
*NO, all lowercase letters in the entry names are converted to uppercase.
Furthermore, note that if you set the MODULE-PROPERTIES option
*CONVERT-TO-DOLLAR, all underscores (
_) in entry names are converted to dollar signs (
$), which must be considered when publishing the external procedure.
Publishing and running external procedures does not differ from the description in Oracle Database Application Developer's Guide - Fundamentals. Result messages about the execution of the external procedure can be found in a file named