Chapter Contents

Previous

Next
SAS Companion for the OS/390 Environment

Solving Problems under OS/390

As you use the SAS System under OS/390, you might encounter many different kinds of problems. Problems might occur within the context of your SAS program, or they might be with some component of the operating environment or with computer resources rather than with the SAS System. For example, problems might be related to job control language or to a TSO command.


Problems Associated with the OS/390 Operating Environment

If a problem is detected by the operating environment, you get messages from the operating environment in the job log or on the terminal screen (rather than in the SAS log). In this case, you might need to consult an appropriate IBM manual or your on-site systems staff to determine what the problem is and how to solve it.

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:

CSVxxxx
OS/390 load module management routines

ICExxxxx
IBM sort utility

ICHxxxx
RACF system-security component of OS/390

IDCxxxxx
catalog-management component of OS/390

IECxxxxx
OS/390 data-management routines

IKJxxxx
TSO terminal monitor program (TMP)

WERxxxxx
SYNCSORT program

Consult the appropriate system manual to determine the source of the problem.


Solving Problems within the SAS System

Several resources are available to help you if you determine that your problem is within the SAS System. These resources are discussed in the following sections.

Examining the SAS Log

The primary source of information for solving problems that occur within the SAS System 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.

Using SAS Online Help

Extensive help is available through the SAS online help facility. To obtain host-specific help, execute the PMENU command as necessary to display SAS menus, then select

Help
[arrow]
SAS System Help
[arrow]
Using SAS with your operating environment
Then select topics of interest at increasing levels of detail.

Issue the KEYS command to determine the function keys used to page up, down, left, and right through help pages, and to move backward and forward between help topics.

The FIND command allows you to search for text strings within the currently displayed help topic. For help on FIND and other commands, select:

Help
[arrow]
SAS System Help
[arrow]
Working in the SAS Workspace
[arrow]
Using Base SAS Software
[arrow]
Command Reference

Using User-Defined Help

Your site may provide user-defined help that provides site-specific information via the standard SAS help browser. To access user-defined help via the SAS help browser, you need to allocate a user-defined help library at SAS invocation.

The user-defined help library contains help information in the form of one or more itemstores, which utilize a file format that allows SAS to treat the itemstore as a file system within a file. Each itemstore can contain directories, subdirectories, and individual help topics. For information on loading user-defined help into itemstores, refer to ITEMS.

Help for the SAS System is contained in itemstores. SAS automatically allocates libraries for SAS System help at SAS invocation. To invoke SAS so that it recognizes user-defined help, follow these steps:

  1. In an autoexec file, allocate the SAS library that will contain the user-defined itemstore(s) using the LIBNAME statement. For example, if the libref is to be MYHELP and the itemstore is named APPL.HELP.DATA, the LIBNAME statement in the SAS invocation would be
    libname myhelp 'appl.help.data' disp=shr;

    See Autoexec Files and LIBNAME for details.

  2. Concatenate your itemstore(s) to the SAS System help itemstore named by the HELPLOC= system option at SAS invocation. For example, if the libref for your user-defined help was MYHELP, and if the itemstore in the libref was named PRGAHELP, then the HELPLOC= specification in the SAS invocation would be as follows:
    helploc='myhelp.prgahelp'

    See SAS Language Reference: Dictionary for details on the HELPLOC= system option.

User-defined help cannot be added to the SAS System help itemstore because the SAS help library is available for read access only for most users.

After SAS has been invoked so that it can recognize user-defined help, you can access that help with the standard SAS help browser by issuing the HELP command and specifying the appropriate universal resource locator (URL). For example, if the help topic that you wish to display is named DIRAHLP1.HTM, and if that help topic is contained in an itemstore directory named PRGADIRA, the HELP command would be as follows:

help helploc://prgadira/dirahlp1.htm

See the next section for information on developing user-defined help for the SAS help browser.

Developing User-Defined Help

You can develop help for your site or for your SAS programs that can be displayed in the standard SAS help browser. To ensure that your the user-defined help will be displayed as it is written, use only the subset of tags from HTML that are supported on the SAS help browser. Help information in tags that are not supported by the SAS help browser may be ignored by the SAS help browser.

The following table describes the HTML tags supported by the SAS help browser. In short, the TABLE tag is the only frequently used tag that is not supported at this time. To add tables to your help, use the PRE tag and format the text manually using blank spaces, vertical bars, dashes, and underscores as needed.

HTML Tags Supported by the SAS Help Browser
Tag Type Tag Names Description
heading H1, H2, H3, H4, H5, H6 for hierarchical section headings
paragraph P for text in the body of a help file
list UL, OL, DIR, MENU for unordered (bullet) lists, ordered (numbered) lists, directory (unordered, no bullets) lists, and menu (unordered) lists
definition list DL, DT, DD for definition list, title of item and definition of item
preformatted text PRE, XMP, LISTING for tables, which must be manually formatted with blank spaces
font specification I, B, U for italic, bold, and underlined text
phrase EM, STRONG, DFN, CODE, SAMP, KBD, VAR, CITE for emphasis, strong emphasis, definitions, code examples, code samples, keyboard key names, variables, citations
link A, LINK for anchors and the links that reference those anchors
document TITLE, BASE, HEAD, HTML for titles in the browser, base URLs, heading sections at the top of a page

For information on the options available for these tags, see any reference for HTML Version 3.2.

For information on loading your help into itemstores, see ITEMS.

Using the SAS Documentation CD-ROM

The CD-ROM that is supplied with SAS software contains most of the documentation for base SAS, including SAS Language Reference: Dictionary and other titles. If you encounter a problem that cannot be solved based on the information provided in the SAS log or in SAS online help, load the CD-ROM disk into a CD-ROM reader and browse through the contents of the books contained therein.

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 on the DATA step debugger, see the SAS Language Reference: Dictionary.

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 may 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 actually 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 on 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

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.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.