Chapter Contents

Previous

Next
SAS Procedures Guide

Procedure Concepts

This section contains background information on concepts and tools that are common to many base SAS procedures.


Input Data Sets
Many base procedures require an input SAS data set. You specify the input SAS data set using the DATA= option in the procedure statement, for example,

proc print data=emp;

If you omit the DATA= option, the procedure uses the value of the SAS system option _LAST_=. The default of _LAST_= is the most recently created SAS data set in the current SAS job or session. _LAST_= is described in detail in SAS Language Reference: Dictionary.


Output Delivery System
Prior to Version 7, SAS procedures that produced printed output (that is, output that was destined for the procedure output file) generated output that was designed for a traditional line-printer. This type of output has limitations that prevent users from getting the most value from their results:

Beginning with Version 7, procedure output became much more flexible. The Output Delivery System (ODS) has been designed to overcome the limitations of traditional SAS output and to make it easy to make new formatting options available to users. ODS is a method of delivering output in a variety of formats and of making the formatted output easy to access. Important features of ODS include the following:

In addition, ODS removes responsibility for formatting output from individual procedures and from the DATA step. The procedure or DATA step supplies raw data and the name of the table definition that contains the formatting instructions, and ODS formats the output. Because formatting is now centralized in ODS, the addition of a new ODS destination does not affect any procedures or the DATA step. As future destinations are added to ODS, they will automatically become available to all procedures that support ODS and to the DATA step.

This section briefly illustrates these features. For more information about the Output Delivery System, see The Complete Guide to the SAS Output Delivery System.

Note:   The examples in this section use filenames that may not be valid in all operating environments. To successfully run the example in your operating environment, you may need to change the file specifications. See Appendix 1, "Alternate ODS HTML Statements for Running Examples in Different Operating Environments," in The Complete Guide to the SAS Output Delivery System.  [cautionend]

Creating Listing Output

You do not need to change your SAS programs to create Listing output. By default, the Listing destination is open. Unless you specifically close the Listing destination with the ODS LISTING CLOSE statement, you will continue to create Listing output.

Creating Printer Output

If you open the Printer destination, you can create output that is formatted for a high-resolution printer. The first ODS PRINTER statement in the following SAS program opens the Printer destination and directs the formatted output to the file odsprinter.ps. The second ODS PRINTER statement closes the Printer destination. You must close the Printer destination before you can print the file.

The data set STATEPOP is created in a DATA step . The REGFMT. format is created in a PROC FORMAT step . The printer output appears in Output Created by the Printer Destination .

options nodate nonumber;
ods printer file='odsprinter.ps';
proc tabulate data=statepop;
   class region state;
   var citypop_80 citypop_90;
   table region*state, citypop_80*sum=' ' citypop_90*sum=' ';
   format region regfmt.;
   where region=1;
   label citypop_80='1980' citypop_90='1990';
   title 'Metropolitan Population for the Northeast Region';
   title2 '(measured in millions)';
run;
ods printer close;

Output Created by the Printer Destination

[IMAGE]


Creating HTML Output

If you open the HTML destination, you can create output that is formatted in HyperText Markup Language (HTML). You can browse these files with Internet Explorer, Netscape, or any other browser that fully supports the HTML 3.2 tag set.

The ODS HTML statement, which generates the HTML files, can create

For example, the first ODS HTML statement in the following SAS program generates four HTML files. ODS routes the results of the PROC UNIVARIATE step to the body file as well as to the Listing destination. ODS also creates the associated contents, page, and frame files. The second ODS HTML statement closes the HTML destination. You must close the HTML destination before you can browse the HTML files.

/* Create HTML files. */
ods html file='odshtml-body.htm'
         contents='odshtml-contents.htm'
         page='odshtml-page.htm'
         frame='ods-html-frame.htm';
proc univariate data=statepop mu0=3.5;
   var citypop_90 noncitypop_90;
   title;
run;
/* Close the HTML destination.            */
/* You must close this destination before */
/* you can browse the HTML files.         */
ods html close;

Frame File Created by the ODS HTML Statement.
Select an entry in the table of contents to see the corresponding procedure results. [HTML Output]
For more information about creating HTML output, see the discussion of the ODS HTML Statement in Chapter 3, "The ODS Statements" in The Complete Guide to the SAS Output Delivery System. You can see many examples of HTML output in SAS Procedures Guide online documentation.

Note:   Procedure options that affect presentation may not affect HTML output. For instance, the DOUBLE option in PROC PRINT, which inserts a blank line between observations, has no effect on HTML output.  [cautionend]

Identifying Output Objects

Several of the features of the Output Delivery System (such as selecting and excluding output objects to send to ODS destinations or creating a data set from an output object) require that you specify one or more particular output objects for the system to process. You identify an output object by its name, its label, or its path. To learn what these are, run your SAS program preceded by this statement:
ods trace on;
As long as the tracing feature is on, information about each output object that is created appears in the SAS log.

Use this statement to stop sending the information to the log:

ods trace off;

For example, the following SAS program produces the SAS log that is shown in SAS Log Produced by the ODS TRACE Statement :

options nodate pageno=1 linesize=64 pagesize=60;
ods trace on;

proc univariate data=statepop mu0=3.5;
   var citypop_90 noncitypop_90;
   title;
run;

ods trace off;
SAS Log Produced by the ODS TRACE Statement
 Note about figure
36   options nodate pageno=1 linesize=64 pagesize=60;
37   ods trace on;
38   
39   proc univariate data=statepop mu0=3.5;
40      var citypop_90 noncitypop_90;
41      title;
42   run;

Output Added:     
-------------
Name:       Moments
Label:      Moments
Template:   base.univariate.Moments
Path:       Univariate.CityPop_90.Moments
-------------

Output Added:   
-------------
Name:       BasicMeasures   <--
Label:      Basic Measures of Location and Variability
Template:   base.univariate.Measures
Path:       Univariate.CityPop_90.BasicMeasures
-------------

Output Added:
-------------
Name:       TestsForLocation

Label:      Tests For Location
Template:   base.univariate.Location
Path:       Univariate.CityPop_90.TestsForLocation
-------------

Output Added:
-------------
Name:       Quantiles
Label:      Quantiles
Template:   base.univariate.Quantiles
Path:       Univariate.CityPop_90.Quantiles
-------------

Output Added:
-------------
Name:       ExtremeObs
Label:      Extreme Observations
Template:   base.univariate.ExtObs
Path:       Univariate.CityPop_90.ExtremeObs
-------------
Output Added:
-------------
Name:       Moments     
Label:      Moments
Template:   base.univariate.Moments
Path:       Univariate.NonCityPop_90.Moments
-------------

