#!/usr/local/bin/perl $Script = 'sascgi'; $Version=1.10; # 31 Mar 1997 11:27:35 $ScriptDocURL= 'http://www.math.yorku.ca/SCS/Online/sascgi/'; $ScriptIcon = ''; $ScriptAuthor='Michael Friendly (friendly@yorku.ca)'; # sascgi is a perl script designed to provide a gateway between a web # server and a SAS program which returns results to the browser via # stdout, a listing file, or graphic image(s). The output may be # interpolated into an 'output form', which can be defined for each # application. # The intention is to provide a relatively uncluttered, general # protocfol for running SAS on the web. The script handles most of # the interaction with the web server, making it much easier to # write SAS applications to be run on the web. # The script passes input parameters to the sas program via the # environment, which is much easier than trying to parse server queries # in SAS. # The SAS program is assumed to retrieve these parameters # via %sysget(PARAM), or sysget('PARAM') in a data step. # The SAS program can communicate success or failure (with an error message) # by writing a message to a .err file or by returning a message starting # with 'ERROR:' to stdout. [Not yet implemented] # Usage: # Embed a
...
block inside an HTML document, referencing # this script as follows: #
# # # # # # ... other form elements ... # These define names of parameters/arguments passed to the # SAS program (via setenv). # Multi-valued arguments ( # ########################################################### ### # You'll want to adjust these for your site ### # The title for the output page, unless defined in the input form. TITLE=SAS Results from @SASFILE@ # Author and address are printed at the bottom of the page. These should be all on # one line. If any of these are defined as empty, they will not appear in the # output. AUTHOR_EMAIL=friendly\@yorku.ca AUTHOR=Michael Friendly Email: (@AUTHOR_EMAIL@) ADDRESS=Statistical Consulting Service, York University # Background color of output form. Omit if you don't want to set background color BGCOLOR=white # Get a local copy of the SAS Powered Logo and replace this URL with your # local address. Get the image file from SAS Institute at # http://www2.sas.com/dispatcher/index.html SASPOWEREDLOGO = # Set this non-zero to display the running time in the output SHOW_RUN_TIME=1 # MULTIVALUE_FORMAT determines how multivalue parameters from the input form # are passed in the environment to the SAS program # Set this field to BRACES to pass multivalued parameters as "{a,b,c}". # Set to COMMAS to show multivalued parameters as "a, b, c". # Set to SPACES to pass as "a b c" MULTIVALUE_FORMAT=BRACES ############ # This defines the output form -- the way the output is returned to the browser. # SAS output is interpolated back into what is returned to the browser in the # place of '@OUTPUT@'. A link to the SASLOG is included if the OUTPUT_FORM # contains @HREF_SASLOG@. # Everything from OUTPUT_FORM= # to the dot (.) at the very bottom is the form. OUTPUT_FORM= The following output was produced:
@OUTPUT@
View the saslog: @HREF_SASLOG@ .