Home

Features

Software

Quick Install

SAS Side

The "Broker"

Config Files

Bugs and Enhancements

Change Log

FAQ

License

CGI2SAS

Config Files


Previous

Next


The following config files are used :-

cgi2sas_mgr.conf The configuration file for the CGI2SAS load manager.
cgi2sas.conf The configuration file for the cgi2sas.py script
logview.conf The configuration file for the log viewer
install.conf The install program configuration file
autoexec.sas The autoexec used to start each session for a service


cgi2sas_mgr.conf – CGI2SAS Load Manager configuration options

[DEFAULT]

sas_config

Optional

Default sas_config option to use in service sections. See [<service-name>]

sas_bin

Optional

Default sas_bin option to use in service sections. See [<service-name>]

unsafe

Optional

Default unsafe option to use in service sections. See [<service-name>]

timeout

Optional

Default timeout option to use in service sections. See [<service-name>]

session_timeout

Optional

Default session_timeout option to use in service sections. See [<service-name>]

log_options

Optional

Default log_options option to use in service sections. See [<service-name>]

sas_options

Optional

Default sas_options option to use in service sections. See [<service-name>]



[<service-name>]

sas_ports

Mandatory

List of port numbers that the SAS sessions should use. (space delimited) The number of ports = the number of SAS sessions started for that service

sas_autoexec

Mandatory

Filename of service autoexec to initialise the service

sas_log

Mandatory

Directory where the logs live

unsafe

Mandatory

Characters to strip from CGI variable values. Typically ";'&%
Double quote
Single Quote
Ampersand
Semi-colon
Percent

timeout

Mandatory

The maximum time in seconds that requests from the web server to the load manager should be kept for.

session_timeout

Mandatory

When should sas sessions be restarted? Values of
never – SAS sessions should never be restarted. Use this value for production.
oneshot – At the end of each transaction the SAS session is terminated. Note: It is automatically restarted by the load manager. This is useful when trying to debug quoting problems etc

log_options

Mandatory

The level of logging for the SAS sessions.The following values are supported currently:-
none – No logging
detail – The SAS Log, _webout and a dump of CGI variables per transaction.

sas_options

Optional

Specific SAS Options to use for each transaction.

tmpdir

Mandatory

Temporary directory where the SAS sessions are started


[globals]

log

Mandatory

Log file for host_mgr.py

loglevel

Optional

Level of debuging info. Default=N
i)info
n)note
w)warning
e)error

sas_interface

Mandatory

interface SAS session binds to.

cgi2sas_interface

Mandatory

Interface for the Load manager

cgi2sas_port

Mandatory

Port for the Load Manager

cgi2sas_lib

Mandatory

root folder where CGI2SAS installed

cgi2sas_debug

Mandatory

User level debugging

admin

Mandatory

Free format text

admail

Mandatory

Email address of the administrator


cgi2sas.conf

This file should be installed in the same directory as cgi2sas.py.

[globals]

_service

Optional

Optional default service to use if none specified on the CGI Scipt

pybin

Optional

Location of python binary (required for –compile)



[<host-name>]

port

Mandatory

TCP/IP port number threadmgr bound to. [globals] port

server

Mandatory

TCP/IP address threadmgr bound to [globals] interface

services

Mandatory

List of services available on host, seperated by commas

rename_services

Optional

Comma seperated list of service name pairs to rename. Each service name pair is of the format service_name:new_service. See Broker section for details



logview.conf

[globals]

cache

Mandatory

Temporary directory where cached log files are held

port

Mandatory

Port to bind to

interface

Mandatory

Interface to bind to

cgi2sas_mgr

Mandatory

Pathname to cgi2sas_mgr.conf

log_freq

Mandatory

No of seconds to wait between scans of log directories

update_freq

Mandatory

No of seconds to redisplay service index page. If 0 (zero) is specified then the index page will not be refreshed automatically



install.conf

[globals]

sas_bin

Mandatory

Full path name to SAS binary (executable)

sas_cfg

Mandatory

Full path to the SAS config file

install_dir

Mandatory

Directory to install CGI2SAS into. This directory must not exist prior to installation

win32_service_log_dir

Mandatory

Directory for Win32 service logs



autoexec.sas
The autoexec is run by each session for a service when the service is initially started. Be careful if the autoexec writes to any shared libraries.

The autoexec contains your code to  allocate libnames / filenames and perform any initialisation required for each session.

Note: CGI scripts can only be executed from "authorised" libraries. To authorise a library (.source & .scl) or a filename (.sas) call the %auth macro. See example below :-

Example:-

filename mycode "c:\mycode";
libname mycats "c:\mycats";
%auth(filename=mycode);
%auth(libname=mycats);