Chapter Contents

Previous

Next
The TEMPLATE Procedure

EDIT Statement


Edits an existing definition for a table, column, header, or footer

Requirement: An END statement must follow the EDIT statement, after all the editing instructions.
Interaction: In some cases, you can use an EDIT statement inside a set of editing instructions.
When you edit a table, you can also edit one or more columns, headers, or footers that are defined in the table.
When you edit a column definition, you can also edit one or more headers that are defined for that column.
Restriction: If you edit a definition that is a link, you break the link and create a separate definition.
Featured in: Customizing a Table Definition that a SAS Procedure Uses


EDIT definition-path-1 <AS definition-path-2 > </ STORE=libname.template-store>;
statements-and-attributes
END;


Required Arguments

definition-path-1
specifies a definition to edit. definition-path-1 consists of one or more names, separated by periods. Each name represents a directory in a template store. (A template store is a type of SAS file.)

There are two steps to editing: opening a copy of the specified file and saving the modified file. By default, PROC TEMPLATE looks for definition-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 one that it finds in a template store that you can read. PROC TEMPLATE writes the modified definition to the first template store in the current path that you can write to. If you do not specify a second definition-path to write to, it uses definition-path-1. Therefore, if you have update access to the template store from which you read definition-path-1, you actually modify the original definition. Otherwise, the modified file is written to a template store to which you do have update access.

If you do specify a second definition-path, PROC TEMPLATE writes the edited definition to the specified path in the first template store to which you have write access.
Interaction: The STORE= option specifies a particular template store to read from and to write to.
Tip: You can determine what definitions a procedure or DATA step uses by submitting the ODS TRACE ON statement before you run the SAS program (see ODS TRACE Statement).


Options

AS definition-path-2
specifies the location in which to store the edited definition, where definition-path-2 consists of one or more names, separated by periods. Each name represents a directory in a template store. (A template store is a type of SAS file.) By default, PROC TEMPLATE writes the edited definition to the first template store that you can write to in the current path.
Default: If you do not specify AS definition-path-2, PROC TEMPLATE writes the edited definition to definition-path-1 in the first template store that you can write to.
Restriction: You cannot use AS if the current EDIT statement is inside a set of editing instructions.

STORE=libname.template-store
specifies the template store in from which to read definition-path-1 and in which to store definition-path-2.
Availability: Version 8 of the SAS System


Statements and Attributes

The EDIT statement supports the same statements and attributes as the DEFINE statement. For more information, see DEFINE Statement.


Chapter Contents

Previous

Next

Top of Page

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