Capturing the PROC SQL code that is generated by SAS® Web Report Studio and SAS® Information Map Studio when using version 4.2 or later


Before you begin
The configuration file that you need to modify is on the machine that is hosting either the SAS Pooled Workspace Server or the SAS Workspace Server. (A workspace server is also referred to as a "compute server.") The pooled workspace server is used by default beginning with version 4.2. Your site might have chosen to use the standard workspace server instead. (For information about this choice, see SAS Note 37422.)

Both servers are defined within a SAS Application Server, which is logical container for a set of application server components that execute code. The Application Server is typically named SASApp. If you migrated a previous version of the software, the server might be named SASMain.

 

Generate the log

In order to generate a log that contains the SQL that is generated from SAS Web Report Studio or SAS Information Map Studio, complete these steps:

1. On the machine that is hosting the server, navigate to the following location, depending on your server and your operating system.

Windows:

sas-config-dir\Lev1\SASApp\PooledWorkspaceServer\
sas-config-dir\Lev1\SASApp\WorkspaceServer\

UNIX:

sas-config-dir/Lev1/SASApp/PooledWorkspaceServer/
sas-config-dir/Lev1/SASApp/WorkspaceServer/

2. Open the sasv9.cfg file in a plain text editor and copy the entire line that begins with -logconfigloc. Close the file without saving any changes.

3. In the same folder, open the sasv9_usermods.cfg file in a plain text editor.

4. Paste the line that you just copied, and change the name of the XML file from logconfig.xml to logconfig.trace.xml.


Here is an example of the modified option for a pooled workspace server running on Windows:


/* Set options */
-logconfigloc "C:\SAS\EBIserver\Lev1\SASApp\PooledWorkspaceServer\logconfig.trace.xml" 


Here is an example of the modified option for a pooled workspace server running on UNIX:


/* Set options */
-logconfigloc "/usr/local/SAS/EBIserver/Lev1/SASApp/PooledWorkspaceServer/logconfig.trace.xml" 


5. Add the following option to write the settings of the system options to the log.

-verbose 


6. (As requested by SAS Technical Support) Add the following option to record information such as index usage, merge processing, and sort utilities.

-msglevel=i 


7. (As requested by SAS Technical Support) Add the following option to output a list of the host-dependent resources that were used for each step and for the entire SAS session. A datetime stamp is included in the output.

-fullstimer

8. Open the logconfig.trace.xml file and set the level value in the Application message logger section to "Info".

<!-- Application message logger -->
   <logger name="App">
      <level value="Info"/>
   </logger>


CAUTION: Do not set this logging level to DEBUG unless directed to do so by SAS Technical Support. If the logger is set to DEBUG, then the log is too difficult to read for this purpose.

9. Restart the object spawner if you are using a pooled workspace server.

Example of a modified sasv9_usermods.cfg fil

/*
 * sasv9_usermods.cfg
 *
 *   This config file extends options set in sasv9.cfg.  Place your site-specific
 *   options in this file.  Any options included in this file are common across 
 *   all server components in this application server.
 *
 *   Do NOT modify the sasv9.cfg file.
 *
 */

-logconfigloc "C:\SAS\EBI\Lev1\SASApp\PooledWorkspaceServer\logconfig.trace.xml"

-verbose

-msglevel=i

-fullstimer

Log location


The log will be in the following location, depending on your operating system.

Windows:

sas-config-dir\Lev1\SASApp\PooledWorkspaceServer\Logs
sas-config-dir\Lev1\SASApp\WorkspaceServer\Logs

UNIX:

sas-config-dir/Lev1/SASApp/PooledWorkspaceServer/Logs
sas-config-dir/Lev1/SASApp/WorkspaceServer/Logs