Chapter Contents |
Previous |
Next |
Getting Started with the SAS System Using SAS/ASSIST Software |
Information on Ranch Style Houses Report
A table is a collection of information arranged in columns and rows. A column is a set of data values that represents a particular type of data; for example, the price of all the houses. A row is a set of data values for the same item; for example, all the information about one house, such as price, style, square footage, and so on. Refer to Setting Up SAS Files for more information about tables, rows, and columns.
Setting Up the Report |
Tasks | Report Writing | Listing... |
List a Table Window
File | New |
Run | Submit |
Listing of HOUSES Table
The listing report is a quick way to get a list of all the data in your table. Note the different styles of the houses. For the sample report shown in Information on Ranch Style Houses Report, only the RANCH style houses are selected.
Note: Under some operating environments, if
you are using the Output window and the report is longer than one display, the last display of the report is shown after you select Close once. In
this case, select File and then Close again. The task window reappears.
Subsetting the Data |
To produce the report shown in Information on Ranch Style Houses Report, you need to subset and customize the report. Subset the data as follows:
Subset Data Window
You subset the data if you want to produce a report that uses only some of the data in the table. For example, to produce the sample report shown in Information on Ranch Style Houses Report, you need to subset the data so that only data for ranch-style houses are used.
Build a WHERE Clause to Subset the Current Data Window
This window enables you to create a WHERE clause that specifies criteria for selecting rows. The rows that match the criteria in the WHERE clause are used in the report. For this example, you build a WHERE clause that selects only the houses where STYLE=RANCH.
You subset the data by using one of the following methods:
STYLE='RANCH'
under Edit the current WHERE clause.
Select Data Window (Comparison Operators)
Select Data Window (Look Up Constants)
Select RANCH and then select OK.
Note: Using Look up constants prevents you from making typing
errors. However, it is more useful when there are a small number of possible values than when there are a large number of possible
values.
Enter a Character Constant Window
To select the ranch-style houses, type
RANCH
in the Value field. Make sure RANCH is in uppercase because all of the style values are in uppercase in this sample data.
Any time you use a
character string for a constant value in a WHERE or BY clause, you need to make sure you use the exact case of the character string in the table. If the word ranch had been in lowercase
in the HOUSES table, you would type
ranch
.
Completed WHERE Clause
To make changes to the WHERE clause, select Edit the WHERE clause. You can then make changes to the column, comparison operator, and constant.
Note that in certain operating environments, there is an additional option to Verify where clause against data. If you select this option, SAS software checks to see if there are any rows that meet the conditions of your WHERE clause. If your table is very large, this verification can take a long time.
Adding Titles |
Edit | Titles... |
Titles Window
Title 1 Window
Information on Ranch Style Houses
. Select OK twice to return to the List a Table window.
Note: Because the same set of titles and footnotes is used for all
SAS/ASSIST tasks,
the titles and footnotes most recently used in your SAS/ASSIST session are used unless you change or reset them. If a title already exists when you open the Titles window,
type the new title over the old title.
Running the Report |
After you have finished setting up the report, you can run the report.
Run | Submit |
Information on Ranch Style Houses Report
This report shows all the data for the ranch-style houses in the HOUSES table.
Printing the Report |
File |
Print Window
Note: If you are generating HTML
output, you can view the report in your HTML browser and print using the browser's print function. See Setting Up HTML Output for details on HTML
output with SAS/ASSIST software.
Exiting This Task |
When you have finished viewing or printing your report, return to the List a Table window by using one of the following methods, depending on your operating environment:
To return to the WorkPlace menu or move on to another task, follow the directions in Exiting a Task.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.