Integrating SAS with the Oracle Life Sciences Data Hub

Oracle LSH is designed for close integration with SAS at several levels. You can load SAS data set files into Oracle LSH, use SAS as an integrated development environment to create Oracle LSH Programs with SAS source code, and use the SAS engine to run these Programs on Oracle LSH data.

Oracle LSH supports integration with SAS 9.1.3, SAS 9.2, or SAS 9.3.

Note:

Oracle Life Sciences Data Hub does not support a SAS Windows server.

This section includes the following topics:

SAS Compatibility

SAS with connectivity to Oracle LSH requires an Oracle 11g library. Oracle recommends that the Oracle 11g Release 2 Client reside on the same server computer as the SAS installation.

To install Oracle LSH and SAS as a processing engine on the same computer:

  1. Create an 11g Oracle Home by installing the Oracle Client 11g Release 2.
  2. Install SAS.
  3. Set the UNIX environment variable LD_LIBRARY_PATH to the 11g $ORACLE_HOME/lib.

Set Up SAS Job Execution

To enable running SAS jobs from Oracle LSH, you must integrate the SAS server with Oracle LSH and start the server in UTF8 mode. This section contains the following topics:

Integrate the SAS Server with Oracle LSH

Do each of the following:

  1. Install SAS Access to Oracle on the SAS server.
  2. Install the Oracle LSH Distributed Processing (DP) Server on the computer where the SAS server is installed. See Set Up the Distributed Processing Server.
  3. Define a service location in Oracle LSH for the computer where the SAS server is installed. See "Defining Service Locations" in the Oracle Life Sciences Data Hub System Administrator's Guide for instructions.
  4. Define one or more services for the service location. See "Defining Service Locations" in the Oracle Life Sciences Data Hub System Administrator's Guide for instructions.

Start SAS in UTF8 Mode

To help ensure that Oracle LSH stores and displays special characters in your data correctly, start SAS in UTF8 mode by editing the DP Server execution command file sasNormal.sh, which you copied and edited in Copy, Edit, and Grant Permissions to Execution Command Files for Processing Engines.

If you are using SAS 9.2 or 9.3, add lines to sasNormal.sh as in the following examples:

  • In UNIX:

    sas -encoding UTF8
    
  • In Windows, specify the version of SAS you are using. For example, for SAS 9.2:

    C:\Program Files\SAS\SASFoundation\9.2\sas.exe" -CONFIG C:\Program Files\SAS\SASFoundation\9.2\nls\u8\SASV9.CFG"

    Note:

    The example above should not contain any line breaks. It is not possible to display it on one line.

If you are using SAS 9.1.3, install SAS with the DBCS option and add lines to sasNormal.sh as follows (in UNIX):

/user/local/SAS/SAS_9.1/bin/sas_dbcs  -encoding UTF-8  $*

Set Up Loading Data from SAS

Oracle LSH includes an adapter custom-designed for the purpose of loading data from SAS database into Oracle LSH.

To enable loading data from SAS into Oracle LSH you must do the following:

  1. Complete all steps listed in Set Up SAS Job Execution.
  2. Make sure that the LOB Loader Oracle LSH post-installation job has been run; this job creates the SAS adapter. This is a required step in the installation of Oracle LSH; see Load the Adapter Files.
  3. Make sure that you have followed instructions in Grant Security Rights to Seeded Adapters.
  4. Assign at least one user group to the SAS adapter. See "Setting Up Adapters to External Systems" in the Oracle Life Sciences Data Hub System Administrator's Guide.

Set Up SAS as an Integrated Development Environment

To use SAS as an integrated development environment (IDE) each Definer must do the following on his or her local PC:

  • Install SAS in the location specified by the system administrator.

  • Install the Oracle LSH client plug-in by inserting the CD-ROM supplied by the system administrator (see Install the Client Plug-In).

    InstallShield runs cdrclient.exe, which loads cdrconfig.xml and cdrclient.exe either to the default location or to a location the Definer specifies on his or her local computer; see Set Up Client Computers.

  • Ensure that cdrconfig.xml has the correct directory path for the SAS executable.

  • Set the user preference for the SAS connection mode (details below). Instructions are in the "SAS Connection Type" section of the Getting Started chapter of the Oracle Life Sciences Data Hub User's Guide.

  • Install any software required to support the preferred connection mode (details below).

  • Set the NLS_LANG environment variable or registry settings to support UTF8 character encoding; see Set the NLS_LANG Environment Variable to UTF8.

SAS Connection Modes: SAS can work as an integrated development environment (IDE) in different ways. Each user must set a preference for the way he or she wants to work. Oracle LSH supports the following connection modes:

  • Connected Mode. The Definer has the SAS client installed on his or her personal computer. When he or she launches SAS as an IDE from an Oracle LSH Program, Oracle LSH downloads views based on the source Table Descriptors defined in the Program. The Definer works locally on the SAS client, using the views to read current data in Oracle LSH. The Definer's SAS program can write to local SAS data sets. When the SAS program is ready, the Definer goes into the Oracle LSH Program and uploads the SAS source code as an Oracle LSH Source Code file.

    The client must use the SAS Access to Oracle tool to connect to Oracle LSH.

  • SAS Connected Mode with Work Area Data. This mode is the same as Connected mode except that it connects to the Work Area schema in the database. From SAS, the user can browse views of current data in all Table instances in the Work Area, not just the Table instances linked to Table Descriptors of the Program.

    The client must use the SAS Access to Oracle tool to connect to Oracle LSH.

  • Disconnected Mode. The Definer has the SAS client installed on his or her personal computer. When the Definer launches SAS as an IDE, Oracle LSH uses the Distributed Processing Server to download the current data in the Table instances mapped to source Table Descriptors in the Program into the Definer's local SAS environment, creating data sets with the same structure as the Oracle LSH Table Descriptors. The Definer's SAS program can read from and write to local SAS data sets. When the SAS program is ready, the Definer goes into the Oracle LSH Program and uploads the SAS source code as an Oracle LSH Source Code file.

    No connection other than a network is required to the Oracle LSH Distributed Processing Server.