Meeting the Adapter Run-Time Requirements

In this section:

Connecting to the Oracle Subsystem

Supplying the Oracle User ID and Password

Preparing to Invoke FOCUS and the Adapter

Testing the Adapter Connection

At this point, adapter has been installed. However, before it can be invoked, you must satisfy the following run-time requirements:

Note: All Oracle tools, and programs that use the Oracle Pro* or High Level Interfaces (such as the adapter), require the services of the SQL Storage Anchor Module (SQLANKOR).

This module resides in a library member for which the Oracle-recommended name is:

'ORACLE.V9R1M5.CMDLOAD(CMDLOAD)' (for Oracle Version 9) 

This module is generally placed in a STEPLIB, JOBLIB or system linklist library.

It must be present at run-time. Refer to the Oracle for z/Os User's Guide for more information on the SQLANKOR module.


Top of page

Connecting to the Oracle Subsystem

Any application that accesses the Oracle RDBMS must provide a means of connecting to the Oracle subsystem (or kernel). A unique 1 to 4-character z/OS subsystem name identifies the subsystem.

At run-time, the Oracle subsystem is specified by allocating the ORA@ssn DDNAME, where ssn is the subsystem name. For example, if your Oracle subsystem is named ORAT, you would issue one of the following statements:

These DD statements are shown in the sample JCL and CLIST described in Preparing to Invoke FOCUS and the Adapter.


Top of page

Supplying the Oracle User ID and Password

The SET CONNECTION_ATTRIBUTES command allows users to declare a connection to one Oracle database server and to supply authentication attributes necessary to connect to the server.

This command can be stored in any FOCUS-supported profile. It can also be issued in a FOCEXEC or at the FOCUS command prompt. For example:

SQL SQLORA SET CONNECTION_ATTRIBUTES TNSNAMEA/USERA,PWDA

Note: SET USER is a synonym for SET CONNECTION_ATTRIBUTES, supported for compatibility with earlier releases of the adapter. However, note that the symbol used for separating the connection attribute from the authentication information and the symbol used for separating the user ID from the password changed in FOCUS 7.2.

See the Relational Data Adapter User's Manual for more information about supplying Oracle connection attributes.


Top of page

Preparing to Invoke FOCUS and the Adapter

Example:

Interactive Access to Oracle From TSO

Batch Access to Oracle

Interactive Access From MSO

At this point you must prepare a procedure for invoking FOCUS and the adapter.


Top of page

Example: Interactive Access to Oracle From TSO

A sample CLIST for invoking FOCUS and the adapter is provided as member ORAEXCLI in the 'prefix.FOCSQL.DATA' data set:

PROC 0                                          
CONTROL MSG NOLIST
ALLOC F(ORA@ORAT) DUMMY
ALLOC F(FOCEXEC) DA('user.FOCEXEC.DATA' -
'prefix.FOCEXEC.DATA') SHR REUSE
ALLOC F(MASTER) DA('user.MASTER.DATA' -
'prefix.MASTER.DATA') SHR REUSE
ALLOC F(FOCSQL) DA('user.FOCSQL.DATA' -
'prefix.FOCSQL.DATA') SHR REUSE
ALLOC F(USERLIB) DA('prefix.FOCSQL.LOAD' -
'prefix.FOCLIB.LOAD' -
'prefix.FUSELIB.LOAD') SHR REUSE
ALLOC F(FOCLIB) DA('prefix.FOCLIB.LOAD') SHR REUSE
ALLOC F(ERRORS) DA('prefix.ERRORS.DATA) SHR REUSE
CALL 'prefix.FOCLIB.LOAD(FOCUS)'

where:

prefix
Is the high level qualifier for your site's FOCUS production libraries.

user
Is the high level qualifier for your private version of a library.

The allocations for DDNAMEs FOCLIB and USERLIB may be removed if their libraries (FOCLIB.LOAD, FOCSQL.LOAD, and FUSELIB.LOAD) are allocated to STEPLIB in the TSO logon procedure.


Top of page

Example: Batch Access to Oracle

To run FOCUS and the adapter as a batch job, the JCL must allocate the required libraries and execute the application program. The most efficient approach is to call the FOCUS program directly. Alternatively, users may choose to call the TSO batch program, IKJEFT01, which in turn calls FOCUS. In this example, a direct FOCUS call is illustrated.

Sample JCL is provided as member ORAEXJCL in the 'prefix.FOCSQL.DATA' data set:

// JOB card goes here                                  
//BATCH EXEC PGM=FOCUS,REGION=2560K
//ORA@ORAT DD DUMMY
//STEPLIB DD DISP=SHR,DSN=prefix.FOCSQL.LOAD
// DD DISP=SHR,DSN=prefix.FOCLIB.LOAD
// DD DISP=SHR,DSN=prefix.FUSELIB.LOAD
//ERRORS DD DISP=SHR,DSN=prefix.ERRORS.DATA
//FOCEXEC DD DISP=SHR,DSN=user.FOCEXEC.DATA
// DD DISP=SHR,DSN=prefix.FOCEXEC.DATA
//MASTER DD DISP=SHR,DSN=user.MASTER.DATA
// DD DISP=SHR,DSN=prefix.MASTER.DATA
//FOCSQL DD DISP=SHR,DSN=user.FOCSQL.DATA
// DD DISP=SHR,DSN=prefix.FOCSQL.DATA
//SYSPRINT DD SYSOUT=A
//SYSIN DD *

FOCUS request goes here, for example:

table file oratable
count col1 by col2
where col3 eq 'literal'
end

fin
/*

where:

prefix
Is the high level qualifier for your site's FOCUS production libraries.

user
Is the high level qualifier for your private version of a library.

oratable
Is the name of the Master File for the Oracle table or view.


Top of page

Example: Interactive Access From MSO

To access the adapter from MSO, you must allocate the adapter files using DYNAM commands. You can include these allocations in a FOCEXEC.

The following FOCEXEC example allocates the adapter files

 * DDNAME FOCEXEC
DYNAM ALLOC FILE FOCEXEC DA user.FOCEXEC.DATA SHR REUSE
DYNAM ALLOC FILE FOCPROG DA prefix.FOCEXEC.DATA SHR REUSE
DYNAM CONCAT FILE FOCEXEC FOCPROG
* DDNAME MASTER
DYNAM ALLOC FILE MASTER DA user.MASTER.DATA SHR REUSE
DYNAM ALLOC FILE FOCMAST DA prefix.MASTER.DATA SHR REUSE
DYNAM CONCAT FILE MASTER FOCMAST
* DDNAME FOCSQL
DYNAM ALLOC FILE FOCSQL DA user.FOCSQL.DATA SHR REUSE
DYNAM ALLOC FILE FOCAFD DA prefix.FOCSQL.DATA SHR REUSE
DYNAM CONCAT FILE FOCSQL FOCAFD

where:

prefix
Is the high level qualifier for your site's FOCUS production libraries.

user
Is the high level qualifier for your private version of a library.

Note: The MSO and adapter load libraries must be from the same release and maintenance level of FOCUS.


Top of page

Testing the Adapter Connection

You can now test the adapter connection to Oracle with the adapter SQLORA ? query command. Run your batch FOCUS job and include the following command in the SYSIN stream, or execute your FOCUS CLIST and issue the following command from the FOCUS command prompt:

SQL SQLORA ?

If there is a connection, a list of the adapter defaults and current settings is displayed.

If there is a problem, the following adapter message is displayed:

(FOC1488) SQL INTERFACE IS NOT INSTALLED:

If you get an error message, please check your installation with this guide or call Information Builders for assistance.


Information Builders