DIBOL to ORACLE Gateway API software reference

DIBOL to ORACLE Gateway API software reference

This manual describes a "DIBOL to ORACLE Gateway API" (API), basic rules of installaion, and rules of coding of a top-level applications using API routines. It's intends to programmers have got a basic knowledge of OpenVMS services and programming skills in the OpenVMS environment.


Copyright © 2002 Ruslan R. Laishev & StarLet Group.

Trademarks info

VMS, OpenVMS, VAX, Alpha, DEC, DEC Server, DEC RDB/VMS, Digital are trademarks of Digital Equipment Corporation.

Trademarks info

ORACLE Server are trademarks of Oracle Corporation.

Contents


Chapter 1
Introduction

1.1 General information

The API consist from two part, the first one is set of ORACLE Stored Procedures (SP) formed as single package, these routines performs a main functionality for initialisation, cursor opening, data fetching and so on. It's a primary subject to optimization and probably for authorization.

The sesond part is a set of routines implements an interfaces functionality between top-level applications and ORACLE Stored Procedures. All routines uses ORACLE Call Interface (OCI) to get low overhead and high access speed during data transffers and types conversion. These routines are formed as OpenVMS shareable library conforming OpenVMS calling standard and can be used from any programming language.

1.2 API kit

The API kit contains several files, follows is a short description:


Chapter 2
Installaion of the API

2.1 Prerequisite Software

The API requires OpenVMS 7.2 or later, ORACLE Server 7.3 or later, 2500 block of disk space.

2.2 Installation of files

The installaion of the API it's a simple procedures supposed to be performed by skilled OpenVMS system manager and contains next steps:

DBL_ORAGTWY.EXE,DBL_ORAGTWY.[H|BAS|FOR],DBL_ORAGTWYDEF.[H|BAS|FOR] files must be copyed to SYS$COMMON:[SYSLIB] directory. Check that API files protecion allows access for programmers and users.

ORACLE DBA must performs a creation of the ORACLE Part of the API using a script DBL_ORAGTWY.SQL:


 $SQLPLUS <username>/<password>@<instance_name> 
 ... 
 SQL>@DBL_ORAGTWY.SQL<CR> 
 ... 
 SQL>^Z 
 $ 


Chapter 3
API routines description

3.1 General API routines

3.1.1 dbl_oragtwy$init()

DBL_ORAGTWY API initialization.

Syntax

status=dbl_oragtwy$init oraconn


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Arguments

oraconn


VMS usage:
type: ASCII string
access: read only
mechanism: by descriptor

An ORACLE connection string

Description

An DBL_ORAGTWY initialization routine, it performs: This routine must me called before calling any other routines from this module!

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.1.2 dbl_oragtwy$shut()

DBL_ORAGTWY shutdown.

Syntax

status =dbl_oragtwy$shut


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Description

A DBL_ORAGTWY shutdown routine, it closes all opened/parsed ORACLE cursors and session with ORACLE.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.1.3 dbl_oragtwy$getoramsg()

Translates OCI code to the SQL code, retrive text message.

Syntax

status=dbl_oragtwy$getoramsg oramsg ,retlen


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE SQLCODE code


Arguments

oramsg


VMS usage:
type: ASCII string
access: write only
mechanism: by descriptor

An ORACLE SQL error message

retlen


VMS usage:
type: word integer
access: write only
mechanism: by reference

A length of returned ORACLE SQL error message text

Description

Translates OCI code the SQL code,retrive text message. This routine must be not called after dbl_oragtwy$init() and dbl_oragtwy$shut() routines!

Return Values

0 Indicates successful completion
SQLCODE See Oracle Server Messages manuals

3.2 Specific API routines

3.2.1 dbl_oragtwy$item_catlist_oc()

Open an ITEM_CATLIST cursor.

Syntax

status=dbl_oragtwy$item_catlist_oc sku ,skulen ,sup ,suplen


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Arguments

sku


