02.05.2013 Views

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SAS(R) 9.1.3 Companion for z/OS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

34 Solving Problems within <strong>SAS</strong> Software Chapter 1<br />

Using the <strong>SAS</strong> OnlineDoc CD-ROM<br />

The CD-ROM that is supplied with <strong>SAS</strong> software contains most of the documentation<br />

<strong>for</strong> Base <strong>SAS</strong>, including <strong>SAS</strong> Language Reference: Dictionary and other titles. If you<br />

encounter a problem that cannot be solved based on the in<strong>for</strong>mation provided in the<br />

<strong>SAS</strong> log or in <strong>SAS</strong> online help, load the CD-ROM disk into a CD-ROM reader and<br />

browse through the contents of the books contained therein.<br />

DATA Step Debugger<br />

The DATA step debugger is an interactive tool that helps you find logic errors, and<br />

sometimes data errors, in <strong>SAS</strong> DATA steps. By issuing commands, you can execute<br />

DATA step statements one by one or in groups, pausing at any point to display the<br />

resulting variable values in a window. You can also bypass the execution of one or more<br />

statements. For further in<strong>for</strong>mation on the DATA step debugger, see the <strong>SAS</strong> Language<br />

Reference: Dictionary.<br />

Using <strong>SAS</strong> Statements, Procedures, and System Options to Identify<br />

Problems<br />

If you are having a problem with the logic of your program, there might be no error<br />

messages or warning messages to help you. You might not get the results or output<br />

that you expect. Using PUT statements to write messages to the <strong>SAS</strong> log or to dump<br />

the values of all or some of your variables might help. Using PUT statements enables<br />

you to follow the flow of the problem and to see what is going on at strategic places in<br />

your program.<br />

Some problems might be data related; these can be difficult to trace. Notes that<br />

appear in the <strong>SAS</strong> log following the step that reads and manipulates the data might be<br />

very helpful. These notes provide in<strong>for</strong>mation such as the number of variables and<br />

observations that were created. You can also use the CONTENTS and PRINT<br />

procedures to look at the data definitions as <strong>SAS</strong> recorded them or to actually look at<br />

all or parts of the data in question.<br />

<strong>SAS</strong> system options can also assist with problem resolution. Refer to the <strong>SAS</strong><br />

Language Reference: Dictionary <strong>for</strong> details on the following system options and others<br />

that affect problem resolution:<br />

MLOGIC<br />

controls whether <strong>SAS</strong> traces execution of the macro language processor.<br />

MPRINT<br />

displays <strong>SAS</strong> statements that are generated by macro execution.<br />

SOURCE<br />

controls whether <strong>SAS</strong> writes source statements to the <strong>SAS</strong> log.<br />

SOURCE2<br />

writes secondary source statements from included files to the <strong>SAS</strong> log.<br />

SYMBOLGEN<br />

controls whether the results of resolving macro variable references are written to<br />

the <strong>SAS</strong> log.<br />

Host-System Subgroup Error Messages<br />

See “Messages from the <strong>SAS</strong>CP Command Processor” on page 599 <strong>for</strong> brief<br />

explanations of many of the host-system subgroup error messages that you might<br />

encounter during a <strong>SAS</strong> session.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!