O'Reilly logo

SAS 9.4 Language Reference, 6th Edition by SAS Institute

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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
programs:
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
log.
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
compatible architecture.
How SAS Processes Stored Compiled DATA Step
Programs
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
Stored Compiled
DATA Step
Program
DATA Step
Compiler
DATA Step
Source Code
680 Chapter 28 Stored Compiled DATA Step Programs

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required