Getting Started with the SAS System Using SAS/ASSIST Software |
The following steps instruct you to generate a
listing report and then save the programming statements that are generated for that listing report. For more detailed instructions on how to produce a listing report, refer to
Report Writing.
- Follow this selection
path:
Tasks |
|
Report Writing |
|
Listing... |
The List a Table window
appears.
- If the active table is SASUSER.HOUSES, continue to the next step. Otherwise, select Table, and then select the
SASUSER.HOUSES table. For more information on selecting tables, see Selecting a Table.
- If there is an
active Subset Data selection (indicated by BY, WHERE, or ROWS next to the Subset data
button), follow the directions in Clearing a Subset Data Selection.
- If other report selections exist (for example,
column names are listed for Columns), follow this selection path to clear these selections:
File |
|
New |
Select
No in the Save Changes dialog box.
- To run the report, follow this selection
path:
Run |
|
Submit |
The Listing Report appears in the Output window. Note that it is not necessary to run a task
before saving it.
- Return to the List a Table window by using one of the following methods, depending on your operating
environment:
- Use the PREVWIND function key.
- Click on the SAS/ASSIST
window.
The steps in this section enable you to look at
the program that was created by SAS/ASSIST software when you produced the listing report.
- Follow this selection path from the List
a Table window:
View |
|
View source |
The program that was created when you produced the listing report
appears.
Program for Creating Listing Report
- Use
the scroll bars or the FORWARD, BACKWARD, LEFT, and RIGHT function keys to view the program.
- When you finish looking at the program, follow this selection path
to return to the List a Table window:
File |
|
Close |
The steps in this section enable you to save the
program that produced the listing report so that you can edit it or re-execute it at a later time.
- Follow this selection path from the
List a Table window:
File |
|
Save as source... |
The Save As window
appears.
Save As Window
- In the
Name field, type the name you want to call the program. For this example, type
HOUSERPT
as the program name.
A program name can be one to eight characters in length. It must start with a letter (A through Z) or an underscore (_), but it can otherwise contain
any combination of letters, numbers, and underscores.
- In the Description field, type a description of the program. The Description
can be up to 32 characters in length and contain any combination of letters, numbers, and other characters. For this example, type
Listing of the Houses Table
.
- The default catalog for saved source code is called SASUSER.PRIVATE, as shown in the previous display. If you want to save the source code in a different
catalog, type the catalog name in the Catalog field. For a list of available catalogs, type a
?
in the Catalog field and press ENTER to display a list of available catalogs. You can select
one from this list.
- Select OK to return to the List a Table window. A note appears in the message area
to indicate that the program has been successfully saved.
|
Editing and Re-executing Source Code |
You can use the Result Manager to edit and re-execute the program you saved in the previous section. For more information on the Result Manager, see
Using the Result Manager.
- Follow this selection path to invoke the Result Manager:
Tools |
|
Result Manager |
Select No in the Save Changes dialog box. The Result Manager
window appears with a list of your saved tasks, output, and programs.
- Position the cursor in the space to the left of HOUSREPT. Type
E
(or
S
) and press ENTER. The Edit window appears with your program.
Edit Window
- Position the cursor over the
semicolon (;) in the line with the
footnote
statement. Add a footnote by pressing the SPACE BAR, and then typing
SASUSER.HOUSES.DATA;
as shown in the following display.
Modified Source Code
- Follow this
selection path to save the edited program and return to the Result Manager window:
File |
|
Close |
A prompt appears
asking if you want to save the changes to the program. Select Yes.
- In the selection field next to
HOUSREPT, type
X
and press ENTER to re-execute the program and view the footnote you added.
Modified Listing Report Output
- To return
to the Result Manager window from the Output window, use one of the following methods, depending on your operating
environment:
- Use the PREVWIND function key.
- Click on the SAS/ASSIST
window.
- To return to the List a Table window, follow this selection path from the
Results window:
File |
|
End |
The List a Table window
reappears.
When you are ready to return to the WorkPlace menu or move on to another task, follow the directions in
Exiting a Task.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.