Initializing and Configuring SAS Software |
Overview of Solving Problems under z/OS |
As you use SAS software under z/OS, you might encounter many different types of problems. Problems might occur within your SAS program, or they might be with some component of the operating environment or with computer resources rather than with SAS software. For example, problems might be related to job control language or to a TSO command.
Problems Associated with the z/OS Operating Environment |
If a problem is detected by the operating environment, it sends messages to the job log or to the terminal screen (not the SAS log). In this case, you might need to consult an appropriate IBM manual or your on-site systems staff to determine the problem and the solution.
Most error messages indicate which part of the operating environment is detecting the problem. Here are some of the most common message groups, along with the operating environment component or utility that issues them:
IBM Hierarchical Storage Manager
IBM UNIX System Services
IBM Language Environment (LE)
IBM UNIX System Services Shell and Utilities
IBM JCL Interpreter
SAS/C Run-time Library
Consult the appropriate system manual to determine the source of the problem.
Several resources are available to help you if you determine that your problem is within SAS software. These resources are discussed in the following sections.
The primary source of information for solving problems that occur within SAS software is the SAS log. The log lists the SAS source statements along with notes about each step, warning messages, and error messages. Errors are flagged in the code, and a numbered error message is printed in the log. It is often easy to find the incorrect step or statement just by glancing at the SAS log.
Note: Some errors require that diagnostic messages are written before the SAS log is opened or after it is closed. Such messages are written to the SASCLOG data set. Under TSO, SASCLOG is normally allocated to the terminal. Occasionally, operating system error messages might be issued during execution of a SAS program. These messages appear in the job log or, under TSO, on the terminal.
Upon exit, SAS returns a condition code to the operating environment that indicates its completion status. The condition code is translated to a return code that is meaningful to the operating environment. SAS issues the condition codes in the following table:
Return Code | Meaning |
---|---|
0 | Successful completion |
4 | WARNING messages issued |
8 | Nonfatal ERROR messages issued |
12 | Fatal ERROR messages issued |
16 | ABORT; executed |
20 | ABORT RETURN; executed |
ABND | ABORT ABEND; executed |
The DATA step debugger is an interactive tool that helps you find logic errors, and sometimes data errors, in SAS DATA steps. By issuing commands, you can execute DATA step statements one by one or in groups, pausing at any point to display the resulting variable values in a window. You can also bypass the execution of one or more statements. For further information about the DATA step debugger, see the SAS Language Reference: Dictionary.
If you are having a problem with the logic of your program, there might be no error messages or warning messages to help you. You might not get the results or output that you expect. Using PUT statements to write messages to the SAS log or to dump the values of all or some of your variables might help. Using PUT statements enables you to follow the flow of the problem and to see what is going on at strategic places in your program.
Some problems might be data related; these can be difficult to trace. Notes that appear in the SAS log following the step that reads and manipulates the data might be very helpful. These notes provide information such as the number of variables and observations that were created. You can also use the CONTENTS and PRINT procedures to look at the data definitions as SAS recorded them or to look at all or parts of the data in question.
SAS system options can also assist with problem resolution. Refer to the SAS Language Reference: Dictionary for details about the following system options and others that affect problem resolution:
controls whether SAS traces execution of the macro language processor.
displays SAS statements that are generated by macro execution.
controls whether SAS writes source statements to the SAS log.
writes secondary source statements from included files to the SAS log.
controls whether the results of resolving macro variable references are written to the SAS log.
See Messages from the SASCP Command Processor for brief explanations of many of the host-system subgroup error messages that you might encounter during a SAS session.
The z/OS system log can also contain useful information that might assist you with diagnosing a problem with SAS. Consult your system administrator for assistance with viewing the system log.
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.