DEFINITION

Displays the characteristics associated with an item in the report and lets you change them.

Details

Path

Select a report item. Then select Editthen selectDefine.
Note: Alternatively, double-click on the selected item. (Not all operating environments support this method of opening the DEFINITION window.)

Description

DEFINITION Window

Usage

For an explanation of each type of usage, see Laying Out a Report .
DISPLAY
defines the selected item as a display variable. DISPLAY is the default for character variables.
ORDER
defines the selected item as an order variable.
GROUP
defines the selected item as a group variable.
ACROSS
defines the selected item as an across variable.
ANALYSIS
defines the selected item as an analysis variable. You must specify a statistic (see the discussion of the Statistic= attribute) for an analysis variable. ANALYSIS is the default for numeric variables.
COMPUTED
defines the selected item as a computed variable. Computed variables are variables that you define for the report. They are not in the input data set, and PROC REPORT does not add them to the input data set. However, computed variables are included in an output data set if you create one.
In the interactive report window environment, you add a computed variable to a report from the COMPUTED VAR window.

Attributes

Format=
assigns a SAS or user-defined format to the item. This format applies to the selected item as PROC REPORT displays it; the format does not alter the format that is associated with a variable in the data set. For data set variables, PROC REPORT honors the first of these formats that it finds:
  • the format that is assigned with FORMAT= in the DEFINITION window
  • the format that is assigned in a FORMAT statement when you start PROC REPORT
  • the format that is associated with the variable in the data set
If none of these formats is present, then PROC REPORT uses BESTw. for numeric variables and $w. for character variables. The value of w is the default column width. For character variables in the input data set, the default column width is the variable's length. For numeric variables in the input data set and for computed variables (both numeric and character), the default column width is the value of the COLWIDTH= attribute in the ROPTIONS window.
If you are unsure what format to use, then type a question mark (?) in the format field in the DEFINITION window to access the FORMATS window.
Spacing=
defines the number of blank characters to leave between the column being defined and the column immediately to its left. For each column, the sum of its width and the blank characters between it and the column to its left cannot exceed the line size.
Default:2
Interactions:When PROC REPORT's CENTER option is in effect, PROC REPORT ignores spacing that precedes the leftmost variable in the report.

SPACING= in an item definition overrides the value of SPACING= in the PROC REPORT statement or the ROPTIONS window.

