Chapter Contents |
Previous |
Next |
COPYSAS Autocall Macro |
Syntax | |
Details | |
Using %COPYSAS to Create a Scaled-Down Copy of the SAS System |
Syntax |
%COPYSAS(copydir, rtracelog, cpcmd, scriptloc, mkcmd) |
c:\mysas
) or as a network path (for
example
\\server\share\pubsas
). You must specify the copydir.copy /v
. If the command you specify
requires options, you can specify them in the usual way; that is, separate
them from the command with a forward slash (/) or a hyphen (-).mkdir
. If the
command you specify requires options, you can specify them in the usual way;
that is, separate them from the command with a forward slash (/) or a hyphen
(-).Details |
The COPYSAS autocall macro parses a log that you create by running the SAS System with the RTRACE and RTRACELOC system options specified. The log contains a record of every file that was used during the SAS session. As it parses the log, the COPYSAS macro builds a copy script (as a DOS batch file) to facilitate copying these files to another destination. This allows you to create a scaled-down copy of the SAS System, optimized for a particular use, such as running a SAS/AF application.
Note: The COPYSAS macro itself does not
create a scaled-down copy of the SAS System; it only creates a DOS batch file
that allows you to create the scaled-down copy. The batch file
contains the commands to create destination directories and copy files to
the destination you specify.
If you want to omit the optional arguments and use their
default values, you can do so; but you must specify a comma separator as a
placeholder for the argument. For example, if you want to use the default copycmd and scriptloc but use
md
to create directories, your call would look like
%copysas(d:\sasjr, c:\sas\filelist.log,,,md)
You do not have to provide the commas if no arguments follow the last argument you provided. For example, the following invocation is valid:
%copysas(d:\sasjr, c:\sas\filelist.log)
Note: Keep in mind that the configuration files that you copy (such as any SAS configuration
files and the AUTOEXEC.SAS file) are probably customized for your installation
and might not be usable on the scaled-down copy without some modifications.
Check to make sure that the options in these files reflect the configuration
that you want to convey to another user.
For a complete description of how to create a scaled-down copy of the SAS System using the RTRACE and RTRACELOC system options in conjunction with the COPYSAS macro, see Creating a Scaled-Down Version of the SAS System for Distribution.
Using %COPYSAS to Create a Scaled-Down Copy of the SAS System |
-rtrace all -rtraceloc c:\sas\sasuser\filelist.log
In a subsequent SAS session (in which you do not specify these options), you can use the COPYSAS macro to create a copy script COPYSAS.BAT. For example, if you submit the following statement:
%copysas(c:\mysas,c:\sas\sasuser\filelist.log)the COPYSAS macro parses C:\SAS\SASUSER\FILELIST.LOG and creates the DOS batch file C:\SAS\SASUSER\COPYSAS.BAT.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.