oldclients.bat
Generated on Tue Dec 05 17:44:03 Eastern Standard Time 2006 from oldclients.bat
@echo off
TITLE OLDCLIENTS.BAT: Create lists of old clients
echo Program : OLDCLIENTS.BAT
echo Purpose : Create lists of old clients
echo Author : Bob Jonkman
echo Date : 13 July 2005
rem Modified : 26 July 2006 - Added alerts for old clients
: begin
if "%1" == "" goto help
if "%1" == "?" goto help
if "%1" == "/h" goto help
if "%1" == "/H" goto help
if "%1" == "-h" goto help
if "%1" == "-H" goto help
set CURRENTRELEASE=6.5.2
if "%1"=="HTMLOnly" goto html
echo Getting list of clients older than Release %CURRENTRELEASE% ...
gawk -f oldclients.awk -f library.awk -v CURRENTRELEASE=%CURRENTRELEASE% %1 > oldclients.csv
echo Getting Frequency of old clients...
gawk -f gwclientid-version-freq.awk -f library.awk oldclients.csv > oldclients-version-freq.csv
echo Getting Old Clients Location Frequency
gawk -f parse-freq.awk -f library.awk -v FIELDNAME="Network Location" oldclients.csv > oldclients-location-freq.csv
echo Getting Old Clients Version-BU Crosstab...
gawk -f xtab.awk -f library.awk -v XFIELDNAME="GroupWise Client Release" -v YFIELDNAME=BU oldclients.csv > oldclients-xtab-bu-version.csv
echo Getting Old Clients PO-Version Crosstab...
gawk -f xtab.awk -f library.awk -v XFIELDNAME="GroupWise Client Release" -v YFIELDNAME=Postoffice oldclients.csv > oldclients-xtab-po-version.csv
echo Copying oldclients*.csv...
copy oldclients*.csv \\cotgw506\sys\apache2\htdocs\stats\
:html
echo Creating HTML file...
gawk -f csv2html.awk -f library.awk -v TITLE="Old GroupWise Client Versions on %date% at %time%" -v LINK=1 oldclients-version-freq.csv oldclients-location-freq.csv oldclients.csv oldclients-xtab*.csv > oldclients.html
echo Publishing HTML file...
copy oldclients.html \\cotgw506\sys\apache2\htdocs\stats\
echo Generate alert on old clients
if exist alert.101 del alert.101
gawk -f library.awk -f alert.awk -v FIELDNAME="GroupWise User ID" -v SUBJECT="GWAlert: Old GW Client" -v TO=gwmon@w01431.corp.example.com oldclients.csv
if exist alert.101 copy alert.101 c:\mercury\queue
if exist alert.101 del alert.101
echo OLDCLIENTS.BAT is done with %1
goto end
:help
:help
echo Usage: %0 filename
echo.
echo The filename is the GWCLIENTIDxxx.CSV file created by GWCLIENTID.BAT (req'd)
:end
rem EOF: OLDCLIENTS.BAT
1 files processed.