specifies the path of the item that you
want to write to the SAS log. If the same item exists in multiple template
stores, PROC TEMPLATE uses the one from the first template store that you
can read in the current path.

Tip:

PROC TEMPLATE stores items
in compiled form. The SOURCE statement actually decompiles the item. Because
SAS comments are not compiled, comments that are in the source code do not
appear when you decompile the item. If you want to annotate the item, use
the NOTES statement inside the item or the block of editing instructions,
or use the NOTES= option in the LINK statement. These notes do become part
of the compiled item. (See
NOTES Statement and the discussion of the NOTES= option. You can also
specify notes as quoted strings in the
DYNAMIC, MVAR, NMVAR, REPLACE, and STYLE statements.)

The external-file that you specify must be enclosed in quotation
marks.

fileref

is a file reference that has been assigned
to an external file. Use the FILENAME statement to assign a fileref.

Default:

If you omit a filename
where you want the source code written, then the SOURCE statement writes the
source code to the SAS log.

See:

"Statements" in
SAS Language Reference: Dictionary for
information about the FILENAME statement.

NOFOLLOW

specifies that the program not resolve links
in the PARENT= statement, which specifies the item that the current item inherits
from. For information about the PARENT= statement, see the
PARENT= statement in the styles attribute section.

STORE=
libref.template-store

specifies the template store where the item
is located.

Interaction:

In most cases, the
STORE= option is added to the definition statement when PROC TEMPLATE displays
the source code. However, if the template store specified in the STORE= option
is in the ODS path with only read permission, then PROC TEMPLATE does not
include the STORE= option in the source code that it displays. There will
be no STORE= option, which means that if you run the code, then the item that
it creates will go to the first template store for which you have Update permission
in the ODS path.

WHERE=(where-expression)

selects items that meet a particular condition. For example,
the following statement displays the source code for items that contain the
word "Default" in the path to the current template:

source / where=(path ? 'Default');

where-expression

is an arithmetic or logical expression that consists of
a sequence of operators and operands.

where-expression has this form:

(subsetting-variable <comparison-operatorwhere-expression-n>)

subsetting-variable

a special kind of WHERE expression operand used by the
SOURCE statement to help you find common values in items. Subsetting variables
are one or more of the following:

PATH | _PATH_

is the fully qualified path of a template.

Alias:

NAME | _NAME_

Alias:

TEMPLATE | _TEMPLATE_

Example:

This SOURCE statement displays the code
for all items that contain the word "Default" in the name of the
current template:

source / where=(path ? 'Default');
run;

TYPE | _TYPE_

is the type of the item. TYPE is one of the following:

COLUMN

specifies that the template is a column in a table.

FOOTER

specifies that the template is a footer in a table.

HEADER

specifies that the template is a header in a table.

LINK

specifies that the template is a link or URL.

STYLE

specifies that the definition is a style.

TABLE

specifies that the definition is a table template .

TAGSET

specifies that the definition is a tagset.

Example:

This SOURCE statement displays the source
code for all tagsets that have the word "Default" in the path
:

source / where=(lowcase(type) = 'tagset' && _path_ ? 'Default');

The LOWCASE function converts all letters in an argument to lowercase.

NOTES

is the content of any NOTES statement in the PROC TEMPLATE
step that created the item. The contents is displayed in the LABEL field.

Alias:

LABEL

Example:

This SOURCE statement displays the source
code for all items where the label
contains the words "common matrix" and the item is a link: