Connecting to SAS

There are three ways to connect to SAS for Program development: Connected Mode, SAS Connected Mode with Work Area Data, and Disconnected Mode. You can specify the mode you want to use in your User Preferences, although your choices may be restricted by your company.

  • Connected Mode. Your PC has the SAS client and SAS Access to Oracle installed and is connected to the Oracle Life Sciences Data Hub database through a network. When you launch SAS from a Program instance, Oracle LSH downloads views based on the Table Descriptors defined in the Program. You write your program locally on the SAS client, using the views to see data in Oracle LSH. You cannot write data to Oracle LSH Table instances. If you run the Program locally, you write data to local data set files.

    When you are ready, go to the Program instance in Oracle LSH, upload the SAS source code and upload any target SAS data sets you have created as Table Descriptors.

  • 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, you 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.

    You must use the SAS Access to Oracle tool to connect to Oracle LSH.

  • Disconnected Mode. Your PC has the SAS client installed and is connected to the Oracle LSH database through a network. When you launch SAS from a Program instance, Oracle LSH downloads data sets with the same structure as the Program's Table Descriptors. In addition, Oracle LSH downloads the actual data contained in the Table instances to which the Table Descriptors are mapped. You can write your program, working locally on the downloaded data.

    Oracle LSH creates a directory structure on your personal computer based on the location of the Program, starting with the Domain (if you are using multiple levels of Domains, all are represented): Drive:/CdrWork/your_LSH_database_acount_name/Domain_name_(all_existing_domains)/Application_Area_name/Work_Area_name/Program_instance_name/Program_instance_version/Table_Descriptor_SAS_libname/data set file.

    For Source Codes, Oracle LSH creates directories on your PC to contain the source code files. The system creates one directory for Source Code definitions of type Program and another for those of type Macro:

    • Drive:/CdrWork/your_LSH_database_acount_name/Domain_name_(all_existing_domains)/Application_Area_name/Program_definition_name/Program_versionPrograms/source code files.

    • Drive:/CdrWork/your_LSH_database_acount_name/Domain_name_(all_existing_domains)/Application_Area_name/Program_definition_name/Program_version/Macros/source code files.

    When you are ready, go to the Program instance in Oracle LSH, upload the SAS source code and upload any target SAS data sets you have created as Table Descriptors.

    Note:

    It is possible to work on the same Program in different modes at different times. However, if you work first in Disconnected mode, so that the system downloads data to your personal computer, and then change to Connected mode, you may get an error that the source data set already exists. In this case, the system continues to point to the local data set instead of live data in Oracle LSH.

    To avoid this problem, delete or move the data sets on your personal computer that were downloaded from Oracle LSH.

Note:

Developing SAS code is an option only for customers who purchase SAS separately from Oracle LSH. See Setting Up Integrated Development Environments (IDEs) for instructions on how to set up SAS to work with Oracle LSH.