Migrating Your Application from Testing to Production

Introduction

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
  • the BUILD procedure.
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.
in-cat
names the input 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.

Porting Your Application to Different Operating Environments

SAS/AF software enables you to create an application in one development environment and to port that same application to the operating environments of your users.
Note: Although SAS/AF software does not support a build-time environment for FRAME entries on a mainframe, applications can be developed in desktop environments such as Windows and ported to run on a mainframe.
To port (or “export”) an application to another environment:
  1. In the development environment, use the CPORT procedure to export a SAS library or SAS catalog into a transport file. (You can transfer SAS tables directly from one operating environment to another without creating a transport file.)
    The basic form of the CPORT procedure is
    proc cport source-type=libref<.member-name>
         file=transport-fileref;
    where source-type specifies a catalog, data set, or library; member-type is required if source-type is either CATALOG or DATA; and transport-fileref specifies the transport file to write to.
  2. Copy the transport file from your development environment to the production or end-user environment(s), using the appropriate operating system commands for a binary file transfer such as FTP.
  3. In each environment to which you want to deploy the application, use the CIMPORT procedure to restore the transport file to its original form in the appropriate format for the host operating environment.
    The basic form of the CIMPORT procedure is
    proc cimport destination=libref<.member-name>
                 infile=transport-fileref;
    where destination specifies a catalog, data set, or library; member-type is required if destination is either CATALOG or DATA; and transport-fileref specifies the transport file to read.
For details on using the CPORT or CIMPORT procedures, see the Base SAS Procedures Guide.
When you develop a frame for use in other environments, it is recommended that you port the frame to the target platform to test the frame, using the same display that your users will use. The sizing of visual components on a frame can be affected by the host environment due to differences in the system fonts in the development environment and the run-time environments. Currently, font sizes can vary depending on the display device that is used.
It is important to test applications on all display devices that are used in the deployment environments. Also, keep in mind the following restrictions when developing frame-based applications that you plan to deploy in multiple environments:
  • Some objects are not supported on all display devices, and some objects behave differently when displayed in different host environments. Refer to the “Component Reference” in the SAS/AF online Help for details.
  • Text and graphic alignment may differ between the build-time environment and the run-time environment.
  • Certain events or functions that are supported in some environments do not work in others, including mouse movement, drag and drop operations, double-clicking, selecting either mouse button 2 or 3, and others.
  • Some display devices have very limited color selections. For example, when a color such as gray is displayed on a terminal that must choose between black and white, some visual objects on the frame may not appear or may disappear into the background of the frame.
For additional information about a specific host operating environment and SAS software, refer to the SAS Companion for that environment.