TEMPLATE Procedure: Creating Tabular Output |
Edits an existing template for a table,
column, header, or footer.
Requirement: |
An END statement must follow the EDIT statement
and all of the editing instructions.
|
Interaction: |
In some cases, you can use an EDIT statement
inside a set of editing instructions.
When you edit a table
template, you can also edit one or more column, header, or footer templates
that are defined in the table. |
When you edit a column template, you can also edit
one or more header templates that are defined for that column. |
|
Restriction: |
If
you edit a template that is a link, the link is broken and a separate template
is created.
|
Featured in: |
Editing a Table Template That a SAS Procedure Uses and
Comparing the EDIT Statement with the DEFINE TABLE Statement
|
EDIT template-path-1 <AS template-path-2 > </
STORE=libref.template-store>;
|
-
template-path-1
-
specifies a template to edit. template-path-1 consists of one or more names that are separated
by periods. Each name represents a directory in a template store, which is
a type of SAS file.
Interaction: |
The STORE= option
specifies a particular template store to read from and write to. |
Tip: |
To determine the templates
that a procedure or DATA step uses, submit the ODS TRACE ON statement before
you run the SAS program. (See
ODS TRACE Statement.) |
-
AS template-path-2
-
specifies the location in which to store
the edited template, where template-path-2 consists
of one or more names that are separated by periods. Each name represents a
directory in a template store, which is a type of SAS file. By default, PROC
TEMPLATE writes the edited template to the first writable template store
in the current path.
Default: |
If you omit AS template-path-2,
PROC TEMPLATE writes the edited template to template-path-1 in the first writable template store. |
Restriction: |
If the current EDIT
statement is inside a set of editing instructions, do not use the AS template-path-2
option. |
-
STORE=libref.template-store
-
specifies the template store from which
to read template-path-1 and in which to store template-path-2.
The EDIT statement supports the same statements and
attributes as the DEFINE TABLE statements. For more information, see
DEFINE TABLE Statement.
There are two steps to follow to edit an existing
template.
-
Open a copy of the specified file.
By default, PROC TEMPLATE looks for template-path-1 in
the list of template stores that is defined by the PATH
statement. (See PATH Statement.)
It opens a copy of the first template path that it finds in a template store
that has Read access.
-
Save the modified file.
PROC TEMPLATE writes the modified template to the first
template store in the current path with update access. If you omit a second
template path to write to, then PROC TEMPLATE uses template-path-1. Therefore, if the template store from which template-path-1 is read has
Update access, you are actually
modifying the original template. Otherwise, the modified file is written to
a template store to which you do have Update access.
If you do specify a second template path, then PROC
TEMPLATE writes the edited template to the specified path in the first template
store to which you have Write access.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.