Once you have
tested your application in a development environment, you should copy
it to the area designated as a production location, where you can
retest it.
Two procedures are available
for copying applications:
The COPY procedure
is a general-purpose utility for copying SAS libraries from one device
to another or from one file to another. You can copy an entire library,
or you can select or exclude members of specific types.
For example, to copy
an application from a prototyping or test environment on the C: drive
to a production environment on the F: drive, you could use this code:
libname proto 'c:\test';
libname product 'f:\apps';
proc copy in=proto out=product;
run;
If your catalogs are
already in the production location, then run this program simply to
reduce the size of the catalogs:
proc copy in=product out=work;
proc copy in=work out=product;
run;
Note: Although you can use operating
environment commands to copy SAS files, you should use the COPY procedure
instead. After you edit catalogs in the build environment, some entries
can become fragmented. When the COPY procedure executes, it reconstructs
and reorganizes all SAS files, including data sets and catalogs. The
new files often occupy less disk space; it is not unusual for a catalog
to shrink by 50% to 75% when the COPY procedure is run on it.
You can copy
either an entire catalog or selected entries with the MERGE statement
in the BUILD procedure. The general form of the MERGE statement in
PROC BUILD is:
PROC BUILD C=
libref.out-cat;
MERGE
C=libref.in-cat options;
where
out-cat
names the output catalog.
options
are options to
control which entries are copied. MERGE statement options include
| REPLACE |
causes entries in out-cat to be replaced with like-named
entries from in-cat. The default is not to replace like-named entries.
|
| ENTRYTYPE= |
specifies an entry type for processing. If omitted,
all entries are processed. If you want to copy entries of more than
one type, use multiple MERGE statements. You can abbreviate the ENTRYTYPE=
option as ET=.
|
| NOEDIT |
specifies that the entries being merged cannot be
edited with PROC BUILD. Be sure to save the original copy of the entry
for editing.
|
| NOSOURCE |
tells the procedure to copy only the compiled portions
of FRAME and SCL entries. You can abbreviate the NOSOURCE option as
NOSRC. The SCL code itself is removed from SCL and PROGRAM entries.
|
For complete information about the MERGE statement and
about the BUILD procedure, refer to the
SAS/AF online Help.
When you move your application from one library or catalog to another, be sure to
check for hardcoded librefs. Particular care must be taken to ensure that
SCL code and
class references that are associated with your components refer to the proper location.
See
Deploying Components for more information.