Output Added:   
-------------
Name:       BasicMeasures   <-- 
Label:      Basic Measures of Location and Variability
Template:   base.univariate.Measures
Path:       Univariate.NonCityPop_90.BasicMeasures
-------------

Output Added:
-------------
Name:       TestsForLocation
Label:      Tests For Location
Template:   base.univariate.Location
Path:       Univariate.NonCityPop_90.TestsForLocation
-------------

Output Added:
-------------
Name:       Quantiles
Label:      Quantiles
Template:   base.univariate.Quantiles
Path:       Univariate.NonCityPop_90.Quantiles
-------------

Output Added:
-------------
Name:       ExtremeObs
Label:      Extreme Observations
Template:   base.univariate.ExtObs
Path:       Univariate.NonCityPop_90.ExtremeObs
-------------

Output Added:
-------------
Name:       MissingValues
Label:      Missing Values
Template:   base.univariate.Missings
Path:       Univariate.NonCityPop_90.MissingValues
-------------

If you compare this SAS log to the Results Folder that appears in View of the Results Folder , you can see that the string that identifies the output in the Results folder is its label.

For more information about the trace record, see the discussion of the contents of the trace record in the documentation for the ODS TRACE statement in "The ODS Statements" in The Complete Guide to the SAS Output Delivery System.

Selecting Output Objects to Send to ODS Destinations

Some procedures, such as PROC UNIVARIATE, produce multiple output objects. Any procedure that uses ODS produces multiple output objects when you use BY-group processing. ODS enables you to select which of these output objects go to the open ODS destinations. ODS destinations include the Listing destination, the HTML destination, the Printer destination, and the Output destination. For more information about ODS destinations, see "Basic Concepts about the Output Delivery System" in The Complete Guide to the SAS Output Delivery System.

You choose the objects to send to destinations with the ODS SELECT or the ODS EXCLUDE statement. To select individual output objects, use this form of the ODS SELECT statement:

ODS SELECT selection(s);
where each value of selection can be a full path, a name, or a label (see the trace record in SAS Log Produced by the ODS TRACE Statement ). You can also use a partial path. A partial path consists of any part of the full path that begins immediately after a period (.) and continues to the end of the full path. For details about referencing output objects, see the discussion of specifying an output object in the documentation of the ODS SELECT statement in "The ODS Statements" in The Complete Guide to the SAS Output Delivery System.

For example, to select just the output objects that contain the basic measures and the quantiles from the PROC UNIVARIATE output, use the following program.

/* Create HTML files. */
ods html file='select-body.htm'
         contents='select-contents.htm'
         page='select-page.htm'
         frame='select-frame.htm';
/* Select output objects by name. */
ods select BasicMeasures Quantiles;

/* Analyze the data.      */
proc univariate data=statepop mu0=3.5;
   var citypop_90 noncitypop_90;
   title;
run;

/* Close the HTML destination. */
ods html close;
The frame file appears in Frame File for Selected Output Objects . The program also creates Listing output, which is not shown. The Listing output contains the same information as the HTML body file, but it is formatted with the traditional SAS monospace font.

Frame File for Selected Output Objects
The contents file shows that for each variable in the analysis, PROC UNIVARIATE produces two output objects: one that contains basic measures and one that contains quantiles. All four output objects are in the body file because the ODS SELECT statement used names to identify the objects. If the ODS SELECT statement had used paths, which are unique, it could have selected output objects for the individual variables. [HTML Output]
For more information about selecting output objects, see the documentation for the ODS SELECT statement in "The ODS Statements" in The Complete Guide to the SAS Output Delivery System.

Creating an Output Data Set

The Output Delivery System enables you to create a data set from an output object.

To create a data set, use the ODS OUTPUT statement. In this statement, you identify

To create a single output data set, use this simplified form of the ODS OUTPUT statement:

ODS OUTPUT output-object=SAS-data-set;

Specify the output object as you do in the ODS SELECT statement: with a path, a name, a label, or a partial path. For example, to generate and print an output data set from each output object that contains the basic measures that PROC UNIVARIATE produces, use the following SAS program.

/* Turn off the generation of Listing output   */
/* because you want to create a data set, not  */
/* see the results.                            */
ods listing close;

/* Specify the data set to create. */
ods output BasicMeasures=measures;

/* When PROC UNIVARIATE runs, ODS    */
/* creates a data set named MEASURES */
/* from the output object named      */
/* BasicMeasures.                    */
proc univariate data=statepop mu0=3.5;
   var citypop_90 noncitypop_90;
   title;
run;
/* Open the HTML destination for PROC PRINT. */
ods html body='measures-body.htm'
     contents='measures-contents.htm'
        frame='measures-frame.htm';
/* Print the output data set. */
proc print data=measures noobs headings=horizontal;
   title 'Output Data Set Produced from';
   title2 'PROC UNIVARIATE Basic Measures';
run;

/* Reset the destinations to their defaults. */
/* Close the HTML destination.               */
ods html close;
/* Open the Listing destination.             */
ods listing;

You can use the resulting data set as input to another SAS program. This program simply prints the data set to illustrate its structure. The HTML output from PROC PRINT appears in PROC PRINT Report of the Data Set Created by PROC UNIVARIATE and ODS .

PROC PRINT Report of the Data Set Created by PROC UNIVARIATE and ODS
The data set contains observations for each of the variables in the VAR statement in PROC UNIVARIATE. [HTML Output]
For more information about creating output data sets, see the discussion of the ODS OUTPUT statement in "The ODS Statements," in The Complete Guide to the SAS Output Delivery System.

Storing Links in the Results Folder

When you run a procedure that supports ODS, SAS automatically stores a link to the ODS output in the Results folder in the Results window. It marks the link with an icon that identifies the output destination that created the output.

Consider the following SAS program, which generates Listing, HTML, and Printer output as well as an output data set (Output output). The data set STATEPOP contains information about the distribution of the United States' population in metropolitan and nonmetropolitan areas for 1980 and 1990. A DATA step creates this data set.

options nodate pageno=1 linesize=80 pagesize=34;
ods html file='results-body.htm';
ods printer file='results.ps';
ods output basicmeasures=measures;
proc univariate data=statepop mu0=3.5;
   var citypop_90 noncitypop_90;
   title;
run;
ods html close;
ods printer close;
The Results folder (see View of the Results Folder ) shows the folders and output objects that the procedure produces.