VMS usage:
type: ASCII string
access: read only
mechanism: by reference

A pointer to sku parameter.

skulen


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of sku string.

sup


VMS usage:
type: ASCII string
access: read only
mechanism: by reference

A pointer to sup parameter.

suplen


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of sup string.

Description

Open an ITEM_CATLIST cursor by calling a corresponding SP.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.2.2 dbl_oragtwy$item_catlist_cc()

Close an ITEM_CATLIST cursor.

Syntax

status =dbl_oragtwy$item_catlist_cc


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Description

Close an ITEM_CATLIST cursor by calling a corresponding SP.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.2.3 dbl_oragtwy$item_catlist_fd()

Fetch data from ITEM_CATLIST cursor.

Syntax

status=dbl_oragtwy$item_catlist_fd short_name ,short_name_len ,feature_name ,feature_name_len


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Arguments

short_name


VMS usage:
type: ASCII string
access: write only
mechanism: by reference

A pointer to short_name parameter.

short_name_len


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of the buffer for the short_name parameter.

feature_name


VMS usage:
type: ASCII string
access: write only
mechanism: by reference

A pointer to feature_name parameter.

feature_name_len


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of the buffer for the feature_name parameter.

Description

Fetch data from ITEM_CATLIST cursor by calling an ORACLE ITEM_CATLIST() strored procedure. Returned strings are padded by spaces to end of a buffer.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.2.4 dbl_oragtwy$brand_catlist_oc()

Open a BRAND_CATLIST cursor.

Syntax

status=dbl_oragtwy$brand_catlist_oc sku ,skulen ,sup ,suplen ,config ,configlen


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Arguments

sku


VMS usage:
type: ASCII string
access: read only
mechanism: by reference

A pointer to sku parameter.

skulen


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of the sku parameter.

sup


VMS usage:
type: ASCII string
access: read only
mechanism: by reference

A pointer to sku parameter.

suplen


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of the sup parameter.

config


VMS usage:
type: ASCII string
access: read only
mechanism: by reference

A pointer to config parameter.

configlen


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of the config parameter.

Description

Open a BRAND_CATLIST cursor by calling a corresponding SP.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.2.5 dbl_oragtwy$brand_catlist_cc()

Close a BRAND_CATLIST cursor.

Syntax

status =dbl_oragtwy$brand_catlist_cc


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Description

Close a BRAND_CATLIST cursor by calling a corresponding SP.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.2.6 dbl_oragtwy$brand_catlist_fd()

Close a BRAND_CATLIST cursor.

Syntax

status=dbl_oragtwy$brand_catlist_fd short_name ,short_name_len ,feature_name ,feature_name_len


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Arguments

short_name


VMS usage:
type: ASCII string
access: write only
mechanism: by reference

A pointer to short_name parameter.

short_name_len


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of the buffer for the short_name parameter.

feature_name


VMS usage:
type: ASCII string
access: write only
mechanism: by reference

A pointer to feature_name parameter.

feature_name_len


VMS usage:
type: word integer
access: read only
mechanism: by value

A size of the buffer for the feature_name parameter.

Description

Fetch data from BRAND_CATLIST cursor by calling an BRAND_CATLIST() stored procedure. Returned strings are padded by spaces to end of a buffer.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.2.7 dbl_oragtwy$attlist_oc()

Open an ATTLIST cursor.

Syntax

status =dbl_oragtwy$attlist_oc


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Description

Open an ATTLIST cursor by calling a corresponding SP.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error

3.2.8 dbl_oragtwy$attlist_cc()

Close a ATTLIST cursor.

Syntax

status =dbl_oragtwy$attlist


RETURNS

VMS usage:
type: longword integer
access: read only
mechanism: by value

ORACLE OCI Error code


Description

Close an ATTLIST cursor by calling a corresponding SP.

Return Values

0 Indicates successful completion
Positive Non-critical SQL Error
Negative Critical SQL Error


Next Contents