%let name=mc2c;
filename odsout '.';

%let mc2path=\\l72586.na.sas.com\public\VAST_2011\MC_2_Core_Data\;

libname mydata "&mc2path";

goptions device=png;

ODS LISTING CLOSE;
ODS HTML path=odsout body="&name..htm" (title='IEEE VAST Challenge 2011 - mini-challenge 2') style=minimal; 
goptions noborder;
goptions cback=white;
goptions gunit=pct htitle=16pt htext=11pt ftitle="arial/bold" ftext="arial";

legend1 label=none shape=bar(.15in,.15in);

axis1 label=none minor=none;
axis2 label=none value=(h=1.5 angle=90);

pattern1 v=s c=cxEE3B3B;  /* red */
pattern2 v=s c=cxFFA812;  /* orange */

goptions xpixels=1000;

/*
title ls=1.5 "Security Logs - all events";
proc gchart data=mydata.security;
format TimeCreated_SystemTime datetime20.;
vbar TimeCreated_SystemTime / type=freq
 midpoints=('13apr2011:15:00:00'dt to '16apr2011:15:00:00'dt by 3600)
 raxis=axis1
 maxis=axis2
 des='' name="&name";
run;
*/

title ls=1.5 "Logon Failures (FailureReason='%%2304')";
proc gchart data=mydata.security (where=(FailureReason='%%2304'));
format TimeCreated_SystemTime datetime20.;
vbar TimeCreated_SystemTime / type=freq
 midpoints=('13apr2011:15:00:00'dt to '16apr2011:15:00:00'dt by 3600)
 subgroup=IpAddress
 raxis=axis1
 maxis=axis2
 des='' name="&name";
run;
proc print data=mydata.security (where=(FailureReason='%%2304') obs=1000);
run;

title ls=1.5 "TargetUserName = ANONYMOUS LOGON";
proc gchart data=mydata.security (where=(TargetUserName='ANONYMOUS LOGON' and IpAddress^=''));
format TimeCreated_SystemTime datetime20.;
vbar TimeCreated_SystemTime / type=freq
 midpoints=('13apr2011:15:00:00'dt to '16apr2011:15:00:00'dt by 3600)
 subgroup=IpAddress
 raxis=axis1
 maxis=axis2
 des='' name="&name";
run;
proc print data=mydata.security (where=(TargetUserName='ANONYMOUS LOGON' and IpAddress^='') obs=1000);
run;

quit;
ODS HTML CLOSE;
ODS LISTING;