View of the Results Folder
 Note about figure

[IMAGE]


Customizing Procedure Output

Many procedures that fully support ODS provide table definitions that enable you to customize each output object that the procedure produces. You do so by creating an alternate table definition for the procedure to use. This section illustrates how to make an alternative table definition. The explanation here focuses on the structure of the table. For detailed explanations of all the statements and attributes that the program uses, see the section on the TEMPLATE procedure in The Complete Guide to the SAS Output Delivery System.

For example, the following SAS program creates a customized table definition for the BasicMeasures output object from PROC UNIVARIATE. (The trace record provides the name of the table definition that each object uses. See SAS Log Produced by the ODS TRACE Statement .) In the customized version

The customized output, from both the HTML and the Listing destinations, appears in Customized Listing Output from PROC UNIVARIATE . The customized Printer output appears in Customized Printer Output from PROC UNIVARIATE (page 1) .
/* These four options all affect the Listing output.  */
/* NODATE and NONUMBER also affect the Printer output.*/
/* None of them affects the HTML output.              */ 
options nodate nonumber linesize=80 pagesize=60;
/* This PROC TEMPLATE step creates a table definition */
/* base.univariate.Measures in the SASUSER template   */
/* store. Table definitions that are provided         */
/* by SAS Institute are stored in a template          */
/* store in the SASHELP library. By default, ODS      */
/* searches for a table definition in SASUSER before  */
/* SASHELP, so when PROC UNIVARIATE calls for a       */
/* table definition by this name, ODS uses the one    */
/* from SASUSER.                                      */
proc template;
   define table base.univariate.Measures;

   notes "Basic measures of location and variability";

   translate _val_ = ._ into '';
   /* The HEADER statement determines the order */
   /* in which the table definition uses the    */
   /* headers, which are defined later.         */
   header h1 h2 h3;

   /* The COLUMN statement determines the order */
   /* in which the variables appear. PROC       */
   /* UNIVARIATE names the variables.           */
   column VarMeasure VarValue LocMeasure LocValue;
   /* These DEFINE blocks define the headers.   */
   /* They specify the text for each header. By */
   /* default, a header spans all columns, so   */
   /* H1 does so. H2 spans the variables        */
   /* VarMeasure and VarValue. H3 spans         */
   /* LocMeasure and LocValue.                  */
   define h1;
     text "Basic Statistical Measures";
     spill_margin=on;
     space=1;
   end;

   define h2;
     text "Measures of Variability";
     start=VarMeasure
     end=VarValue;
   end;

   define h3;
     text "Measures of Location";
     start=LocMeasure
     end=LocValue;
   end;
   /* These DEFINE blocks specify characteristics  */
   /* for each of the variables. There are two     */
   /* differences between these DEFINE blocks and  */
   /* the ones in the table definition in SASHELP. */
   /* These blocks use FORMAT= to specify a format */
   /* of 7.3 for LocValue and VarValue. They also  */
   /* use STYLE= to specify a bold, italic font    */
   /* for these two variables. The STYLE= option   */
   /* does not affect the Listing output.          */
   define LocMeasure;
     print_headers=off;
     glue=2;
     space=3;
     style=rowheader;
   end;

   define LocValue;
     print_headers=off;
     space=5;
     format=7.3;
     style=data{font_style=italic font_weight=bold};
   end;

   define VarMeasure;
     print_headers=off;
     glue=2;
     space=3;
     style=rowheader;
   end;

   define VarValue;
     print_headers=off;
     format=7.3;
     style=data{font_style=italic font_weight=bold};
   end;
    /* End the table definition.                  */
 end;
/* Run the procedure.                             */
run;
/* Begin the program that uses the            */ 
/* customized table definition.               */ 

/* The ODS HTML statement opens the HTML      */
/* destination and identifies the files to    */
/* write to.                                  */
ods html file='statepop-body.htm'
     contents='statepop-contents.htm'
         page='statepop-page.htm'
        frame='statepop-frame.htm';

/* The ODS PRINTER statement opens the        */ 
/* Printer destination and identifies the     */ 
/* file to write to.                          */ 
ods printer file='statepop.ps'; 
/* The ODS SELECT statement selects just the       */
/* output object that contains the basic measures. */ 
ods select BasicMeasures;

/* PROC UNIVARIATE produces one object for each    */
/* variable. It uses the customized table          */
/* definition to format the data because the       */
/* customized definition is in SASUSER. (See the   */
/* explanation with the PROC TEMPLATE statement in */
/* this example.                                  */
title;
proc univariate data=statepop mu0=3.5;
   var citypop_90 noncitypop_90;
run;

/* Close the HTML destination.   */
ods html close;
/* Close the Printer destination. */ 
ods printer close; 

Customized Listing Output from PROC UNIVARIATE
[HTML Output]  [Listing Output]

Customized Printer Output from PROC UNIVARIATE (page 1)

[IMAGE]

Customized Printer Output from PROC UNIVARIATE (page 2)

[IMAGE]


A Gallery of HTML and Printer Output Produced by Base Procedures
This section illustrates the HTML and Printer output that you can get from routing selected examples from the documentation on individual procedures through the HTML and Printer destinations. Each piece of HTML output was created by running the specified example with this ODS HTML statement preceding it:

ods html body='external-file';
    

If Printer output is shown, the specified example was run with this ODS PRINTER statement preceding it:

ods printer file='external-file';
You must execute the following statement before you can view the resulting HTML files in a browser:
ods html close;
You must execute the following statement before you can print Printer output:
ods printer close;

PROC TABULATE: Summarizing Information with the Universal Class Variable ALL

The SAS program that produces this output is in Summarizing Information with the Universal Class Variable ALL .

HTML Output from PROC TABULATE
[HTML Output]

Printer Output from PROC TABULATE

[IMAGE]


PROC FREQ: Analyzing a 2×2 Contingency Table

The SAS program that produces this output is in Analyzing a 2×2 Contingency Table .

HTML Output from PROC FREQ
[HTML Output]

Printer Output from PROC FREQ (page 1)

[IMAGE]

Printer Output from PROC FREQ (page 2)

[IMAGE]


PROC PRINT: Summing Numeric Variables with One BY Group

The SAS program that produces this output is in Summing Numeric Variables with One BY Group .

HTML Output from PROC PRINT
[HTML Output]

PROC REPORT: Specifying Style Elements for HTML Output in the PROC REPORT Statement

The SAS program that produces this output is in Specifying Style Elements for HTML Output in the PROC REPORT Statement .

