SAS 9.1.3 Integration Technologies » Developer's Guide

SAS Stored Processes
Software Requirements
Creating Stored Processes
Input Parameters
Result Types
Reserved Macro Variables
Stored Process Server Functions
Converting SAS/IntrNet Programs
Using Stored Processes
Building a Web Application
SAS Stored Process Web Application
HTTP Headers
Embedding Graphics
Chaining Stored Processes
Using Sessions
IOM Direct Interface Stored Processes
SAS Stored Processes

Debugging in the SAS Stored Process Web Application

After the SAS Stored Process Web Application has been installed, it can be tested by invoking it directly from a Web browser. To execute the SAS Stored Process Web Application, enter the Web application URL in the Web browser, and either the default Welcome page or static version data gets returned.

For example, if the SAS Stored Process Web Application URL entered is

then you either get the data from the Welcome.htm page if it has been installed, or a display similar to

   Stored Process Web Application

   Version 9.1 (Build 286)     

If an error is returned, then the installation was not completed successfully or the URL that was entered is incorrect.

The reserved macro variable _DEBUG provides you with several diagnostic options. Using this variable is a convenient way to debug a problem, because you can supply the debug values by using the Web browser to modify your HTML or by editing the URL in your browser location field. For example, to see the installed environment for the SAS Stored Process Web Application, the URL can be entered with _DEBUG=ENV appended. A table is returned, which contains the system values for the SAS Stored Process Web Application environment.

List of Valid Debug Keywords

You can activate the various debugging options by passing the _DEBUG variable to the SAS Stored Process Web Application. Keywords are used to set the debug options. Multiple keywords can be specified separated by commas or spaces. For instance,


Some debug flags might be locked out at your site for security reasons. Verify with your administrator which flags are locked out at your site. The following chart is a list of valid debug keywords:

Keyword Description
FIELDS Displays the stored process input parameters.
TIME Returns the processing time for the stored process.
DUMP Displays output in hexadecimal.
LOG Returns the SAS log file. This is useful for diagnosing problems in the SAS code.
TRACE Traces execution of the stored process. This is helpful for diagnosing the SAS Stored Process Web Application communication process. You can also use this option to see the HTTP headers that the server returns.
LIST Lists known stored processes.
ENV Displays the SAS Stored Process Web Application environment parameters.

Some debug options, such as showing the SAS log, showing the stored process execution time, and tracing stored process execution, are available from the Execution Options page of the SAS Stored Process Web Application.

Setting the Default Value of _DEBUG

Web application initialization parameters can be used to set default values for the _DEBUG parameter or to limit the allowable values. Any of the valid keywords listed in the previous table can be specified as a comma-separated list for the Debug initialization parameter. These values become the default debug values for each request. The initialization parameter DebugMask can be used to specify a list of _DEBUG values that are disallowed. Refer to the section about Web Application Configuration for more information about initialization parameters.