Creating Source Code

When you create Source Code in a Program, you can either create an instance of an existing Source Code definition, or a new Source Code definition and instance at the same time:

  1. In the Source Code subtab of a Program, click Add. The system displays the Create Source Code screen.
  2. Choose one of the following options:
    • Create a new Source Code definition and instance. Select this option in any of the following situations:
    • Create an instance of an existing Source Code definition. Select this option in any of the following situations:
      • You are working in a PL/SQL Program and you want to reference a package in another Program.
      • You are working in a SAS Program and you want to reference a macro or format in another Program.

      Your company may have Programs created especially to store sharable Source Code files in a designated Library or Application Area.

      For more information on using SAS Format Catalogs and SAS Macro Catalogs, see Using a SAS Macro Catalog and Using a SAS Format Catalog.

  3. Depending on your choice, follow one of the following sets of instructions:

You can also create a source code instance that points to a Program definition. This is so that you can use the same SAS Macro Catalog and SAS Format Catalog in other Programs. See SAS Program and Source Code Types.