HTML Output from PROC REPORT
[HTML Output]


Customizing the Style Definition That ODS Uses

What Is a Style Definition?

A style definition determines the overall look of the document that uses it. Each style definition is a collection of style elements, each of which affects a particular part of the document. Procedures may use different style elements in different parts of their output. For example, a procedure can use one style element for column headers and another for data. Each style element is, in turn, a collection of attributes and values. The attributes determine the size, face, and weight of the type that is used, the color of the foreground and background, and other such features.

For a list of the attributes, see What Style Attributes Can Base Procedures Specify? .

What Style Definitions Are Shipped with the Software?

SAS Institute ships a number of style definitions with the SAS System. To see a list of these styles,
  1. Select

    View
    [arrow]
    Results

  2. In the Results window, select the Results folder. With your cursor on this folder, use your right mouse button to open the Templates window.

  3. In the Templates window, select and open Sashelp.tmplmst.

  4. Select Styles, and use your right mouse button to open this folder, which contains a list of available style definitions. If you want to view the underlying SAS code for a style definition, select it and open it.

Operating Environment Information:   For information on navigating in the Explorer window without a mouse, see the section on "Window Controls and General Navigation" in the SAS documentation for your operating environment.  [cautionend]

You can also, submit this PROC TEMPLATE step to see the SAS code for a style definition:

proc template;
   source style-name;
run;
where style-name is the path to the style from the template store (for example styles.default or styles.beige).

The HTML destination uses the style that is called Default unless you specify an alternative style with the STYLE= option in the ODS HTML statement (see the documentation for the ODS HTML statement in The Complete Guide to the SAS Output Delivery System). The Printer destination uses the style that is called Printer unless you specify an alternative style with the STYLE= option in the ODS PRINTER statement (see the documentation for the ODS PRINTER statement in The Complete Guide to the SAS Output Delivery System).

In most cases, if you want to alter the style of a file that ODS produces, you must make a copy of the style that is used, alter that copy, and store it so that ODS will find it and use it before it finds the style that SAS Institute provides. (For information on this process, see The Complete Guide to the SAS Output Delivery System.)

How Do I Use Styles with Base Procedures?

A procedure uses one or more table definitions to produce output objects. These table definitions include definitions for table elements: columns, headers, and footers. Each table element can specify the use of one or more style elements for various parts of the output.

However, procedures that build reports that are based on information that the user provides do not use the same templates. Two of these procedures, PROC REPORT and PROC TABULATE, provide a way for you to customize the HTML and Printer output directly from the PROC step that creates the report. Information on how to do this is provided with the syntax for these procedures.

What Style Attributes Can Base Procedures Specify?

The following list describes the style attributes that you can specify from the TABULATE and REPORT procedures. Procedures that support the Output Delivery System can format their output for HTML or for a high-resolution printer. Their output is in tabular form. Some of the style attributes apply to the table as a whole; others apply to individual cells in the table. The procedure documentation tells you which style attributes you can set from which statements in the procedure.

Note:   The default value that is used for an attribute depends on the style definition that is in use. For information on viewing the attributes in a style, see What Style Definitions Are Shipped with the Software? . The implementation of an attribute depends on the ODS destination that formats the output. In addition, if you are creating HTML output, the implementation of an attribute depends on the browser that you use.  [cautionend]
Many values for style attributes are one of the following:

'string'
is a quoted character string.

dimension
is a nonnegative number, followed by one of the following units of measure

cm centimeters
in inches
mm millimeters
pt a printer's point
px pixels (based on the size of a pixel on the target device)

Note:   In Version 8 of the SAS System, only the Printer destination supports units of measure on dimensions. However, if you specify CSS in the ODS HTML statement, the HTML destination supports units of measure. The CSS option is experimental in Version 8.  [cautionend]
Default: For the HTML destination, pixels; for the Printer destination, units of 1/150 of an inch

color
is a string that identifies a color. A color can be

Note:   The Output Delivery system first tries to match a color with a SAS/GRAPH color. Thus, although brown and orange are interchangeable in the table, if you use them as unmodified hues, they are different. The reason for this is that ODS treats them like SAS colors, which are mapped to different colors.  [cautionend]

You can also specify hues that are intermediate between two neighboring colors. To do so, combine one of the following adjectives with one of its neighboring colors:
reddish
orangish
brownish
yellowish
greenish
bluish
purplish
For example, you can use the following as hues:
bluish purple (which is the same as purplish blue)
reddish orange
yellowish green
See also: For information on SAS/GRAPH colors, see SAS/GRAPH Software: Reference.

format
is a SAS format or a user-defined format.

reference
is a reference to an attribute that is defined in the current style or in the parent (or beyond). In this case, the value that you use is the name of the style element followed, in parentheses, by the name of an attribute name within that element. For example, suppose that you create a style element called DATACELL that uses the FOREGROUND= and BACKGROUND= style elements this way:
style datacell / background=blue
                 foreground=white;

Later, you can ensure that another style element, NEWCELL, uses the same background color by defining it this way:

style newcell / background=datacell(background);

Similarly, suppose that you create a style element called HIGHLIGHTING that defines three attributes this way:

style highlighting /
   "go"=green
   "caution"=yellow
   "stop"=red;
Later, you can define a style element called MESSAGES that uses the colors that are defined in HIGHLIGHTING:
style messages;
   "note"=highlighting("go")
   "warning"=highlighting("caution")
   "error"=highlighting("stop");
In this way, multiple style elements could use the colors that you define in HIGHLIGHTING. If you decide to change the value of "go" to blue, you simply change its value in the definition of HIGHLIGHTING, and every style element that references highlighting ("go") will use blue instead of green.

Note:   In the first example, the style attribute BACKGROUND= is a predefined style attribute. Therefore, when you reference it, you do not put it in quotation marks. However, in the second example, "go" is a user-defined attribute. You define it with quotation marks, and when you reference it, you must use quotation marks. (This section describes all the predefined style attributes that are available.)  [cautionend]

You can use a special form of reference to get a value for a style attribute from the macro table at the time that the style element is used. For instance, the following STYLE statement uses the current value of the macro variable bkgr for the background color of the style element cell:

style cell / background=symget("bkgr");

font-definition
A value can also be a font definition. A font definition has the following general format:

("font-face-1 <... , font-face-n>", font-size, keyword-list)
If you specify only one font face and if its name does not include a space character, you can omit the quotation marks. If you specify more than one font face, the browser or printer uses the first one that is installed on your system.

