Usage Note 23187: Can I write the contents of one or more catalogs to an external text file?
Yes. If your code is held in SAS catalogs, such as SCL entries and source entries, then you can use the BUILD
procedure in SAS/AF software to write the contents of one or more catalogs to an external file. If you are using
base SAS programs saved in external text files, then you can use the standard operating system (OS) features and
tools such as the global search. To write the contents of two catalogs to one external text file, use the following syntax:
|
proc build c=sashelp.afclass batch;
print source prtfile='c:\temp\codeListing.txt';
run;
proc build c=sashelp.aftools batch;
print source APPEND
prtfile='c:\temp\codeListing.txt';
run;
|
By default, PROC BUILD will overwrite the output file if one already exists. The APPEND keyword tells PROC BUILD
to add its output to the end of an existing file.
Andrew Ratcliffe, a registered partner of SAS UK, tells why this feature is useful. "Often there is a need to
find all occurances of a text string in my applications. Sometimes the string is a message that needs to be
changed. Sometimes I want to find all places where a method is used in an application to change parameters
in a non-backwards compatible way." Ratcliffe publishes a free monthly enewsletter, NOTE:, that
focuses on SAS tips and techniques. Sign up for a free subscription.
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | low |
Date Modified: | 2003-02-25 20:41:03 |
Date Created: | 2003-02-25 14:21:19 |