REPORT Procedure Windows


REPORT Procedure Windows

The windowing environment in PROC REPORT provides essentially the same functionality as the statements, with one major exception: you cannot use the Output Delivery System from the windowing environment.

BREAK

Controls PROC REPORT s actions at a change in the value of a group or order variable or at the top or bottom of a report.

Path

Edit Summarize information

After you select Summarize Information , PROC REPORT offers you four choices for the location of the break:

  • Before Item

  • After Item

  • At the top

  • At the bottom.

After you select a location, the BREAK window opens.

Note: To create a break before or after detail lines (when the value of a group or order variable changes), you must select a variable before you open the BREAK window.

Description

click to expand

Note: For information about changing the formatting characters that are used by the line drawing options in this window, see the discussion of FORMCHAR= on page 890.

Options

Overline summary

  • uses the second formatting character to overline each value

    • that appears in the summary line

    • that would appear in the summary line if you specified the SUMMARIZE option.

  • Default: hyphen (-)

  • Interaction: If you specify options to overline and to double overline, then PROC REPORT overlines.

Double overline summary

  • uses the thirteenth formatting character to overline each value

    • that appears in the summary line

    • that would appear in the summary line if you specified the SUMMARIZE option.

  • Default: equals sign (=)

  • Interaction: If you specify options to overline and to double overline, then PROC REPORT overlines.

Underline summary

  • uses the second formatting character to underline each value

    • that appears in the summary line

    • that would appear in the summary line if you specified the SUMMARIZE option.

  • Default: hyphen (-)

  • Interaction: If you specify options to underline and to double underline, then PROC REPORT underlines.

Double underline summary

  • uses the thirteenth formatting character to underline each value

    • that appears in the summary line

    • that would appear in the summary line if you specified the SUMMARIZE option.

  • Default: equals sign (=)

  • Interaction: If you specify options to underline and to double underline, then PROC REPORT underlines.

Skip line after break

  • writes a blank line for the last break line.

    • This option has no effect if you use it in a break at the end of a report.

Page after break

  • starts a new page after the last break line. This option has no effect in a break at the end of a report.

  • Interaction: If you use this option in a break on a variable and you create a break at the end of the report, then the summary for the whole report is on a separate page.

Summarize analysis columns

  • writes a summary line in each group of break lines. A summary line contains values for

    • statistics

    • analysis variables

    • computed variables.

    • A summary line between sets of observations also contains

    • the break variable (which you can suppress with Suppress break value )

    • other group or order variables to the left of the break variable.

  • The following table shows how PROC REPORT calculates the value for each kind of report item in a summary line created by the BREAK window:

If the report item is

Then its value is

the break variable

the current value of the variable (or a missing value if you select suppress break value )

a group or order variable to the left of the break variable

the current value of the variable

a group or order variable to the right of the break variable, or a display variable anywhere in the report

missing [*]

a statistic

the value of the statistic over all observations in the set

an analysis variable

the value of the statistic specified as the usage option in the item s definition. PROC REPORT calculates the value of the statistic over all observations in the set. The default usage is SUM.

a computed variable

the results of the calculations based on the code in the corresponding compute block (see COMPUTE Statement on page 910).

[*] If you reference a variable with a missing value in a customized summary line, then PROC REPORT displays that variable as a blank (for character variables) or a period (for numeric variables).

Suppress break value

  • suppresses printing of

    • the value of the break variable in the summary line

    • any underlining and overlining in the break lines in the column containing the break variable.

  • If you select Suppress break value , then the value of the break variable is unavailable for use in customized break lines unless you assign it a value in the compute block that is associated with the break.

Color

From the list of colors, select the one to use in the REPORT window for the column header and the values of the item that you are defining.

  • Default: 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 may 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

Edit Program

  • opens the COMPUTE window and enables you to associate a compute block with a location in the report.

OK

  • applies the information in the BREAK window to the report and closes the window.

Cancel

  • closes the BREAK window without applying information to the report.

COMPUTE

Attaches a compute block to a report item or to a location in the report. Use the SAS Text Editor commands to manipulate text in this window.

Path

From Edit Program in the COMPUTED VAR, DEFINITION, or BREAK window.

Description

For information about the SAS language features that you can use in the COMPUTE window, see The Contents of Compute Blocks on page 874.