font-size specifies the size of the font. font-size can be a dimension or a number without units of measure. If you specify a dimension, you must specify a unit of measure. Without a unit of measure, the number becomes a size that is relative to all other font sizes in the document.

keyword-list specifies the weight, font style, and font width. You can include one value for each, in any order. The following table shows the keywords that you can use:

Keywords for Font Weight Keywords for Font Style Keywords for Font Width (table note 1)
MEDIUM ITALIC NORMAL*
BOLD ROMAN COMPRESSED*
DEMI_BOLD* SLANT EXTRA_COMPRESSED*
EXTRA_BOLD*
NARROW*
LIGHT
WIDE*
DEMI_LIGHT*
EXPANDED*
EXTRA_LIGHT*

TABLE NOTE 1:  *Most fonts do not honor these values. [arrow]

Note:   You can use the value _UNDEF_ for any style attribute. ODS treats an attribute that is set to _UNDEF_ as if its value had never been set, even in the parent or beyond.  [cautionend]

In the list of style attributes that follows, any attribute that is not documented as applying to a particular destination applies to all destinations that support the STYLE= option in the ODS statement that opens the destination. In Version 8 of the SAS System, the two destinations that support STYLE= are the HTML destination and the Printer destination.

ASIS=ON|OFF
specifies how to handle leading spaces, trailing spaces, and line breaks.

ON
prints text with leading spaces, trailing spaces, and line breaks as they are.

OFF
trims leading spaces and trailing spaces. OFF ignores line breaks.

Applies to: cells

BACKGROUND=color
specifies the color of the background.
Tip: Generally, the background color of the cell overrides the background color of the table. You see the background color for the table only as the space between cells (see CELLSPACING= ).
Applies to: tables or cells

BACKGROUNDIMAGE='string'
specifies an image to use as the background. Viewers that can tile the image as the background for the HTML table that the procedure creates will do so. string is the name of a GIF or JPEG file. You can use a simple file name, a complete path, or a URL. However, the most versatile approach is to use a simple filename and to place all image files in the local directory.
Applies to: tables or cells
ODS Destinations: HTML

BORDERCOLOR=color
specifies the color of the border if the border is just one color.
Applies to: tables or cells

BORDERCOLORDARK=color
specifies the darker color to use in a border that uses two colors to create a three-dimensional effect.
Applies to: tables or cells
ODS Destinations: HTML

BORDERCOLORLIGHT=color
specifies the lighter color to use in a border that uses two colors to create a three-dimensional effect.
Applies to: tables or cells
ODS Destinations: HTML

BORDERWIDTH=dimension
specifies the width of the border of the table.
Applies to: tables
Tip: Typically, when BORDERWIDTH=0, the ODS destination sets RULES=NONE (see the discussion of RULES= ) and FRAME=VOID (see the discussion of FRAME= ).

CELLHEIGHT=dimension|integer%
specifies the height of the cell. If you specify a percent, it represents a percentage of the height of the table. A row of cells will have the height of the highest cell in the row.
Tip: HTML automatically sets cell height appropriately. You should seldom need to specify this attribute.
Applies to: cells
ODS Destinations: HTML

CELLPADDING=dimension | integer%
specifies the amount of white space on each of the four sides of the text in a cell.
Applies to: tables

CELLSPACING=dimension
specifies the thickness of the spacing between cells.
Applies to: tables
Interaction: If BORDERWIDTH= is nonzero, and if the background color of the cells contrasts with the background color of the table, the color of the cell spacing is determined by the table's background.

CELLWIDTH=dimension | integer%
specifies the width of the cell. If you specify a percent, it represents a percentage of the width of the table. A column of cells will have the width of the widest cell in the column.
Applies to: cells
Tip: The ODS destination automatically sets cell width appropriately. You should seldom need to specify this attribute.

FLYOVER='string'
specifies the text to show in a tool tip for the cell.
Applies to: cells
ODS Destinations: HTML

FONT=font-definition
specifies a font definition to use. For more information, see the discussion of font definition .
Applies to: cells

FONT_FACE='string-1<... , string-n>'
specifies the font face to use. If you supply more than one string, the browser or printer uses the first one that is installed on your system.

You cannot be sure what fonts are available to someone who is viewing your output in a browser or printing it on a high-resolution printer. Most devices support

Applies to: cells

FONT_SIZE=dimension | size
specifies the size of the font. The value of size is relative to all other font sizes in the document.
Applies to: cells
Range: 1 to 7, for size
Restriction: If you specify a dimension, you must specify a unit of measure. Without a unit of measure, the number becomes a relative size.

FONT_STYLE=ITALIC | ROMAN | SLANT
specifies the style of the font. In many cases, italic and slant map to the same font.
Applies to: cells

FONT_WEIGHT=weight
specifies the font weight. weight can be any of the following:
MEDIUM
BOLD
DEMI_BOLD
EXTRA_BOLD
LIGHT
DEMI_LIGHT
EXTRA_LIGHT
Applies to: cells
Restriction: You cannot be sure what font weights are available to someone who is viewing your output in a browser or printing it on a high-resolution printer. Most devices support only MEDIUM and BOLD, and possibly LIGHT.

FONT_WIDTH=relative-width
specifies the font width compared to the width of the usual design. relative-width can be any of the following:
NORMAL
COMPRESSED
EXTRA_COMPRESSED
NARROW
WIDE
EXPANDED
Applies to: cells
Restriction: Most fonts do not honor these values.

FOREGROUND=color
specifies the color of the foreground, which is primarily the color of text.
Applies to: tables or cells

FRAME=frame-type
specifies the type of frame to use on a table. The following table shows the possible values of frame-type and their meanings.

This value of frame-type Creates this kind of frame around the table
ABOVE a border at the top
BELOW a border at the bottom
BOX borders at the top, bottom, and both sides
HSIDES borders at the top and bottom
LHS a border at the left side
RHS a border at the right side
VOID no borders
VSIDES borders at the left and right sides

Applies to: tables

HREFTARGET=target
specifies the window or frame in which to open the target of the link. target can be

_BLANK
opens the target in a new, blank window. The window has no name.

_PARENT
opens the target in the window from which the current window was opened.

_SEARCH
opens the target in the browser's search pane.
Restriction: Available only in Internet Explorer 5 or later.

_SELF
opens the target in the current window.

_TOP
opens the target in the topmost window.

'name'
opens the target in the specified window or the frame.

Default: _SELF
Applies to: cells
ODS Destinations: HTML

HTMLCLASS='string'
specifies the name of the stylesheet class to use for the table or cell.
Applies to: tables and cells
ODS Destinations: HTML

