Solving Problems under z/OS

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:
ARC
IBM Hierarchical Storage Manager
BPX
IBM UNIX System Services
CEE
IBM Language Environment (LE)
CSVxxxx
z/OS load module management routines
FSUM
IBM UNIX System Services Shell and Utilities
ICExxxxx
IBM sort utility
ICHxxxx
RACF system-security component of z/OS
IDCxxxxx
catalog-management component of z/OS
IECxxxxx
z/OS data-management routines
IEF
IBM JCL Interpreter
IKJxxxx
TSO terminal monitor program (TMP) and other TSO components
LSC
SAS/C Run Time Library
WERxxxxx
SYNCSORT program
Consult the appropriate system manual to determine the source of the problem.

Solving Problems within SAS Software

Overview of Solving Problems within SAS Software

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.

Examining the SAS Log

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.

Checking the Condition Code

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:
z/OS Condition Codes
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

DATA Step Debugger

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 Base SAS Utilities: Reference.

Using SAS Statements, Procedures, and System Options to Identify Problems

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. See the SAS System Options: Reference for more information about the following system options and others that affect problem resolution:
MLOGIC
controls whether SAS traces execution of the macro language processor.
MPRINT
displays SAS statements that are generated by macro execution.
SOURCE
controls whether SAS writes source statements to the SAS log.
SOURCE2
writes secondary source statements from included files to the SAS log.
SYMBOLGEN
controls whether the results of resolving macro variable references are written to the SAS log.

Host-System Subgroup Error Messages

For brief explanations of many of the host-system subgroup error messages that you might encounter during a SAS session, see Messages from the SASCP Command Processor.
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.