COMPUTED VAR

Adds a variable that is not in the input data set to the report.

Path

Select a column. Then select Edit Add Item Computed Column

After you select Computed Column , PROC REPORT prompts you for the location of the computed column relative to the column that you have selected. After you select a location, the COMPUTED VAR window opens.

Description

Enter the name of the variable at the prompt. If it is a character variable, then select the Character data check box and, if you want, enter a value in the Length field. The length can be any integer between 1 and 200. If you leave the field blank, then PROC REPORT assigns a length of 8 to the variable.

After you enter the name of the variable, select Edit Program to open the COMPUTE window. Use programming statements in the COMPUTE window to define the computed variable. After closing the COMPUTE and COMPUTED VAR windows, open the DEFINITION window to describe how to display the computed variable.

Note: The position of a computed variable is important. PROC REPORT assigns values to the columns in a row of a report from left to right. Consequently, you cannot base the calculation of a computed variable on any variable that appears to its right in the report.

DATA COLUMNS

Lists all variables in the input data set so that you can add one or more data set variables to the report.

Path

Select a report item. Then select Edit Add Item Data Column

After you select Data column , PROC REPORT prompts you for the location of the computed column relative to the column that you have selected. After you select a location, the DATA COLUMNS window opens.

Description

Select one or more variables to add to the report. When you select the first variable, it moves to the top of the list in the window. If you select multiple variables, then subsequent selections move to the bottom of the list of selected variables. An asterisk (*) identifies each selected variable. The order of selected variables from top to bottom determines their order in the report from left to right.

DATA SELECTION

Loads a data set into the current report definition.

Path

File Open Data Set

Description

The first list box in the DATA SELECTION window lists all the librefs defined for your SAS session. The second one lists all the SAS data sets in the selected library.

Note: You must use data that is compatible with the current report definition. The data set that you load must contain variables whose names are the same as the variable names in the current report definition.

Buttons

OK

  • loads the selected data set into the current report definition.

Cancel

  • closes the DATA SELECTION window without loading new data.

DEFINITION

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

Path

Select a report item. Then select Edit Define

Note: Alternatively, double-click on the selected item. (Not all operating environments support this method of opening the DEFINITION window.)

Description

click to expand

Usage

For an explanation of each type of usage see Laying Out a Report on page 868.

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 on page 935) 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 windowing 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 is present, then PROC REPORT uses BEST w . 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

  • Interaction: When PROC REPORT s CENTER option is in effect, PROC REPORT ignores spacing that precedes the leftmost variable in the report.

  • Interaction: 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.

  • Range: 1 to the value of the SAS system option LINESIZE=

  • 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=.

  • 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 kind of variable.

  • Default: SUM

  • Note: PROC REPORT uses the name of the analysis variable as the default header for the column. You can customize the column header with the Header field of the DEFINITION window.

  • You can use the following values for statistic :

    Descriptive statistic keywords

    CSS

    PCTSUM

    CV

    RANGE

    MAX

    STDDEVSTD

    MEAN

    STDERR

    MIN

    SUM

    N

    SUMWGT

    NMISS

    USS

    PCTN

    VAR

    Quantile statistic keywords

    MEDIANQ2P50

    Q3P75

    P1

    P90

    P5

    P95

    P10

    P99

    Q1P25

    QRANGE

    Hypothesis testing keyword

    PROBT

    T

  • Explanations of the keywords, the formulas that are used to calculate them, and the data requirements are discussed in Appendix 1, SAS Elementary Statistics Procedures, on page 1353.

  • Requirement: To compute standard error and the Student s t -test you must use the default value of VARDEF= which is DF.

  • See also: For definitions of these statistics, see Keywords and Formulas on page 1354.

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 may 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 you expect even if the default changes.

Justify=

  • You can justify the placement of the column header 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 header 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 header 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 header 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 Example 3 on page 968).

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 Example 9 on page 986).

  • Interaction: 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 on page 875).

  • Interaction: 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.

  • Interaction: 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 on page 875).

  • Interaction: 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 header and the values of the item that you are defining.

  • Default: 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 may 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.

DISPLAY PAGE

Displays a particular page of the report.

Path

View Display Page

Description

