![[QUERY FO SETS]](test3.gif)
PARM DB="MOZART.MAESTRO.CCC" PW=";" FORMAT="gif" TARGETDIR="/APACHE" COMMENT This example will first create the appropriate commandfile COMMENT to create a Database Status Report, and then COMMENT pass the result to Ploticus, and finally COMMENT eliminate the intermediate files. XEQ SH.HPBIN.SYS "-c 'sed s/%DB/!DB/ ./plotquery.tpl > ./plotquery.tmp'" XEQ SH.HPBIN.SYS "-c 'sed s/%PW/\!PW/ ./plotquery.tmp > ./plotquery.cmd'" XEQ SH.HPBIN.SYS "-c 'sed s/%DB/\!DB/ ./TEST3T > ./TEST3'" XEQ SH.HPBIN.SYS "./plotquery.cmd" PURGE ./plotquery.cmd PURGE ./plotquery.tmp PLOTX TEST3,,!FORMAT,!TARGETDIR PURGE !HPCWD/PLOTQFIN PURGE !HPCWD/TEST3 |
echo "B=%DB" > $HPCWD/PLOTQTMP echo "%PW" >> $HPCWD/PLOTQTMP echo 5 >> $HPCWD/PLOTQTMP echo "FO SETS" >> $HPCWD/PLOTQTMP echo EXIT >> $HPCWD/PLOTQTMP callci "RUN QUERY.PUB.SYS;STDLIST=PLOTQRES,NEW" < $HPCWD/PLOTQTMP callci "PRINT $HPCWD/PLOTQRES;START=18" | cut -c4-80 > $HPCWD/PLOTQFIN rm $HPCWD/PLOTQTMP callci "PURGE PLOTQRES,TEMP" > /dev/null |
#proc getdata
command: cat $HPCWD/PLOTQFIN
filter:
##if @@1 = T
##exit
##endif
##declare PCTR
##set PCTR = $arith(@@5*100/@@4)
##set PCTR = $formatfloat(@@PCTR,%3.1f)
@@1 @@2 @@4 @@5 @@PCTR
#proc areadef
title: DataSet Usage in %
rectangle: 1 1 8 5
yautorange: datafield=3 lowfix=0
xscaletype: categories
xcategories: datafield=1
xaxis.stubs: datafields=1 2
xaxis.stubvert: yes
#proc yaxis
label: Records
stubrange: 0
stubs: inc 100
grid: color=green
tics: none
#proc bars
locfield: 1
lenfield: 3
labelfield: 5
color: blue
legendlabel: Capacity
#proc bars
lenfield: 4
locfield: 1
color: red
legendlabel: Records
#proc annotate
location: 2 6.2
box: color=red width=1.0
backcolor: gray(0.8)
text: Database Set Utilization
%DB
#proc annotate
location: 5 6
box: color=black width=1.0
backcolor: gray(0.8)
textdetails: size=18
fromcommand: uname -n ; date '+%Y/%m/%d'
#proc legend
location: min+2 max-0.5
format: multiline
|
Example: TEST3X STRAUS.MAESTRO.CCC,PASSWORD,gif,/SAMBA/PUB/dba/statistics will create TEST3.gif file for the STRAUS database of MAESTRO and put it into a specific web section.