DESCRIBE Statement

Retrieves source code from a stored compiled DATA step program or a DATA step view.

Valid in:DATA step
Category:Action
Type:Executable
Restrictions:This statement is not supported in a DATA step that runs in CAS.
This statement is not supported for an in-database DATA step. For more information, see DATA Step Acceleration in SAS In-Database Products: User’s Guide.
Use DESCRIBE only with stored compiled DATA step programs and DATA step views.
Requirement:You must specify the PGM= option or the VIEW= option in the DATA statement.

Syntax

DESCRIBE;

Without Arguments

Use the DESCRIBE statement to retrieve program source code from a stored compiled DATA step program or a DATA step view. SAS writes the source statements to the SAS log.

Details

Use the DESCRIBE statement without the EXECUTE statement to retrieve source code from a stored compiled DATA step program or a DATA step view. Use the DESCRIBE statement with the EXECUTE statement to retrieve source code and execute a stored compiled DATA step program. For information about how to use these statements with the DATA statement, see DATA Statement.

Note: To DESCRIBE a password-protected view or DATA step program, you must specify its password. If the view or program was created with more than one password, you must specify the most restrictive password. As with other SAS files, the ALTER password is the most restrictive, and the READ password is the least restrictive. For more information, see Stored, Compiled DATA Step Programs in SAS V9 LIBNAME Engine: Reference and Passwords with Views in SAS Programmer’s Guide: Essentials.

See Also

Last updated: July 23, 2026