You can get to the last page of the report by entering a large number for the page number. When you are on the last page of the report, PROC REPORT sends a note to the message line of the REPORT window.

EXPLORE

Lets you experiment with your data.

Restriction: You cannot open the EXPLORE window unless your report contains at least one group or order variable.

Path

Edit Explore Data

Description

In the EXPLORE window you can

  • subset the data with list boxes

  • suppress the display of a column with the Remove Column check box

  • change the order of the columns with Rotate columns.

Note: The results of your manipulations in the EXPLORE window appear in the REPORT window but are not saved in report definitions.

Window Features

list boxes

  • The EXPLORE window contains three list boxes. These boxes contain the value All levels as well as actual values for the first three group or order variables in your report. The values reflect any WHERE clause processing that is in effect. For example, if you use a WHERE clause to subset the data so that it includes only the northeast and northwest sectors, then the only values that appear in the list box for Sector are All levels , Northeast , and Northwest . Selecting All levels in this case displays rows of the report for only the northeast and northwest sectors. To see data for all the sectors, you must clear the WHERE clause before you open the EXPLORE window.

  • Selecting values in the list boxes restricts the display in the REPORT window to the values that you select. If you select incompatible values, then PROC REPORT returns an error.

Remove Column

  • Above each list box in the EXPLORE window is a check box labeled Remove Column . Selecting this check box and applying the change removes the column from the REPORT window. You can easily restore the column by clearing the check box and applying that change.

Buttons

OK

  • applies the information in the EXPLORE window to the report and closes the window.

Apply

  • applies the information in the EXPLORE window to the report and keeps the window open.

Rotate columns

  • changes the order of the variables displayed in the list boxes. Each variable that can move one column to the left does; the leftmost variable moves to the third column.

Cancel

  • closes the EXPLORE window without applying changes made with APPLY.

FORMATS

Displays a list of formats and provides a sample of each one.

Path

From the DEFINE window, type a question mark (?) in the Format field and select any of the Buttons except Cancel , or press RETURN.

Description

When you select a format in the FORMATS window, a sample of that format appears in the Sample: field. Select the format that you want to use for the variable that you are defining.

Buttons

OK

  • writes the format that you have selected into the Format field in the DEFINITION window and closes the FORMATS window. To see the format in the report, select Apply in the DEFINITION window.

Cancel

  • closes the FORMATS window without writing a format into the Format field.

LOAD REPORT

Loads a stored report definition.

Path

File Open Report

Description

The first list box in the LOAD REPORT window lists all the librefs that are defined for your SAS session. The second list box lists all the catalogs that are in the selected library. The third list box lists descriptions of all the stored report definitions (entry types of REPT) that are in the selected catalog. If there is no description for an entry, then the list box contains the entry s name.

Buttons

OK

  • loads the current data into the selected report definition.

Cancel

  • closes the LOAD REPORT window without loading a new report definition.

  • Note: Issuing the END command in the REPORT window returns you to the previous report definition (with the current data).

MESSAGES

Automatically opens to display notes, warnings, and errors returned by PROC REPORT.

You must close the MESSAGES window by selecting OK before you can continue to use PROC REPORT.

PROFILE

Customizes some features of the PROC REPORT environment by creating a report profile.

Path

Tools Report Profile

Description

The PROFILE window creates a report profile that

  • specifies the SAS library, catalog, and entry that define alternative menus to use in the REPORT and COMPUTE windows. Use PROC PMENU to create catalog entries of type PMENU that define these menus . PMENU entries for both windows must be in the same catalog.

  • sets defaults for WINDOWS, PROMPT, and COMMAND. PROC REPORT uses the default option whenever you start the procedure unless you specifically override the option in the PROC REPORT statement.

Specify the catalog that contains the profile to use with the PROFILE= option in the PROC REPORT statement (see the discussion of PROFILE= on page 896).

Buttons

OK

  • stores your profile in a file that is called SASUSER.PROFILE.REPORT.PROFILE.

  • Note: Use PROC CATALOG or the EXPLORER window to copy the profile to another location.

Cancel

  • closes the window without storing the profile.

PROMPTER

Prompts you for information as you add items to a report.

Path

Specify the PROMPT option when you start PROC REPORT or select PROMPT from the ROPTIONS window. The PROMPTER window opens the next time that you add an item to the report.

