Starting Servers
Initializing UNIX Environment Variables for SAS Workspace ServersIn UNIX environments, many third-party databases require access information such as the default server address to be set as environment variables. To make these environment variables available to a SAS Workspace Server, you must create the workspace using a wrapper script that defines the variables before invoking SAS. The following code is an example script. #!/bin/ksh -p # Purpose: Runs database setup scripts before invoking SAS. # Called by objspawn. # Restore quotation marks around arguments that have multiple tokens. function quoteme { #arg if [[ $# -gt 1 ]]; then quoteme="\"$*\"" else quoteme=$1 fi echo $quoteme } # Run database setup scripts or set required environment # variables here. <script calls or export commands> # Reconstruct and execute the original SAS command. cmd='' for arg in "$@" ; do tmp="$(quoteme $arg)"; cmd="$cmd $tmp" done eval exec $cmd To use this script:
|