SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 16225: Tips to remove the "Show SAS log" button if a SAS® Stored Process executes with an error

DetailsAboutRate It

When executing a SAS® Stored Process using the SAS Stored Process Web Application, a "Show SAS log" button will appear in the HTML output page, if an error occurs.

When running SAS® 9.2 you can disable the "Show SAS log" button by setting the ShowLogButton Initialization Parameter to false by using the following approach:

  1. Using SAS® Management Console, select:
    Applications Management ► Configuration Manager
  2. Under Configuration Manager select: Stored Process Web App 9.2 ► Properties ► Advanced (tab)
  3. On the Advanced tab click the Add button
  4. In the Define New Property dialog window enter:
    Property Name: ShowLogButton Property Value: false
  5. Stop and restart your Web Application Server to activate the change.

When running SAS® 9.13, there are a couple approaches that can be used if you want to remove the "Show SAS log" button from the output.

One approach is to modify the "web.xml" file and adding a value of "0" for "DebugMask". This will prevent the "Show SAS log" button from being displayed. But, it will also prevent all users from seeing the SAS log even if they specify "_debug=log" when they submit a request.

Another approach is to remove the "Show SAS log" button (and also to customize the error message that is displayed for the user) by adding the below %CHECKCC macro at the end of your SAS Stored Process. Then, if an error occurs, your customized error message will appear in the HTML output (and the "Show SAS log" button will not appear). Below is an example of the %CHECKCC marco:

   /* Add the below code at the bottom of your stored process. */
   /* If an error occurs, then your customized error message   */
   /* will be displayed in the HTML output.                    */
   /* The "Show SAS log" button will not be displayed.         */

   %macro checkcc;
    options obs=max no$syntaxcheck;

    %if (&syscc gt 4) %then %do;
     data _null_;
     file _webout;
     put "<h3>Sorry, your request was not processed successfully.<h3>";
     rc = stpsrvset('program error', 0);
     run;
    %end;

  %let syscc=0;

 %mend checkcc;


 %checkcc;


Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS Integration TechnologiesMicrosoft Windows XP Professional9.1 TS1M3
Microsoft Windows NT Workstation9.1 TS1M3
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3
Microsoft Windows XP 64-bit Edition9.1 TS1M3
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3
Microsoft Windows 2000 Server9.1 TS1M3
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3
Microsoft Windows 2000 Professional9.1 TS1M3
Microsoft Windows 2000 Datacenter Server9.1 TS1M3
Microsoft Windows 2000 Advanced Server9.1 TS1M3
Linux9.1 TS1M3
64-bit Enabled Solaris9.1 TS1M3
z/OS9.1 TS1M3
64-bit Enabled HP-UX9.1 TS1M3
HP-UX IPF9.1 TS1M3
Linux on Itanium9.1 TS1M3
OpenVMS Alpha9.1 TS1M3
64-bit Enabled AIX9.1 TS1M3
Tru64 UNIX9.1 TS1M3
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.