Description

The prompter guides you through parts of the windows that are most commonly used to build a report. As the content of the PROMPTER window changes, the title of the window changes to the name of the window that you would use to perform a task if you were not using the prompter. The title change is to help you begin to associate the windows with their functions and to learn what window to use if you later decide to change something.

If you start PROC REPORT with prompting, then the first window gives you a chance to limit the number of observations that are used during prompting. When you exit the prompter, PROC REPORT removes the limit.

Buttons

OK

  • applies the information in the open window to the report and continues the prompting process.

  • Note: When you select OK from the last prompt window, PROC REPORT removes any limit on the number of observations that it is working with.

Apply

  • applies the information in the open window to the report and keeps the window open.

Backup

  • returns you to the previous PROMPTER window.

Exit Prompter

  • closes the PROMPTER window without applying any more changes to the report. If you have limited the number of observations to use during prompting, then PROC REPORT removes the limit.

REPORT

Is the surface on which the report appears.

Path

  • Use WINDOWS or PROMPT in the PROC REPORT statement.

Description

You cannot write directly in any part of the REPORT window except column headers. To change other aspects of the report, you select a report item (for example, a column heading) as the target of the next command and issue the command. To select an item, use a mouse or cursor keys to position the cursor over it. Then click the mouse button or press ENTER. To execute a command, make a selection from the menu bar at the top of the REPORT window. PROC REPORT displays the effect of a command immediately unless the DEFER option is on.

Note: Issuing the END command in the REPORT window returns you to the previous report definition with the current data. If there is no previous report definition, then END closes the REPORT window.

ROPTIONS

Displays choices that control the layout and display of the entire report and identifies the SAS data library and catalog containing CBT or HELP entries for items in the report.

Path

Tools Options Report

Description

click to expand

Modes

DEFER

  • stores the information for changes and makes the changes all at once when you turn DEFER mode off or select View Refresh

  • DEFER is particularly useful when you know that you need to make several changes to the report but do not want to see the intermediate reports.

  • By default, PROC REPORT redisplays the report in the REPORT window each time you redefine the report by adding or deleting an item, by changing information in the DEFINITION window, or by changing information in the BREAK window.

PROMPT

  • opens the PROMPTER window the next time that you add an item to the report.

Options

CENTER

  • centers the report and summary text (customized break lines). If CENTER is not selected, then the report is left-justified.

    • PROC REPORT honors the first of these centering specifications that it finds:

    • the CENTER or NOCENTER option in the PROC REPORT statement or the CENTER toggle in the ROPTIONS window

    • the CENTER or NOCENTER option stored in the report definition loaded with REPORT= in the PROC REPORT statement

    • the SAS system option CENTER or NOCENTER.

  • When PROC REPORT s CENTER option is in effect, PROC REPORT ignores spacing that precedes the leftmost variable in the report.

HEADLINE

  • underlines all column headers and the spaces between them at the top of each page of the report.

  • HEADLINE underlines with the second formatting character. (See the discussion of FORMCHAR= on page 890.)

  • Default: hyphen (-)

  • Tip: In traditional (monospace) SAS output, you can underline column headers without underlining the spaces between them, by using '--' as the last line of each column header instead of using HEADLINE.

HEADSKIP

  • writes a blank line beneath all column headers (or beneath the underlining that the HEADLINE option writes) at the top of each page of the report.

NAMED

  • writes name = in front of each value in the report, where name is the column header for the value.

  • Tip: Use NAMED in conjunction with WRAP to produce a report that wraps all columns for a single row of the report onto consecutive lines rather than placing columns of a wide report on separate pages.

  • Interaction: When you use NAMED, PROC REPORT automatically uses NOHEADER.

NOHEADER

  • suppresses column headers, including those that span multiple columns.

  • Once you suppress the display of column headers in the windowing environment, you cannot select any report items.

SHOWALL

  • overrides the parts of a definition that suppress the display of a column (NOPRINT and NOZERO). You define a report item with a DEFINE statement or in the DEFINITION window.

