Installation Notes for SASCodeRunner7 Component and Samples

Requirements

Requirements for SASCodeRunner7:

  • Windows (NT, 2000, etc),
  • SAS,
  • Web server (IIS or PWS) - if client is ASP.

Requirements for samples:

  • One or more SAS datasets in the C:\TEMP directory
  • Or sample .asp files can be modified to use another directory containing SAS datasets

Component Installation

  1. The installation and sample files are all contained in the SASCodeRunner7.zip compressed file. Unzip the contents of this file to a temporary directory.
  2. Run Setup.exe and follow the install wizard instructions for installing the SASCodeRunner7 component (DLL). By default it installs in \Program Files\SASCodeRunner7.
  3. Once the installation is complete, open the MTS console (WinNT) or Component Services (Win2000) in Control Panel Admin Tools and create a new empty server package (application) named SASCodeRunner7 that runs as the interactive user. Drill down into the package (application), right click on Components folder and choose New Component. Add the SASCodeRunner7.CodeRunner component to the package (application) by selecting SASCodeRunner7.CodeRunner from the list of components that are already registered.

Sample Installation

Copy the sample files (all .sas and .asp files) to the root directory of your web server (which might be C:\Inetpub\wwwroot) or create a virtual directory for them. There are three sample single-page Active Server Pages (ASP) applications. They should give you an idea of what is possible.

  1. SimpleDemo.asp is the most basic and simply shows off all of the properties and methods, not much like a real-world app.
  2. ProcContents.asp is a little more realistic, but still fairly simple. When pointed at a local SAS library it gives the user the ability to get a web-based proc contents without any SAS coding on the user's part.
  3. Crosstab.asp is slightly more complex in that it gives the user the ability to do a one- or two-way frequency/crosstab of SAS data without any SAS programming required.

Here's the complete list of sample files that should be copied to the web server root directory or to a virtual directory:

  • SimpleDemo.asp
  • SimpleDemo.sas
  • ProcContents.asp
  • ProcContents.sas
  • Crosstab.asp
  • Crosstab.sas

To use the sample apps, navigate in a web browser to the .asp files on the web server (don't treat them like they are local files on c:\inetpub\wwwroot or whatever). So, for example, if you use the root web server directory, the URL for the first page would be http:\\YourServerName\SimpleDemo.asp, where YourServerName is the network name of the web server. For viewing on the server (which by the way could be a workstation running IIS/PWS), you can substitute localhost for YourServerName.

Additional Notes

Once you start making production apps that others will use, I recommend registering the component to run as a specified user (not the interactive user) in MTS/COM+. And if network data (not residing on the web server's hard drive(s)) is needed, the SASCodeRunner7.dll component will need to be registered in MTS/COM+ Services and run under an account that has network access.

How does this thing work? Basically SASCodeRunner7 is a "wrapper" around the process of submitting SAS code in batch mode. I used Visual Basic 6 to make the DLL. The underlying mechanism involves Windows API calls (CreateProcessA, WaitForSingleObject, CloseHandle) to run SAS in synchronous batch mode (i.e., process waits for batch job to finish before moving on).

For details on the properties and methods of SASCodeRunner7, read the SASCodeRunner7.html documentation file.


SASCodeRunner7 was produced in 2002 by David Rubanowice, Group Health Cooperative, Seattle, WA

Hosted by www.Geocities.ws

1