HTMLID='string'
specifies an id for the table or cell. The id is for use by a Java script.
Applies to: tables and cells
ODS Destinations: HTML

HTMLSTYLE='string'
specifies individual attributes and values for the table or cell.
Applies to: tables and cells
ODS Destinations: HTML

JUST=justification
specifies justification, where justification can be

CENTER
specifies center justification.
Alias: C
Applies to: tables and cells

LEFT
specifies left justification.
Alias: L
Applies to: tables and cells

RIGHT
specifies right justification.
Alias: R
Applies to: tables and cells
Restriction: Not all contexts support RIGHT. If RIGHT is not supported, it is interpreted as CENTER.

NOBREAKSPACE=ON | OFF
specifies how to handle space characters.

ON
does not allow SAS to break a line at a space character.

OFF
allows SAS to break a line at a space character if appropriate.

Applies to: cells

OUTPUTWIDTH=dimension | integer%
specifies the width of the table. If you specify a percent, it represents a percentage of the width of the browser window.
Applies to: tables
Tip: Use OUTPUTWIDTH=100% to make the table as wide as the window that it is open in.
ODS Destinations: HTML

POSTHTML='string'
specifies the HTML code to place after the table or cell.
Applies to: tables or cells
ODS Destinations: HTML

POSTIMAGE='string'
specifies an image to place after the table or cell. string is the name of a GIF or JPEG file. You can use a simple filename, a complete path, or a URL. However, the most versatile approach is to use a simple filename and to place all image files in the local directory.
Applies to: tables or cells
ODS Destinations: HTML

POSTTEXT='string'
specifies text to place after the cell or table.
Applies to: tables or cells

PREHTML='string'
specifies the HTML code to place before the table or cell.
Applies to: tables or cells
ODS Destinations: HTML

PREIMAGE='string'
specifies an image to place before the table or cell. string is the name of a GIF or JPEG file. You can use a simple filename, a complete path, or a URL. However, the most versatile approach is to use a simple filename and to place all image files in the local directory.
Applies to: tables or cells
ODS Destinations: HTML

PRETEXT='string'
specifies text to place before the cell or table.
Applies to: tables or cells

PROTECTSPECIALCHARACTERS=ON | OFF | AUTO
determines how less-than signs (<), greater-than signs (>), and ampersands (&) are interpreted. In HTML, these characters indicate the beginning of a markup tag, the end of a markup tag, and the beginning of the name of a file or character entity.

ON
interprets special characters as the characters themselves. That is, when ON is in effect the characters are protected before they are passed to the HTML destination so that HTML does not interpret them as part of the markup language. Using ON enables you to show HTML markup in your document.

OFF
interprets special characters as HTML code. That is, when OFF is in effect, the characters are passed to the HTML destination without any protection so that HTML interprets them as part of the markup language.

AUTO
interprets any string that starts with a < and ends with a > as HTML (ignoring spaces that immediately precede the <, spaces that immediately follow the >, and spaces at the beginning and end of the string). In any other string, AUTO protects the special characters from their HTML meaning.

Applies to: tables or cells
ODS Destinations: HTML

RULES=rule-type
specifies the types of rules to use in a table. The following table shows the possible values of rule and their meanings.

This value of rule Creates rules in these locations
ALL between all rows and columns
COLS between all columns
GROUP between the table header and the table and between the table and the table footer, if there is one
NONE no rules anywhere
ROWS between all rows

Applies to: tables

TAGATTR='string'
specifies text to insert in the HTML. The string must be valid HTML for the context in which the style element is rendered. Many style elements are rendered between <TD> and </TD> tags. To determine how a style element is rendered, look at the source for the output.
Applies to: cells
ODS Destinations: HTML

URL='uniform-resource-locator'
specifies a URL to link to from the current cell.
Applies to: cells
ODS Destinations: HTML

VJUST='justification'
specifies vertical justification, where justification can be

TOP
specifies top justification.
Alias: T

BOTTOM
specifies bottom justification.
Alias: B

MIDDLE
specifies center justification.
Alias: M

Applies to: cells


RUN-Group Processing
RUN-group processing enables you to submit a PROC step with a RUN statement without ending the procedure. You can continue to use the procedure without issuing another PROC statement. To end the procedure, use a RUN CANCEL or a QUIT statement. Several base SAS procedures support RUN-group processing:
CATALOG DATASETS PLOT PMENU TRANTAB

See the section on the individual procedure for more information.

Note:   PROC SQL executes each query automatically. Neither the RUN nor RUN CANCEL statement has any effect.  [cautionend]


Creating Titles That Contain BY-Group Information
BY-group processing uses a BY statement to process observations that are ordered, grouped, or indexed according to the values of one or more variables. By default, when you use BY-group processing in a procedure step, a BY line identifies each group. This section explains how to create titles that serve as customized BY lines.

Suppressing the Default BY Line

When you insert BY-group processing information into a title, you usually want to eliminate the default BY line. To suppress it, use the SAS system option NOBYLINE.

Note:   You must use the NOBYLINE option if you insert BY-group information into titles for the following base SAS procedures:
MEANS STANDARD SUMMARY.
PRINT
If you use the BY statement with the NOBYLINE option, these procedures always start a new page for each BY group. This behavior prevents multiple BY groups from appearing on a single page and ensures that the information in the titles matches the report on the pages.  [cautionend]

Inserting BY-Group Information into a Title

The general form for inserting BY-group information into a title is

#BY-specification<.suffix>

BY-specification
is one of the following:

BYVALn | BYVAL(BY-variable)
places the value of the specified BY variable in the title. You specify the BY variable with one of the following:

n
is the nth BY variable in the BY statement.

BY-variable
is the name of the BY variable whose value you want to insert in the title.

BYVARn | BYVAR(BY-variable)
places the label or the name (if no label exists) of the specified BY variable in the title. You designate the BY variable with one of the following:

n
is the nth BY variable in the BY statement.

BY-variable
is the name of the BY variable whose name you want to insert in the title.

BYLINE
inserts the complete default BY line into the title.

suffix
supplies text to place immediately after the BY-group information that you insert in the title. No space appears between the BY-group information and the suffix.


Example: Inserting a Value from Each BY Variable into the Title

