The BUILD Procedure |
Restriction: | When you use a CROSSREF statement with the PROC BUILD statement, no other BUILD procedure statements can be used. |
Note: | When you use the CROSSREF statement, the procedure ends after the analysis data is collected. No BUILD procedure windows are opened, and any options that you specify for the PROC BUILD statement are ignored. |
Required Argument |
You must always supply the following argument with the CROSSREF statement:
specifies one or more SAS catalogs that comprise the project you want to analyze. If you specify more than one catalog, enclose the list in parentheses and separate the names with spaces.
Options |
You can use the following options in the CROSSREF statement:
controls the depth of data collection when functions that refer to other entries (such as CALL DISPLAY, CALL METHOD, or CALL GOTO) are encountered. Specify one of the following values:
the analysis traverses all links and collects data on all other entries that are referenced in the project. (This is the default behavior.)
the analysis does not traverse any links nor does it collect data on any entries outside the specified project catalogs.
the analysis traverses links and collects data on only those entries that reside in the specified catalogs. If you specify more than one catalog name, you must enclose the list in parentheses and separate the names with spaces.
specifies one or more entries for which no data is collected or for which data is collected. Use the EXCLUDE= option to prevent data from being collected for the specified entries. Data is still collected for the remaining entries in the catalogs specified in the PROJECT= or DETAIL= arguments. Use the SELECT= option to collect data for only the specified entries in the catalogs specified in the PROJECT= or DETAIL= arguments. If you specify more than one catalog entry name, you must enclose the list in parentheses and separate the names with spaces.
The EXCLUDE= and SELECT= options are mutually exclusive. You cannot use both options in the same CROSSREF statement.
specifies the libref for the SAS data library in which the analysis data sets are generated. The new analysis data sets replace any previous analysis data sets in the specified library. If you omit this option, the default is the WORK library.
specifies one or more SAS catalog names that are used as the catalog search rule. The search rule is applied when a function that refers to another entry (such as CALL DISPLAY, CALL METHOD or CALL GOTO) includes a parameter that has a two-level name in the form entry-name.entry-type. The catalogs in the search rule are searched in the specified order for an entry that matches the two-level entry name. When no search rule is in effect, the default is to search only the catalog that contains the entry that includes the function.
If you specify more than one catalog name, you must enclose the list in parentheses and separate the names with spaces.
Using the CROSSREF Statement |
The CROSSREF statement performs the data collection phase for the Static Analyzer, one of the performance analysis tools that are provided with SAS/AF software. The Static Analyzer scans the SCL code for a project and reports usage information for the SCL program elements, including which functions, variables, constants, widgets, SAS macros, and SAS options are used in the project. For purposes of the analysis, you can define a project to include entries in multiple SAS catalogs and SAS data libraries.
After using the CROSSREF statement to collect data, you can view the results by issuing the following command in any SAS window:
SCLPROF STATIC <LIB=analysis-library> |
Note: Use the LIB= option in the SCLPROF command if you used the OUTLIB= option in the CROSSREF statement to specify a library other than the default.
For more information about the Static Analyzer, refer to the online Help for the tool.
CROSSREF Statement Examples |
The following example illustrates the use of the SELECT= option to restrict data collection to a single entry:
proc build; crossref project=sashelp.aftools select=astopts.frame; run;
The following example illustrates the use of the DETAIL= option to limit the depth of data collection in a large project:
proc build; crossref project=(sashelp.eis sashelp.eisbol1) detail=(sashelp.afclass sashelp.eisbol1 sashelp.fsp sashelp.mb) search=(sashelp.eisbol1 sashelp.mb sashelp.eis sashelp.fsp sashelp.assist sashelp.calc) outlib=sasuser; run;
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.