Chapter Contents |
Previous |
Next |
The TEMPLATE Procedure |
Requirement: | An END statement must be the last statement in the definition. |
Featured in: | Creating a New Table Definition |
DEFINE HEADER
header-path </ STORE=libname.template-store>;
|
To do this ... | Use this statement | |
---|---|---|
Set one or more header attributes. | header-attribute(s) | |
Define a symbol that references a value that the data component supplies from the procedure or DATA step. | DYNAMIC | |
Define a symbol that references a macro variable. ODS will use the value of the variable as a string. References to the macro variable are resolved when ODS binds the definition and the data component to produce an output object. | MVAR | |
Define a symbol that references a macro variable. ODS will convert the variable's value to a number (stored as a double) before using it. References to the macro variable are resolved when ODS binds the definition and the data component to produce an output object. | NMVAR | |
Provide information about the table. | NOTES | |
Specify the text of the header. | TEXT | |
Specify an alternative header to use in the Listing output if the header that is provided by the TEXT statement is too long. | TEXT2 | |
Specify an alternative header to use in the Listing output if the header that is provided by the TEXT2 statement is too long. | TEXT3 | |
End the header definition. | END |
Required Arguments |
Restriction: | If the definition is nested inside another definition, definition-path must be a single-level name. |
Restriction: | If you want to reference the definition that you are creating from another definition, do not nest the definition inside another one. For example, if you want to reference a header definition from multiple columns, do not define the header inside a column definition. |
Options |
Restriction: | If the definition is nested inside another definition, you cannot use the STORE= option. |
Availability: | Version 8 of the SAS System |
Header Attributes |
This section lists all the attributes that you can use in a header definition. A column header spans a single column. A spanning header spans multiple columns. These two kinds of headers are defined in the same way except that a spanning header uses the START= or the END= attribute, or both.
For all attributes that support a value of ON, the following forms are equivalent:
ATTRIBUTE-NAME ATTRIBUTE-NAME=ONFor all attributes that support a value of variable, variable can be any variable that you declare in the table definition with the DYNAMIC, MVAR, or NMVAR statement. If the attribute is a boolean, the value of variable should resolve to one of the following:
ON | YES | 0 |
_ON_ | _YES_ | FALSE |
1 | OFF | NO |
TRUE | _OFF_ | _NO_ |
To do this ... (table note 1) | Use this attribute | |
---|---|---|
Influence the appearance of the contents of the header | ||
Specify whether or not to try to expand the column width to accommodate the longest word in the column header. | FORCE= | |
Specify the horizontal justification for the column header. | JUST= | |
Specify whether to try to divide the text equally among all lines or to maximize the amount of text in each line when the text in the header uses more than one line. | MAXIMIZE= | |
Specify whether or not to draw a continuous line above the header. | OVERLINE= | |
Specify whether or not to treat the text as preformatted text. | PREFORMATTED= | |
Specify whether or not to print the header. | PRINT= | |
Specify the number of blank lines to place between the current header and the next one or between the current footer and the previous one. | SPACE= | |
Specify the split character for the header. | SPLIT= | |
Specify the style element and any changes to its attributes to use for the header. | STYLE= | |
Specify whether or not to start a new line of the header in the middle of a word. | TRUNCATE= | |
Specify whether or not to draw a continuous line underneath the header. | UNDERLINE= | |
Specify vertical justification for the header. | VJUST= | |
Specify the width of the header in characters. | WIDTH= | |
Influence the content of the header | ||
Specify a character to use to expand the header to fill the space over the column or columns that the header spans. | EXPAND= | |
Specify whether or not to repeat the text of the header until the space that is allotted for the header is filled. | REPEAT= | |
Influence the placement of the header | ||
Specify the last column that a spanning header covers. | END= | |
Specify the first column that a spanning header covers. | START= | |
Specify whether or not to expand the header to reach the sides of the page. | EXPAND_PAGE= | |
Specify whether or not a spanning header appears only on the first data panel if the table is too wide to fit in the space that is provided. | FIRST_PANEL= | |
Specify whether or not a table footer appears only on the last data panel if the table is too wide to fit in the space that is provided. | LAST_PANEL | |
Specify whether or not to extend the text of the header into the header space of adjacent columns. | SPILL_ADJ= | |
Specify whether or not to extend the text of the header into the adjacent margin. | SPILL_MARGIN | |
Specify whether or not multiple columns can use the header. | GENERIC= | |
Specify the header definition that the current definition inherits from. | PARENT= |
Different attributes
affect different ODS destinations. For details, consult the documentation
for a specific attribute.
Default: | the last column |
See also: | START= |
ODS Destinations: | All but Output |
Default: | none |
Interaction: | If you specify both REPEAT=ON and EXPAND=ON, PROC TEMPLATE honors EXPAND=. |
See also: | REPEAT= |
Tip: | If the string or the variable that you specify contains more than one character, PROC TEMPLATE uses only the first character. |
See also: | EXPAND_PAGE= |
ODS Destinations: | Listing |
Default: | OFF |
See also: | EXPAND= |
ODS Destinations: | Listing |
Default: | OFF |
Restriction: | Applies only to headers, not to footers |
See also: | LAST_PANEL= |
ODS Destinations: | Listing and Printer |
Default: | ON |
See also: | WIDTH= and WIDTH_MAX= |
ODS Destinations: | Listing |
Default: | OFF |
Restriction: | This attribute is primarily for writers of SAS procedures and for DATA step programmers. |
ODS Destinations: | All but Output |
Alias: | L |
Alias: | R |
Alias: | C |
Default: | The justification for the column |
ODS Destinations: | All but Output |
Featured in: | Customizing a Table Definition that a SAS Procedure Uses |
Default: | OFF |
Restriction: | Applies only to footers, not to headers |
See also: | FIRST_PANEL |
ODS Destinations: | Listing and Printer |
Default: | OFF |
ODS Destinations: | Listing |
Default: | OFF |
ODS Destinations: | Listing |
When you specify a parent, all the attributes and statements that are specified in the parent's definition are used in the current definition unless the current definition specifically overrides them.
ODS Destinations: | All |
Default: | OFF |
Interaction: | When PREFORMATTED=ON, and you are
defining a table header or a footer, ODS uses the headerfixed or the footerfixed style element
unless you specify another style element with the STYLE= column attribute.
When PREFORMATTED=ON, and you are defining a column header, ODS uses
the |
ODS Destinations: | HTML and Printer |
Default: | ON |
Tip: | When PRINT=ON, the column header becomes the label of the corresponding variable in any output data sets that the Output Destination creates if neither the column definition nor the data component provides a label. |
ODS Destinations: | All |
Default: | OFF |
Interaction: | If you specify both REPEAT=ON and EXPAND=ON, PROC TEMPLATE honors EXPAND=. |
See also: | EXPAND= |
ODS Destinations: | Listing |
Default: | 0 |
Tip: | A row of underlining or overlining is considered a header or a footer. |
ODS Destinations: | Listing |
Featured in: | Creating a New Table Definition |
Default: | OFF |
Interaction: | FORCE=, SPILL_MARGIN=, SPILL_ADJ=, and TRUNCATE= are mutually exclusive. If you specify more than one, PROC TEMPLATE honors only one. FORCE= takes precedence over the other three attributes, followed by SPILL_MARGIN= and SPILL_ADJ=. |
See also: | FORCE=, SPILL_MARGIN=, and TRUNCATE= |
ODS Destinations: | Listing |
Default: | OFF |
Restriction: | SPILL_MARGIN= applies only to a spanning header that spans all the columns in a data panel. |
Interaction: | FORCE=, SPILL_MARGIN=, SPILL_ADJ=, and TRUNCATE= are mutually exclusive. If you specify more than one, PROC TEMPLATE honors only one. FORCE= takes precedence over the other three attributes, followed by SPILL_MARGIN= and SPILL_ADJ=. |
See also: | FORCE=, SPILL_ADJ, and TRUNCATE= |
ODS Destinations: | Listing |
Tip: | The first character in a header is automatically
treated as a split character if it is not one of the following:
|
ODS Destinations: | All but Output |
Default: | the first column |
See also: | END= |
ODS Destinations: | All but Output |
Note: You can use braces
({ and }) instead of square brackets ([ and ]).
header
. The style elements that you would be most likely to
use with the STYLE= attribute for a table header
are
The style elements that you would be most likely to use with the STYLE= attribute for a table footer are
The style elements that you would be most likely to use with the STYLE= attribute for a column header are
The style element provides the basis for rendering the header. Additional style attributes that you provide can modify the rendering.
For information on finding an up-to-date list of the style definitions and for viewing a style definition so that you can see the style elements that are available, see Customizing Presentation Aspects of ODS Output. For information about the default style definition that ODS uses, see What Is the Default Style Definition Like?.
style-element-name can be either the name of a style element or a variable whose value is a style element.
Default: | header |
style-attribute-name=style-attribute-value |
For information on the style attributes that you can specify, see Style Attributes.
ODS destinations: | HTML and Printer |
Featured in: | Customizing a Table Definition that a SAS Procedure Uses and Creating a New Table Definition |
Note: TRUNCATE=OFF is the same as FORCE=ON.
Default: | OFF |
Interaction: | If you specify FORCE=, SPILL_MARGIN=, or SPILL_ADJ=, the TRUNCATE= attribute is ignored. |
See also: | FORCE=, SPILL_MARGIN=, and SPILL_ADJ= |
ODS Destinations: | Listing |
Default: | OFF |
ODS Destinations: | Listing |
Alias: | T |
Alias: | C |
Alias: | B |
Default: | BOTTOM |
ODS Destinations: | HTML and Printer |
Default: | If you do not specify a width, PROC TEMPLATE uses the column width. |
Tip: | If you want a vertical header, specify a width of 1. |
ODS Destinations: | Listing |
Scope: | You can use the DYNAMIC statement in the definition of a table, column, header, or footer. A dynamic variable that is defined in a definition is available to that definition and to all the definitions that it contains. |
Main discussion: | DYNAMIC Statement |
DYNAMIC variable-1 <'text-1'> <... variable-n <'text-n'>>; |
Scope: | You can use the MVAR statement in the definition of a table, column, header, or footer. A macro variable that is defined in a definition is available to that definition and to all the definitions that it contains. |
Main discussion: | MVAR Statement |
MVAR variable-1 <'text-1'> <... variable-n <'text-n'>>; |
Scope: | You can use the NMVAR statement in the definition of a table, column, header, or footer. A macro variable that is defined in a definition is available to that definition and to all the definitions that it contains. |
Main discussion: | NMVAR Statement |
NMVAR variable-1 <'text-1'> <... variable-n <'text-n'>>; |
Tip: | The NOTES statement becomes part of the compiled header definition, which you can view with the SOURCE statement, whereas SAS comments do not. |
NOTES 'text'; |
Required Arguments |
Featured in: | Creating a New Table Definition |
TEXT header-specification(s); |
Required Arguments |
Note: If the first character in a quoted string is
neither a blank character nor an alphanumeric character, and SPLIT is not
in effect, the TEXT statement treats that character as the split character.
(See the discussion of SPLIT=.)
Default: | If you don't use a TEXT statement, the text of the header is the label of the object that the header applies to. |
Tip: | If the quoted string is a blank and it is the only item in the header specification, the header is a blank line. |
Featured in: | Creating a New Table Definition |
See: | TEXT Statement |
See: | TEXT Statement |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.