This example
  1. creates a data set, GROC, that contains data for stores from four regions. Each store has four departments. This data set is created in a DATA step .

  2. sorts the data by Region and Department.

  3. uses the SAS system option NOBYLINE to suppress the BY line that normally appears in output that is produced with BY-group processing.

  4. uses PROC CHART to chart sales by Region and Department. In the first TITLE statement, #BYVAL2 inserts the value of the second BY variable, Department, into the title. In the second TITLE statement, #BYVAL(Region) inserts the value of Region into the title. The first period after Region indicates that a suffix follows. The second period is the suffix.

  5. uses the SAS system option BYLINE to return to the creation of the default BY line with BY-group processing.

data groc; [1]
   input Region $9. Manager $ Department $ Sales;
   datalines;
Southeast    Hayes       Paper       250
Southeast    Hayes       Produce     100
Southeast    Hayes       Canned      120
Southeast    Hayes       Meat         80
...more lines of data...
Northeast    Fuller      Paper       200
Northeast    Fuller      Produce     300
Northeast    Fuller      Canned      420
Northeast    Fuller      Meat        125
;
proc sort data=groc;  [2] 
   by region department;
run;
options nobyline nodate pageno=1 
        linesize=64 pagesize=20;  [3]
proc chart data=groc;  [4] 
   by region department;
   vbar manager / type=sum sumvar=sales;
   title1 'This chart shows #byval2 sales';
   title2 'in the #byval(region)..';
run;
options byline;   [5]

This partial output shows two BY groups with customized BY lines: [HTML Output]  [Listing Output]

Example: Inserting the Name of a BY Variable into a Title

This example inserts the name of a BY variable and the value of a BY variable into the title. The program
  1. uses the SAS system option NOBYLINE to suppress the BY line that normally appears in output that is produced with BY-group processing.

  2. uses PROC CHART to chart sales by Region. In the first TITLE statement, #BYVAR(Region) inserts the name of the variable Region into the title. (If Region had a label, #BYVAR would use the label instead of the name.) The suffix al is appended to the label. In the second TITLE statement, #BYVAL1 inserts the value of the first BY variable, Region, into the title.

  3. uses the SAS system option BYLINE to return to the creation of the default BY line with BY-group processing.

options nobyline nodate pageno=1 
        linesize=64 pagesize=20;  [1]
proc chart data=groc;   [2] 
   by region;
   vbar manager / type=mean sumvar=sales;
   title1 '#byvar(region).al Analysis';
   title2 'for the #byval1';
run;
options byline;  [3]

This partial output shows one BY group with a customized BY line: [HTML Output]  [Listing Output]

Example: Inserting the Complete BY Line into a Title

This example inserts the complete BY line into the title. The program
  1. uses the SAS system option NOBYLINE to suppress the BY line that normally appears in output that is produced with BY-group processing.

  2. uses PROC CHART to chart sales by Region and Department. In the TITLE statement, #BYLINE inserts the complete BY line into the title.

  3. uses the SAS system option BYLINE to return to the creation of the default BY line with BY-group processing.

options nobyline nodate pageno=1 
        linesize=64 pagesize=20;  [1]
proc chart data=groc;  [2]
   by region department;
   vbar manager / type=sum sumvar=sales;
   title 'Information for #byline';
run;
options byline;  [3]

This partial output shows two BY groups with customized BY lines: [HTML Output]  [Listing Output]

Error Processing of BY-Group Specifications

The SAS System does not issue error or warning messages for incorrect #BYVAL, #BYVAR, or #BYLINE specifications. Instead, the text of the item simply becomes part of the title.


Shortcuts for Specifying Lists of Variable Names
Several statements in procedures allow multiple variable names. You can use these shortcut notations instead of specifying each variable name:

Notation Meaning
x1-xn
specifies variables X1 through Xn. The numbers must be consecutive.
x: specifies all variables that begin with the letter X.
x--a specifies all variables between X and A, inclusive. This notation uses the position of the variables in the data set.
x-numeric-a
specifies all numeric variables between X and A, inclusive. This notation uses the position of the variables in the data set.
x-character-a
specifies all character variables between X and A, inclusive. This notation uses the position of the variables in the data set.
_numeric_
specifies all numeric variables.
_character_ specifies all character variables.
_all_ specifies all variables.

Note:   You cannot use shortcuts to list variable names in the INDEX CREATE statement in PROC DATASETS.  [cautionend]

See SAS Language Reference: Concepts for complete documentation.


Formatted Values
Typically, when you print or group variable values, base SAS procedures use the formatted values. This section contains examples of how base procedures use formatted values.

Example: Printing the Formatted Values for a Data Set

The following example prints the formatted values of the data set PROCLIB.PAYROLL. (A DATA step creates this data set.) In PROCLIB.PAYROLL, the variable Jobcode indicates the job and level of the employee. For example, TA1 indicates that the employee is at the beginning level for a ticket agent.

libname proclib 'SAS-data-library';
options nodate pageno=1 
        linesize=64 pagesize=40;
proc print data=proclib.payroll(obs=10) 
           noobs;
   title  'PROCLIB.PAYROLL';
   title2 'First 10 Observations Only';
run;

This is a partial printing of PROCLIB.PAYROLL: [HTML Output]  [Listing Output]

The following PROC FORMAT step creates the format $JOBFMT., which assigns descriptive names for each job:

proc format;
    value $jobfmt 
          'FA1'='Flight Attendant Trainee'
          'FA2'='Junior Flight Attendant'
          'FA3'='Senior Flight Attendant'
          'ME1'='Mechanic Trainee'
          'ME2'='Junior Mechanic'
          'ME3'='Senior Mechanic'
          'PT1'='Pilot Trainee'
          'PT2'='Junior Pilot'
          'PT3'='Senior Pilot'
          'TA1'='Ticket Agent Trainee'
          'TA2'='Junior Ticket Agent'
          'TA3'='Senior Ticket Agent'
          'NA1'='Junior Navigator'
          'NA2'='Senior Navigator'
          'BCK'='Baggage Checker'
          'SCP'='Skycap';
run;

The FORMAT statement in this PROC MEANS step temporarily associates the $JOBFMT. format with the variable Jobcode:

options nodate pageno=1 
        linesize=64 pagesize=60;
proc means data=proclib.payroll mean max;
   class jobcode;
   var salary;
   format jobcode $jobfmt.;
   title 'Summary Statistics for';
   title2 'Each Job Code';
run;

PROC MEANS produces this output, which uses the $JOBFMT. format: [HTML Output]  [Listing Output]

Note:   Because formats are character strings, formats for numeric variables are ignored when the values of the numeric variables are needed for mathematical calculations.  [cautionend]

Example: Grouping or Classifying Formatted Data