Width=
defines the width of the column in which PROC REPORT displays the selected item.
Default:A column width that is just large enough to handle the format. If there is no format, then PROC REPORT uses the value of COLWIDTH=.
Range:1 to the value of the SAS system option LINESIZE=
Note:When you stack items in the same column in a report, the width of the item that is at the bottom of the stack determines the width of the column.
Statistic=
associates a statistic with an analysis variable. You must associate a statistic with every analysis variable in its definition. PROC REPORT uses the statistic that you specify to calculate values for the analysis variable for the observations represented by each cell of the report. You cannot use statistic in the definition of any other type of variable.
Note: PROC REPORT uses the name of the analysis variable as the default heading for the column. You can customize the column heading with the Header field of the DEFINITION window.
You can use the following values for statistic:
Descriptive statistic keywords
CSS
PCTSUM
CV
RANGE
MAX
STD
MEAN
STDERR
MIN
SUM
N
SUMWGT
NMISS
USS
PCTN
VAR
Quantile statistic keywords
MEDIAN | P50
Q3 | P75
P1
P90
P5
P95
P10
P99
Q1 | P25
QRANGE
Hypothesis testing keyword
PRT|PROBT
T
Explanations of the keywords, the formulas that are used to calculate them, and the data requirements are discussed in SAS Elementary Statistics Procedures.
Default:SUM
Requirement:To compute standard error and the Student's t-test you must use the default value of VARDEF=, which is DF.
See:For definitions of these statistics, see Keywords and Formulas.
Order=
orders the values of a GROUP, ORDER, or ACROSS variable according to the specified order, where
DATA
orders values according to their order in the input data set.
FORMATTED
orders values by their formatted (external) values. By default, the order is ascending.
FREQ
orders values by ascending frequency count.
INTERNAL
orders values by their unformatted values, which yields the same order that PROC SORT would yield. This order is operating environment-dependent. This sort sequence is particularly useful for displaying dates chronologically.
Default:FORMATTED
Interaction:DESCENDING in the item's definition reverses the sort sequence for an item.
Note:The default value for the ORDER= option in PROC REPORT is not the same as the default value in other SAS procedures. In other SAS procedures, the default is ORDER=INTERNAL. The default for the option in PROC REPORT might change in a future release to be consistent with other procedures. Therefore, in production jobs where it is important to order report items by their formatted values, specify ORDER=FORMATTED even though it is currently the default. Doing so ensures that PROC REPORT will continue to produce the reports that you expect even if the default changes.
Justify=
You can justify the placement of the column heading and of the values of the item that you are defining within a column in one of three ways:
LEFT
left-justifies the formatted values of the item that you are defining within the column width and left-justifies the column heading over the values. If the format width is the same as the width of the column, then LEFT has no effect on the placement of values.
RIGHT
right-justifies the formatted values of the item that you are defining within the column width and right-justifies the column heading over the values. If the format width is the same as the width of the column, then RIGHT has no effect on the placement of values.
CENTER
centers the formatted values of the item that you are defining within the column width and centers the column heading over the values. This option has no effect on the setting of the SAS system option CENTER.
When justifying values, PROC REPORT justifies the field width defined by the format of the item within the column. Thus, numbers are always aligned.
Data type=
shows you if the report item is numeric or character. You cannot change this field.
Item Help=
references a HELP or CBT entry that contains help information for the selected item. Use PROC BUILD in SAS/AF software to create a HELP or CBT entry for a report item. All HELP and CBT entries for a report must be in the same catalog, and you must specify that catalog with the HELP= option in the PROC REPORT statement or from the User Help fields in the ROPTIONS window.
To access a help entry from the report, select the item and issue the HELP command. PROC REPORT first searches for and displays an entry named entry-name.CBT. If no such entry exists, then PROC REPORT searches for entry-name.HELP. If neither a CBT nor a HELP entry for the selected item exists, then the opening frame of the help for PROC REPORT is displayed.
Alias=
By entering a name in the Alias field, you create an alias for the report item that you are defining. Aliases let you distinguish between different uses of the same report item. When you refer in a compute block to a report item that has an alias, you must use the alias. (See Using Aliases to Obtain Multiple Statistics for the Same Variable.)

Options

NOPRINT
suppresses the display of the item that you are defining. Use this option
  • if you do not want to show the item in the report but you need to use the values in it to calculate other values that you use in the report.
  • to establish the order of rows in the report.
  • if you do not want to use the item as a column but want to have access to its values in summaries. (See Writing a Customized Summary on Each Page.)
Interactions:Even though the columns that you define with NOPRINT do not appear in the report, you must count them when you are referencing columns by number. (See Four Ways to Reference Report Items in a Compute Block.)

SHOWALL in the PROC REPORT statement or the ROPTIONS window overrides all occurrences of NOPRINT.

NOZERO
suppresses the display of the item that you are defining if its values are all zero or missing.
Interactions:Even though the columns that you define with NOZERO do not appear in the report, you must count them when you are referencing columns by number. (See Four Ways to Reference Report Items in a Compute Block.)

SHOWALL in the PROC REPORT statement or the ROPTIONS window overrides all occurrences of NOZERO.

DESCENDING
reverses the order in which PROC REPORT displays rows or values of a group, order, or across variable.
PAGE
inserts a page break just before printing the first column containing values of the selected item.
Interaction:PAGE is ignored if you use WRAP in the PROC REPORT statement or in the ROPTIONS window.
FLOW
wraps the value of a character variable in its column. The FLOW option honors the split character. If the text contains no split character, then PROC REPORT tries to split text at a blank.
ID column
specifies that the item that you are defining is an ID variable. An ID variable and all columns to its left appear at the left of every page of a report. ID ensures that you can identify each row of the report when the report contains more columns than will fit on one page.

Color

From the list of colors, select the one to use in the REPORT window for the column heading and the values of the item that you are defining. The default is the color of Foreground in the SASCOLOR window. (For more information, see the online Help for the SASCOLOR window.)
Note: Not all operating environments and devices support all colors, and in some operating environments and devices, one color might map to another color. For example, if the DEFINITION window displays the word BROWN in yellow characters, then selecting BROWN results in a yellow item.

Buttons

Apply
applies the information in the open window to the report and keeps the window open.
Edit Program
opens the COMPUTE window and enables you to associate a compute block with the variable that you are defining.
OK
applies the information in the DEFINITION window to the report and closes the window.
Cancel
closes the DEFINITION window without applying changes made with APPLY.