Figure 4


#!/bin/sh

# This script is used to generate graphics out of Scope/iX using
# Ploticus/iX under an Apache/iX server for user SCOPE.SYS
# written by Andreas Schmidt, CSC, Germany
# version 1.0 01.Sep.2000

echo "Content-type: text/html \n"

# QUERY_STRING contains: Report=.1.&Days=.2.&Level=.3.&Format=.4.
# The first awk splits into
#           [1]Report
#           [2].1.&Days
#           [3].2.&Level
#           [4].3.&Format
#           [5].4.
REP_Days=`echo $QUERY_STRING|awk '{split($1,arr,"=");print arr[2]}'`
# This awk splits [2] into .1. and Days
REP=`echo $REP_Days|awk '{split($1,arr,"&");print arr[1]}'`
# and so on ...
DAYS_Level=`echo $QUERY_STRING|awk '{split($1,arr,"=");print arr[3]}'`
DAYS=`echo $DAYS_Level|awk '{split($1,arr,"&");print arr[1]}'`
LEVEL_Format=`echo $QUERY_STRING|awk '{split($1,arr,"=");print arr[4]}'`
LEVEL=`echo $LEVEL_Format|awk '{split($1,arr,"&");print arr[1]}'`
# ... and the final awk generates .4. (the FORMAT)
FORMAT=`echo $QUERY_STRING|awk '{split($1,arr,"=");print arr[5]}'`

# Some other settings
TARGETDIR="/SYS/SCOPPLOT"
PLOTX_CMD=$REP"X"

# This MPE call creates the XFERGSUM used as input data for Ploticus/iX
callci "GLOCISD.SCOPPLOT.SYS $REP,$DAYS,$LEVEL,$FORMAT,$TARGETDIR"

# Now Ploticus/iX is invoked
cd /usr/local/ploticus/bin/
/usr/local/ploticus/bin/pl $TARGETDIR/$PLOTX_CMD -$FORMAT -o
$TARGETDIR/$REP$DAY
S$LEVEL.$FORMAT
cd $TARGETDIR
chmod 600 $REP$DAYS$LEVEL.$FORMAT

# Finally the graph is displayed

# Some Housekeeping in $TARGETDIR
rm I*
rm R*