Previous Page | Next Page

The BUILD Procedure

COMPILE Statement

Compiles an application's source programs into stored, executable code.
Note: The compile operation is performed before the procedure opens any windows.
Tip: By default, all PROGRAM entries in the current catalog are compiled. You can use the SELECT= option to select individual entries to compile, or use the EXCLUDE= option to prevent certain entries from being compiled.

<EXCLUDE=entry-name | (entry-list)> | <SELECT=entry-name<.entry-type> | (entry-list)>;


You can use the following options in the COMPILE statement:


specifies that extra information is collected for the SAS Component Language (SCL) debugger when programs are compiled.

EXCLUDE=entry-name | (entry-list)
SELECT=entry-name<.entry-type> | (entry-list)

specify entries to exclude from or select for the compile operation. By default, all PROGRAM entries in the current catalog are compiled. Use the EXCLUDE= option to prevent specific PROGRAM entries from being compiled. Use the SELECT= option to compile only the specified entries. To compile FRAME or SCL entries, you must explicitly specify the entry names, including the entry type, by using the SELECT= option. An error occurs if you specify an entry of any type other than FRAME, PROGRAM, or SCL. If you specify more than one entry name for either of these options, enclose the list in parentheses and separate the names with at least one space.

Each COMPILE statement can include only one EXCLUDE= option or one SELECT= option. However, you can use multiple COMPILE statements in the same PROC BUILD statement.

Using the COMPILE Statement

The SAS Component Language code in FRAME, PROGRAM, and SCL entries must be compiled before the source programs can run. If you do not use the COMPILE command while you are working in the catalog entries, you can use the COMPILE statement to compile the code in existing entries.

If error or warning messages are generated by the compile process, they are written to the SAS log.

COMPILE Statement Example

The following example illustrates a COMPILE statement that compiles three SCL source programs and collects the extra information needed to run the SCL debugger. In this example, the PROGRAM entries named ONE, TWO, and THREE in the catalog EX.APPLIC are compiled in batch mode. No interactive BUILD session is initiated.

proc build catalog=ex.applic batch;
   compile debug select=(one two three);

Previous Page | Next Page | Top of Page