![]() Chapter Contents |
![]() Previous |
![]() Next |
| Example of Traditional Listing Output |
See the procedure descriptions in the SAS Procedures Guide for examples of output from SAS procedures. For a discussion and examples of DATA step output, see the FILE and PUT statements in SAS Language Reference: Dictionary.
This example produces a listing that is generated by the PUT and FILE statements in a DATA step. The input file is the SAS data set GRAIN_PRODUCERS.
options pagesize=60 linesize=64 nodate pageno=1;
title 'Leading Grain Producers';
title2 'for 1996';
data _null_;
set grain_producers;
file print header=newpage;
if year=1996;
format country $cntry.;
label type='Grain';
put country @25 type @50 kilotons;
return;
newpage:
put 'Country' @25 'Grain' @50 'Kilotons';
put 60*'=';
return;
run;
Leading Grain Producers 1
for 1996
Country Grain Kilotons
============================================================
Brazil Wheat 3302
Brazil Rice 10035
Brazil Corn 31975
China Wheat 109000
China Rice 190100
China Corn 119350
India Wheat 62620
India Rice 120012
India Corn 8660
Indonesia Wheat .
Indonesia Rice 51165
Indonesia Corn 8925
United States Wheat 62099
United States Rice 7771
United States Corn 236064 |
| Making Output Descriptive |
The LABEL statement also provides descriptive labels when it is used with certain SAS procedures. See the SAS Procedures Guide for information on using the LABEL statement with a specific procedure (for example, the PRINT procedure).
The values you use for the LINESIZE= and PAGESIZE= system options can significantly affect the appearance of the output that is produced by some SAS procedures.
The SAS System
You can use the TITLE statement or TITLES window to replace the default
title or specify other descriptive titles for SAS programs. You can use the
null title statement (
title;)
to suppress a TITLE statement.
For more information about how to use these and other SAS system options and statements, see "SAS System Options" and "Statements" in SAS Language Reference: Dictionary.
| Reformatting Values |
The FORMAT procedure enables you to design your own formats and informats, giving you added flexibility in displaying values. See "The FORMAT Procedure," in the SAS Procedures Guide for more information.
| Printing Missing Values |
The MISSING= system option enables you to specify a character to print in place of the period for ordinary missing numeric values.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.