WRAP

  • displays one value from each column of the report, on consecutive lines if necessary, before displaying another value from the first column. By default, PROC REPORT displays values for only as many columns as it can fit on one page. It fills a page with values for these columns before starting to display values for the remaining columns on the next page.

  • Interaction: When WRAP is in effect, PROC REPORT ignores PAGE in any item definitions.

  • Tip: Typically, you use WRAP in conjunction with NAMED to avoid wrapping column headers.

BOX

  • uses formatting characters to add line-drawing characters to the report. These characters

    • surround each page of the report

    • separate column headers from the body of the report

    • separate rows and columns from each other.

  • Interaction: You cannot use BOX if you use WRAP in the PROC REPORT statement or ROPTIONS window or if you use FLOW in any item s definition.

  • See also: For information about formatting characters, see the discussion of FORMCHAR= on page 890.

MISSING

  • considers missing values as valid values for group, order, or across variables. Special missing values that are used to represent numeric values (the letters A through Z and the underscore (_) character) are each considered as a different value. A group for each missing value appears in the report. If you omit the MISSING option, then PROC REPORT does not include observations with a missing value for one or more group, order, or across variables in the report.

Attributes

Linesize

  • specifies the line size for a report. PROC REPORT honors the first of these line-size specifications that it finds:

    • LS= in the PROC REPORT statement or Linesize= in the ROPTIONS window

    • the LS= setting stored in the report definition loaded with REPORT= in the PROC REPORT statement

    • the SAS system option LINESIZE=.

  • Range: 64-256 (integer)

  • Tip: If the line size is greater than the width of the REPORT window, then use SAS windowing environment commands RIGHT and LEFT to display portions of the report that are not currently in the display.

Pagesize

  • specifies the page size for a report. PROC REPORT honors the first of these page size specifications that it finds:

    • PS= in the PROC REPORT statement or Pagesize= in the ROPTIONS window

    • the PS= setting stored in the report definition loaded with REPORT= in the PROC REPORT statement

    • the SAS system option PAGESIZE=.

  • Range: 15-32,767 (integer)

Colwidth

  • specifies the default number of characters for columns containing computed variables or numeric data set variables.

  • Range: 1 to the linesize

  • Default: 9

  • Interaction: When setting the width for a column, PROC REPORT first looks at WIDTH= in the definition for that column. If WIDTH= is not present, then PROC REPORT uses a column width large enough to accommodate the format for the item. (For information about formats, see the discussion of Format= on page 934.) If no format is associated with the item, then the column width depends on variable type:

    If the variable is a

    Then the column width is the

    character variable in the input data set

    length of the variable

    numeric variable in the input data set

    value of the COLWIDTH= option

    computed variable (numeric or character)

    value of the COLWIDTH= option

SPACING= space-between-columns

  • specifies the number of blank characters between columns. 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

  • Interaction: PROC REPORT separates all columns in the report by the number of blank characters specified by SPACING= in the PROC REPORT statement or the ROPTIONS window unless you use SPACING= in the definition of a particular item to change the spacing to the left of that item.

  • Interaction: When CENTER is in effect, PROC REPORT ignores spacing that precedes the leftmost variable in the report.

SPLIT= character

  • specifies the split character. PROC REPORT breaks a column header when it reaches that character and continues the header on the next line. The split character itself is not part of the column header although each occurrence of the split character counts toward the 40-character maximum for a label.

  • Default: slash (/)

  • Interaction: The FLOW option in the DEFINE statement honors the split character.

  • Note: If you are typing over a header (rather than entering one from the PROMPTER or DEFINITION window), then you do not see the effect of the split character until you refresh the screen by adding or deleting an item, by changing the contents of a DEFINITION or a BREAK window, or by selecting View Refresh

PANELS= number-of-panels

  • specifies the number of panels on each page of the report. If the width of a report is less than half of the line size, then you can display the data in multiple sets of columns so that rows that would otherwise appear on multiple pages appear on the same page. Each set of columns is a panel . A familiar example of this kind of report is a telephone book, which contains multiple panels of names and telephone numbers on a single page.

  • When PROC REPORT writes a multipanel report, it fills one panel before beginning the next.

  • The number of panels that fits on a page depends on the

    • width of the panel

    • space between panels

    • line size.

  • Default: 1

  • Tip: If number-of-panels is larger than the number of panels that can fit on the page, then PROC REPORT creates as many panels as it can. Let PROC REPORT put your data in the maximum number of panels that can fit on the page by specifying a large number of panels (for example, 99).

  • See also: For information about specifying the space between panels see the discussion of PSPACE= on page 947. For information about setting the linesize, see the discussion of Linesize on page 945).

