Chapter Contents

Previous

Next
The TEMPLATE Procedure

SOURCE Statement


Writes the source code for the specified definition to the SAS log.

SOURCE definition-path </ FILE='file-specification'>;


Required Arguments

definition-path
specifies the path of the definition to display. If the same definition exists in multiple template stores, PROC TEMPLATE uses the one from the first template store in the current path that you can read.
Tip: PROC TEMPLATE stores definitions in compiled form. The SOURCE statement actually decompiles the definition. Because SAS comments are not compiled, comments that are in the source code do not appear when you decompile the definition. If you want to annotate your definition, use the NOTES statement inside the definition or the block of editing instructions, or use the NOTES= option in the LINK statement. These notes do become part of the compiled definition. (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.


Options

FILE='file-specification'
specifies a file to write the definition to.

file-specification can be one of the following:

'external-file'
is the name of an external file to write to.

fileref
is a fileref that has been assigned to an external file. Use the FILENAME statement to assign a fileref. (For information on the FILENAME statement, see "Statements" in SAS Language Reference: Dictionary.)

Default: If you don't specify FILE=, the SOURCE statement writes to the SAS log.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.