Uses for Stored Compiled DATA Step Programs
The primary use of stored compiled DATA step programs is for executing production
jobs. The advantage of using these DATA step programs is that you can execute them as
needed without investing the resources required for repeated compilation. The savings
are especially significant if the DATA step contains many statements. If you install a
new version of SAS, you do not need to recompile your source code.
Restrictions and Requirements for Stored
Compiled DATA Step Programs
The following restrictions and requirements apply for using stored compiled DATA step
• Stored compiled DATA step programs are available for DATA step applications only.
• Stored compiled DATA step program cannot contain global statements. If you do
include global statements such as FILENAME, FOOTNOTE, LIBNAME,
OPTIONS, and TITLE in your source program, SAS stores the compiled program
but not the global statements. SAS does not display a warning message in the SAS
• SAS does not store raw data in the compiled program.
Operating Environment Information
You cannot move a compiled program to an operating environment that has an
incompatible computer architecture. You must, instead, recompile your source code
and store your new compiled program.
You can, however, move your compiled program to a different host computer that has a
How SAS Processes Stored Compiled DATA Step
You first compile the SAS source program and store the compiled code. Then, execute
the compiled code, redirecting the input and output as necessary.
SAS processes the DATA step through the compilation phase and then stores an
intermediate code representation of the program and associated data tables in a SAS file.
SAS processes the intermediate code when it executes the stored program. The following
figure shows the process for creating a stored compiled DATA step program.
Figure 28.1 Creating a Stored Compiled Program
680 Chapter 28 • Stored Compiled DATA Step Programs