PSPACE= space-between-panels

  • specifies the number of blank characters between panels. PROC REPORT separates all panels in the report by the same number of blank characters. For each panel, the sum of its width and the number of blank characters separating it from the panel to its left cannot exceed the line size.

  • Default: 4

User Help

  • identifies the library and catalog containing user-defined help for the report. This help can be in CBT or HELP catalog entries. You can write a CBT or HELP entry for each item in the report with the BUILD procedure in SAS/AF software. You must store all such entries for a report in the same catalog.

  • Specify the entry name for help for a particular report item in the DEFINITION window for that report item or in a DEFINE statement.

SAVE DATA SET

Lets you specify an output data set in which to store the data from the current report.

Path

File Save Data Set

Description

To specify an output data set, enter the name of the SAS data library and the name of the data set (called member in the window) that you want to create in the Save Data Set window.

Buttons

OK

  • Creates the output data set and closes the Save Data Set window.

Cancel

  • Closes the Save Data Set window without creating an output data set.

SAVE DEFINITION

Saves a report definition for subsequent use with the same data set or with a similar data set.

Path

File Save Report

Description

The SAVE DEFINITION window prompts you for the complete name of the catalog entry in which to store the definition of the current report and for an optional description of the report. This description shows up in the LOAD REPORT window and helps you to select the appropriate report.

SAS stores the report definition as a catalog entry of type REPT. You can use a report definition to create an identically structured report for any SAS data set that contains variables with the same names as those used in the report definition.

Buttons

OK

  • Creates the report definition and closes the SAVE DEFINITION window.

Cancel

  • Closes the SAVE DEFINITION window without creating a report definition.

SOURCE

Lists the PROC REPORT statements that build the current report.

Path

Tools Report Statements

STATISTICS

Displays statistics that are available in PROC REPORT.

Path

Edit Add item Statistic

After you select Statistic , PROC REPORT prompts you for the location of the statistic relative to the column that you have selected. After you select a location, the STATISTICS window opens.

Description

Select the statistics that you want to include in your report and close the window. When you select the first statistic, it moves to the top of the list in the window. If you select multiple statistics, then subsequent selections move to the bottom of the list of selected statistics. An asterisk (*) indicates each selected statistic. The order of selected statistics from top to bottom determines their order in the report from left to right.

Note: If you double-click on a statistic, then PROC REPORT immediately adds it to the report. The STATISTICS window remains open.

To compute standard error and the Student s t test you must use the default value of VARDEF= which is DF.

To add all selected statistics to the report, select File Accept Selection Selecting File Close closes the STATISTICS window without adding the selected statistics to the report.

WHERE

Selects observations from the data set that meet the conditions that you specify.

Path

Subset Where

Description

Enter a where-expression in the Enter where clause field. A where-expression is an arithmetic or logical expression that generally consists of a sequence of operands and operators. For information about constructing a where-expression , see the documentation of the WHERE statement in the section on statements in SAS Language Reference: Dictionary .

Note: You can clear all where-expressions by leaving the Enter where clause field empty and by selecting OK.

Buttons

OK

  • Applies the where-expression to the report and closes the WHERE window.

Cancel

  • Closes the WHERE window without altering the report.

WHERE ALSO

Selects observations from the data set that meet the conditions that you specify and any other conditions that are already in effect.

Path

Subset Where Also

Description

Enter a where-expression in the Enter where also clause field. A where-expression is an arithmetic or logical expression that generally consists of a sequence of operands and operators. For information about constructing a where-expression , see the documentation of the WHERE statement in the chapter on statements in SAS Language Reference: Dictionary .

Buttons

OK

  • Adds the where-expression to any other where-expressions that are already in effect and applies them all to the report. It also closes the WHERE ALSO window.

Cancel

  • Closes the WHERE ALSO window without altering the report.




Base SAS 9.1.3 Procedures Guide (Vol. 2)
Base SAS 9.1 Procedures Guide, Volumes 1, 2, 3 and 4
ISBN: 1590472047
EAN: 2147483647
Year: 2004
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net