Creating a New Source Code Definition and Instance

When you select Create a new Source Code definition and instance in the Create Source Code screen, additional fields appear.

This section contains instructions for all technology types. For instructions specific to each technology, see the following sections:

  1. Enter values in the following fields:
    • Name. The system uses the name you enter for the actual source code file. If you do not specify an extension, Oracle LSH appends the default extension for that technology type: .sas for SAS source code, .rdf for Oracle Reports, or .sql for PL/SQL. Do not use reserved words or special characters. See Naming Objects for further information.
    • Description. See Creating and Using Object Descriptions.
    • File Type. Select the file type from the list. The choices vary depending on the Program Type. For an explanation, see Defining SAS Programs or Defining Oracle Reports Programs. PL/SQL Programs' Source Code must have a SQL file type.
    • Sharable. Select Yes to make the Source Code definition available for reuse. See Creating a PL/SQL Package Storage Program and Creating a SAS Macro Catalog for information about sharable Source Code definitions.

      Depending on your company's validation policies you may choose not to set the Sharable flag to Yes until you have fully tested and validated the Source Code. You can change the setting at any time in the Source Code subtab by selecting the Source Code and clicking either Set Sharable or Set Not Sharable.

    Note:

    You cannot set any SAS Macro Catalog or SAS Format Catalog Source Code instance that points directly to a Program definition as Sharable.
  2. Enter additional fields specific to each Program type:
    • SAS File Reference Name. If the Program is of type SAS, you may need to enter a SAS File Reference Name:
      • The first Source Code you create of type Program is automatically created as the Program's primary Source Code. The SAS File Reference Name value defaults to MAINPRG and you cannot change it. If you later set another Source Code as primary, the system automatically changes its SAS File Reference Name to MAINPRG and changes the original primary Source Code's SAS File Reference Name to the Source Code instance name, truncated to 8 characters.
      • If the Source Code is a secondary Source Code that is not shared from another Source Code, the value defaults to the Source Code's name, truncated to 8 characters. You can change this value.
      • If the Source Code is shared from another Program, the SAS File Reference Name defaults from the shared Source Code and you cannot change it.
      • Note:

        In cases where the SAS File Reference Name value defaults, if there are two names with the same value, the system truncates the second one by one character and appends 1 (or increments the number if there are three or more).
    • Oracle Package Name. If the Program is of type PL/SQL, enter a package name. The package name must be unique within the Program. The package name must match the package name in the actual PL/SQL source code.
    • Oracle Procedure Name. If the Program is of type PL/SQL, enter a procedure name. The procedure name must match the procedure name in the actual PL/SQL source code.

      Note:

      If the Program is of type PL/SQL and you are defining the primary Source Code, you must enter both a package name and a procedure name.
  3. Write or upload the actual source code. Do one of the following:
    • For text-based source code files (PL/SQL and SAS), write code directly in the Source Code Editor box.
    • If a source code file that fits your needs already exists on your PC or network, click the Upload button to look for and select the file.
    • Click Launch IDE to open the development environment. Write source code there to use in the Program, then upload the source code file to the Source Code definition in Oracle LSH.

      Note:

      Before you can use the Launch IDE button you must install the Program. To make the Program installable you must either create and map at least one Table Descriptor or add one Source Code object (Steps 1 and 2 above). For more information see Installing Program Instances.

      Note:

      If you are using SAS in a connected mode and the SAS development environment does not open when you click Launch IDE, you may need to define services for the environment and start Oracle LSH Distributed Processes Server code in the same location. See "Stopping and Starting Services and Queues" in the Oracle Life Sciences Data Hub System Administrator's Guide.

      If you are using SAS in Disconnected mode, SAS does not open when you click Launch IDE. Instead, Oracle LSH puts the required data set files on your personal computer and displays a message giving the location. You must then open SAS locally and access the files as necessary.

      See Connecting to SAS for further information.

  4. Click Save and Continue to save your work. The system saves your work in the database and returns to the Program instance screen.
    By default the system sets the first Source Code you create for a Program to Primary. If you want to specify that a different Source Code is the primary one—the one executed first—in the Source Code subtab check the Select check box of the Source Code you want to set as Primary and click Set As Primary. The system changes the Primary setting for that Source Code to Yes, and for the previous primary Source Code to No.
  5. Validate both the definition and the instance according to your company's policies.