Listing Data

 < Day Day Up > 



To create a detailed listing report, select Reports List Data...

click to expand
Figure 6.1: List Data Dialog

You can use the List Data dialog to print your data in a listing report. You can specify the variables to be included in the report and some details about the report format.

Select variables from the candidate list and click on the Print button to include the variables in the listing.

Select variables from the candidate list and click on the Id button to designate the variables as Id variables in the listing. These Id variables are used instead of observation numbers to identify the observations in the listing.

List Data Options

Click on the Options button in the List Data dialog to specify options that control aspects of the report format and whether or not to print a sum for numeric columns.

General

The General tab enables you to choose to use column names or column labels as column headings.

click to expand
Figure 6.2: General Tab

Spacing between lines of the report can be single or double.

By default, you can print the number of each observation at the left as an identifier. If you have selected an Id variable, you cannot print the observation number.

You can also select to print the total number of observations in the data table at the end of the report.

To precisely control column headings in the report, you can specify a special character for variable labels that determines where the label is split as it forms a column heading. You can alter variable labels by selecting Column Properties...from the Data menu.

Sum

The Sum tab enables you to generate a total for each selected numeric column.

click to expand
Figure 6.3: Sum Tab

The numeric columns that are selected to be printed are listed in the candidate list. Select a column and click on the Sum button, or double-click on the column name to add it to the list of columns to be totalled.

List Data Titles

Click on the Titles button to display the Titles dialog.

click to expand
Figure 6.4: Titles Dialog, List Data Tab

In the Global tab, you can specify titles that are displayed on all output. These titles are saved across all Analyst sessions.

In the List Data tab, you can specify titles for the report. Select the box next to Override global titles to exclude the global titles from the report results.

In the Settings tab, you can specify whether or not to include the date, the page numbers, and a filter description.

List Data Variables

Click on the Variables button to display the List Data: Variables dialog.

click to expand
Figure 6.5: List Data— Variables Dialog

BY group variables separate the data set into groups of observations. Separate reports are produced for each group. For example, you could use a BY group variable to produce separate reports for females and males. Specify BY group variables by selecting them in the candidate list and clicking on the BY Group button.

Example: Create a Listing Report

Open the Fitness Data Set

In this example, you use the Fitness data set as the basis of your listing report. To open the Fitness data set, follow these steps:

  1. Select Tools Sample Data...

  2. Select Fitness.

  3. Click OK to create the sample data set in your Sasuser directory.

  4. Select File Open By SAS Name...

  5. Select Sasuser from the list of Libraries.

  6. Select Fitness from the list of members.

  7. Click OK to bring the Fitness data set into the data table.

Specify Report Columns

To list maximum pulse, resting pulse, and average running pulse for each age, follow these steps:

  1. Select Reports List Data...

  2. Select maxpulse, rstpulse, and runpulse and click on the Print button to include these variables in the report.

  3. Select age and click on the Id button to make age the Id variable.

click to expand
Figure 6.6: Columns in Report

Specify Report Options

To designate options such as column headings, follow these steps:

  1. Click on the Options button in the List Data dialog.

  2. In the General tab, select Column labels under Use as column headings.

    click to expand
    Figure 6.7: Use Column Labels as Column Headings

  3. Click OK to save your changes.

Specify Report Titles

To specify the titles to be displayed in your report, follow these steps:

  1. In the List Data dialog, click on the Titles button to specify your report titles.

  2. In the List Data tab, type Heart Rates According to Age in the first field.

    click to expand
    Figure 6.8: List Data Title

  3. If you have not already done so, type Fitness Report in the first field in the Global tab.

  4. Click on the Settings tab. Deselect Include date and Include page numbers so that the current date and page number are not printed on your report.

    click to expand
    Figure 6.9: Exclude Date and Page Number

  5. Click OK to save your title changes.

Generate a Data Listing

To generate a data listing of the columns that you have chosen, click OK in the List Data dialog.

click to expand
Figure 6.10: Data Listing



 < Day Day Up > 



SAS Institute - The Analyst Application
The Analyst Application, Second Edition
ISBN: 158025991X
EAN: 2147483647
Year: 2003
Pages: 116

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