• No se han encontrado resultados

1.2 Movilidad sustentable

1.2.2 Estrategias de la movilidad sustentable

1.2.2.4 Normativa

1.2.2.5.1 Dimensiones

Open SAS as an IDE from Oracle LSH

If you have the SAS client installed on your PC, you can launch the SAS integrated development environment (IDE) from an Oracle LSH Program instance.

If you plan to use the SAS (IDE) to develop an Oracle LSH Program, before you launch the IDE:

■ Define and map the source Table Descriptors you need; see "Defining and Mapping Table Descriptors" on page 3-36.

■ Install the Program instance; see "Installing a Work Area and Its Objects" on page 12-11.

Oracle LSH then downloads the data views or files to SAS (depending on the type of connection you are using; see Connecting to SAS on page 5-31) when you launch SAS and you can read the data as necessary while you write the source code in SAS.

You can go back and forth between working in SAS and working in Oracle LSH as you develop a Program. For example, if you declare an input or output parameter in your SAS code, you can immediately go to Oracle LSH and create the required

corresponding Parameter in the Oracle LSH Program, and then go back to writing SAS code.

When you are ready, go to the Source Code definition in the Oracle LSH Program instance and upload your SAS source code.

Upload Existing SAS Programs to Oracle LSH

You may have many legacy SAS programs that you want to use on Oracle LSH data. You can upload an existing SAS program to a Source Code definition in an Oracle LSH SAS Program and create defined Parameters, Source Codes, Table Descriptors, and Planned Outputs as required by Oracle LSH for the SAS source code.

Enter Source Code Directly in the Oracle LSH Source Code Definition

When you create a new Source Code definition and instance at the same time, you can type or copy and paste source code text directly into the large Source Code field.

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.

Defining SAS Programs

Connected Mode. Your PC has the SAS client and SAS Access to Oracle installed and is connected to the Oracle LSH 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): C:/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:

C:/CdrWork/your_LSH_database_acount_name/Domain_name_(all_ existing_domains)/Application_Area_name/Program_

definition_name/Program_versionPrograms/source code files. C:/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.

Defining SAS Programs

Documento similar