If you use a formatted variable to group or classify data, the procedure uses the formatted values. The following example creates and assigns a format, $CODEFMT., that groups the levels of each job code into one category. PROC MEANS calculates statistics based on the groupings of the $CODEFMT. format.
proc format;
    value $codefmt
          'FA1','FA2','FA3'='Flight Attendant'
          'ME1','ME2','ME3'='Mechanic'
          'PT1','PT2','PT3'='Pilot'
          'TA1','TA2','TA3'='Ticket Agent'
                'NA1','NA2'='Navigator'
                      'BCK'='Baggage Checker'
                      'SCP'='Skycap';
run;

options nodate pageno=1 
        linesize=64 pagesize=40;
proc means data=proclib.payroll mean max;
   class jobcode;
   var salary;
   format jobcode $codefmt.;
   title 'Summary Statistics for Job Codes';
   title2 '(Using a Format that Groups the Job Codes)';
run;

PROC MEANS produces this output: [HTML Output]  [Listing Output]

Example: Temporarily Associating a Format with a Variable

If you want to associate a format with a variable temporarily, you can use the FORMAT statement. For example, the following PROC PRINT step associates the DOLLAR8. format with the variable Salary for the duration of this PROC PRINT step only:
options nodate pageno=1 
        linesize=64 pagesize=40;
proc print data=proclib.payroll(obs=10) 
           noobs;
   format salary dollar8.;
   title 'Temporarily Associating a Format';
   title2 'with the Variable Salary';
run;

PROC PRINT produces this output: [HTML Output]  [Listing Output]

Example: Temporarily Dissociating a Format from a Variable

If a variable has a permanent format that you do not want a procedure to use, temporarily dissociate the format from the variable using a FORMAT statement.

In this example, the FORMAT statement in the DATA step permanently associates the $YRFMT. variable with the variable Year. Thus, when you use the variable in a PROC step, the procedure uses the formatted values. The PROC MEANS step, however, contains a FORMAT statement that dissociates the $YRFMT. format from Year for this PROC MEANS step only. PROC MEANS uses the stored value for Year in the output.

proc format;
   value $yrfmt  '1'='Freshman'
                 '2'='Sophomore'
                 '3'='Junior'
                 '4'='Senior';
run;
data debate;
    input Name $ Gender $  Year $  GPA  @@;
    format year $yrfmt.;
    datalines;
Capiccio m 1 3.598 Tucker   m 1 3.901
Bagwell  f 2 3.722 Berry    m 2 3.198
Metcalf  m 2 3.342 Gold     f 3 3.609
Gray     f 3 3.177 Syme     f 3 3.883
Baglione f 4 4.000 Carr     m 4 3.750
Hall     m 4 3.574 Lewis    m 4 3.421
;

options nodate pageno=1 
        linesize=64 pagesize=40;
proc means data=debate mean maxdec=2;
   class year;
   format year;
   title 'Average GPA';
run;

PROC MEANS produces this output, which does not use the YRFMT. format: [HTML Output]  [Listing Output]

Formats and BY-Group Processing

When a procedure processes a data set, it checks to see if a format is assigned to the BY variable. If so, the procedure adds observations to the current BY groups until the formatted value changes. If nonconsecutive internal values of the BY variable(s) have the same formatted value, the values are grouped into different BY groups. This results in two BY groups with the same formatted value. Further, if different and consecutive internal values of the BY variable(s) have the same formatted value, they are included in the same BY group.

Formats and Error Checking

If SAS cannot find a format, it stops processing and prints an error message in the SAS log. You can suppress this behavior with the SAS system option NOFMTERR. When you use NOFMTERR, and SAS cannot find the format, SAS uses a default format and continues to process. Typically, for the default, SAS uses the BESTw. format for numeric variables and the $w. format for character variables.

Note:   To ensure that SAS can find user-written formats, use the SAS system option FMTSEARCH=. How to store formats is described in Storing Informats and Formats .  [cautionend]


Processing All the Data Sets in a Library
You can use the SAS Macro Facility to run the same procedure on every data set in a library. The macro facility is part of base SAS software.

Printing All the Data Sets in a SAS Library shows how to print all the data sets in a library. You can use the same macro definition to perform any procedure on all the data sets in a library. Simply replace the PROC PRINT piece of the program with the appropriate procedure code.


Operating Environment-Specific Procedures
Several base SAS procedures are specific to one operating environment or one release. Operating Environment-Specific Procedures contains a table with additional information. These procedures are described in more detail in the SAS documentation for operating environments.


Statistic Descriptions
Common Descriptive Statistics That Base Procedures Calculate identifies common descriptive statistics that are available in several base procedures. See Keywords and Formulas for more detailed information about available statistics and theoretical information.

Common Descriptive Statistics That Base Procedures Calculate
Statistic Description Procedures
confidence intervals
FREQ, MEANS, UNIVARIATE
CSS corrected sum of squares CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
CV coefficient of variation MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
goodness-of-fit tests
FREQ, UNIVARIATE
KURTOSIS kurtosis MEANS/SUMMARY, UNIVARIATE
MAX largest (maximum) value CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
MEAN mean CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
MEDIAN median (50th percentile) CORR (for nonparametric correlation measures), MEANS/SUMMARY, TABULATE, UNIVARIATE
MIN smallest (minimum) value CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
MODE most frequent value (if not unique, the smallest mode is used) UNIVARIATE
N number of observations on which calculations are based CORR, FREQ, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
NMISS number of missing values FREQ, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
NOBS number of observations MEANS/SUMMARY, UNIVARIATE
PCTN the percentage of a cell or row frequency to a total frequency REPORT, TABULATE
PCTSUM the percentage of a cell or row sum to a total sum REPORT, TABULATE
Pearson correlation
CORR
percentiles
FREQ, MEANS/SUMMARY, TABULATE, UNIVARIATE
RANGE range CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
robust statistics trimmed means, Winsorized means UNIVARIATE
SKEWNESS skewness MEANS/SUMMARY, UNIVARIATE
Spearman correlation
CORR
STD standard deviation CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
STDERR the standard error of the mean MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
SUM sum CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
SUMWGT sum of weights CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
tests of location
UNIVARIATE
USS uncorrected sum of squares CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE
VAR variance CORR, MEANS/SUMMARY, REPORT, SQL, TABULATE, UNIVARIATE


Computational Requirements for Statistics
The following requirements are computational requirements for the statistics that are listed in Common Descriptive Statistics That Base Procedures Calculate . They do not describe recommended sample sizes.

Statistics are reported as missing if they cannot be computed.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.