PROC Step

From sasCommunity
(Redirected from Procedure)
Jump to: navigation, search

The PROC Step or Procedure Step processes one (or more) data set(s) in some way to produce a result. This step is one of two types of SAS program steps, the other being a DATA Step, both are fundamental components of the SAS Language.

Syntax

PROC statement;

Zero or more statements that can be used in a procedure, this varies depending on the procedure.;

QUIT statement or RUN statement, depending on procedure, or a step boundary is encountered ;


Procedures

See Index (Procedures) for a list.

There are many SAS procedures (or PROC's).

Producing Report Output

One of the major uses of procedures is to produce lists, tables and graphics representations of data that can be included in documents, web pages, or printed reports.

Detail Output

Summary Output

Tabular Output

Statistical Output

Graphical Output

  • CHART
  • GMAP
  • PLOT

Processing data

Another use of procedures is to process data in particular ways. These procedures do not produce report output.

Importing and exporting data

  • CPORT
  • CIMPORT

Maps

Managing datasets

System management

Some procedures are used to manage the SAS system.

Statements that can be used in Procedure steps

Global statements

The following statements are considered global statements that can be used in any procedure. These statements can be used in open code or DATA steps as well.

For source code documentation:

For output reporting control:

For operating environment control:

For SAS LOG formatting:

For including or running SAS source code from another source:

For more information see SAS Language Reference: Dictionary .

Generic statements

Generic statements have the same function in all of the procedures that support them. Although they cannot be used in every procedure, if they can be used then they have the same syntax and operate in the same way.:

Procedure-specific statements

Some statements are used in more than one procedure. The same keyword generally implies that the statement should have a similar conceptual behavior or effect. However the exact functionality, syntax and usage is often procedure specific, so the specific procedure documentation should always be consulted.:

SQL procedure

The SQL procedure implements SQL in SAS. Some of the keywords used in SQL are the same as keywords used by other SAS statements, however the syntax is often very different.

Procedure Step boundary statements

Certain statements mark the end of a procedure step and result in the PROC step being processed and executed.

Note that the RUN statement can also be used to run a procedure, but will not necessarily end the procedure.

See Usage Note 40887: Definition of step boundaries and the difference between a RUN statement and a QUIT statement

See also

Further Reading