Chapter Contents

Previous

Next
SAS Companion for the CMS Environment

Solving Problems under CMS

As you use SAS under the CMS environment, you may encounter many different kinds of problems. The problem may actually be with some component of the operating environment or with computer resources other than SAS. The problem may also be caused by operating environment commands being executed or used incorrectly.


Problems Associated with the CMS Operating Environment

If the problem is related to the operating environment, you will receive messages on the terminal screen. You may need to consult an appropriate IBM manual or your onsite systems staff to determine the problem and how to solve it. Much error message information can be found in the CMS HELP system. For example, if you receive a DMSSCT120S error on your terminal, type HELP DMS120S and you will see an explanation as well as a list of possible causes of the error. Consult the appropriate system manual to determine the source of the problem.


Solving Problems within the SAS System

The following resources are available to help you if you determine that your problem is within SAS.

Examining the SAS Log

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

In the windowing environment, extensive help is available through the SAS online Help. For host-specific features, issue the PMENU command as needed to display SAS menus, then select

Help
[arrow]
SAS System Help
[arrow]
Using SAS With Your Operating Environment
Then select Help topics of interest at increasing levels of detail.

In the HELP BROWSER window, use (by default) the F17 and F18 keys to move to the previous and next Help windows, respectively. Use the F19 and F20 keys to scroll up and down through Help files that exceed the length of the SAS Help window.

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 information in the form of one or more itemstores, which SAS treats as a file system within a file. Each itemstore can contain directories, subdirectories, and individual Help topics.

For information about loading user-defined Help into itemstores, see the next section and ITEMS.

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 user-defined Help will be displayed as it is written, use only the subset of tags from HTML Version 3.2 that is supported on the SAS Help browser. Help information in tags that not supported by the SAS Help browser may be ignored.

HTML Tags Supported by the SAS Help Browser describes the HTML tags that are supported by the SAS Help browser.

Note:   The TABLE tag is the only frequently used tag that is not supported at this time  [cautionend]
To add tables to your Help, use the PRE tag and format the text manually by using blank spaces, vertical bars, dashes, and underscores as needed.

For information about loading your Help into itemstores, see ITEMS.

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 (bulleted) 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 about the options available for these tags, see any reference for HTML Version 3.2.

Online 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 you cannot solve with the information that is 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.

Hardcopy Documentation

Contact your SAS Support Consultant for assistance with ordering hardcopy documentation.

SAS DATA Step Debugger

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

Using SAS Statements and Procedures 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 the PUT statement 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 occurring at strategic places in your program.

Some problems may be data related; these can be very hard 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 examine all or parts of the data in question.


Recovering Memory Resources

During execution, when SAS cannot acquire sufficient memory or disk space to perform the executable tasks, SAS uses a requestor window or a requestor prompt to ask you how you want to handle the situation. The requestor window displays a list of alternatives from which you can select an item to be released. The requestor window redisplays until sufficient resources have been released to allow execution to continue. Alternatively, you can select Continuous cleanup or Do nothing.

Requestor Window Selections

The following list explains the choices that are given in the requestor window plus some other possible selections.

Be prompted to delete files from SAS libraries
allows you to select which SAS files to delete.

Clean up everything
invokes every item that is shown in the requestor window. This selection applies only for the current resource request.

Clear LOG window
erases the contents of the Log window.

Clear OUTPUT window
erases the contents of the Output window.

Clear paste buffers
deletes what is saved in the paste buffers.

Clear PROGRAM EDITOR window
erases the contents of the Program Editor window.

Clear source spooling/DMS recall buffers
erases the recall buffers.

Continuous cleanup
tells SAS to perform automatic continuous cleanup. The SAS System will perform cleanup as much as possible and subsequently not display the requestor window for an out-of-memory condition. This selection applies for the remainder of the SAS session. If you want SAS to always perform automatic continuous cleanup, specify the CLEANUP system option when you invoke SAS.

Deassign inactive librefs
allows you to select which librefs to deassign.

Delete definitions of all SAS macros and macro variables
deletes all macro definitions and variables.

Do nothing
tells SAS to do nothing and allow the resource request to fail. This selection applies only for the current resource request.

You can select this option at any time. If you have tried all the other selections and still cannot recover enough resources, you should select `Do nothing' or `Continuous cleanup'.

Execute X command
puts your SAS session into CMS subset mode. This enables you to erase files to free disk space or release accessed disks to make more memory available. Be careful not to erase temporary SAS files.

Free windows
removes enough windows to get enough space to continue.

Halt data step/proc
tells SAS to stop the current step.

More items to cleanup
means that there are more items to clean up than can be displayed in this window. Select this item to see the additional list.

Terminate SAS
aborts SAS. SAS files that are currently being modified are marked as damaged. The next time you use the file, you will receive a message that SAS is recovering as much data as possible from the file.

A requestor window always displays for a disk-full condition during an interactive session.

If your cleanup selection does not satisfy the immediate need, a second message is displayed in the requestor window:

NOT ENOUGH resource WAS CLEANED UP. PLEASE TRY AGAIN.

To determine whether sufficient resources can be recovered so that SAS can continue in a normal fashion, select 'Clean up everything'. If the requestor window returns the TRY AGAIN message, the situation is much more serious. If you have other files that can be erased to free disk space or disks that can be released to make more memory available, select the 'Execute X command' item.

If this last step does not solve the problem, select the `Do nothing' or `Continuous cleanup' item and tell SAS to stop pursuing the problem.

From the requestor window you can stop execution of SAS by selecting the 'Terminate SAS' item.

CAUTION:
This method of stopping SAS may cause a SAS file to lose the data that was last added or modified.   [cautionend]

Using the CLEANUP System Option

The default value for the CLEANUP system option is CLEANUP. When CLEANUP is in effect, SAS performs automatic continuous cleanup, and you are shown a requestor window or a requestor prompt only for a disk-full condition.

The NOCLEANUP option displays requestor windows during resource constrained situations if there is a terminal attached. However, the requestor windows do not display while SAS is running on a CMS batch machine or a disconnected virtual machine. When a resource-critical situation arises, SAS performs automatic continuous cleanup. If insufficient resources are recovered, SAS responds as if you had specified the CLEANUP system option.


Chapter Contents

Previous

Next

Top of Page

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