SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Debugging and Testing DATA Steps
Testing Your Programs


Character Strings

You can use a PUT statement to specify a character string to identify your message in the log. Note that the text string must be within quotation marks.

        put 'MY NOTE: The condition was met.';

The SAS Log window displays character string.


Data Set Variables

You can use a PUT statement to specify one or more data set variables to be examined for that iteration of the DATA step:

        put 'MY NOTE: invalid value: '
             code type;

The SAS Log window displays specified variable values.

Note that when you specify a data set variable name in the PUT statement, only the value is written to the log. To write both the variable name and the value in the log, specify the variable followed by an equal sign (=) as shown below.
        put 'MY NOTE: invalid value: '
             code= type=;

The SAS Log window displays variable values and names.


back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement