<%@ LANGUAGE="VBScript" %> <% cmonth=CStr(request("cmonth")) user_name=CStr(Trim(request("user_name"))) Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLStmt = " select to_char(to_date('" & cmonth & "','YYYYMM'),'Month YYYY') fmonth from dual" Set RS = Connection.Execute(SQLStmt) fmonth=CStr(RS("fmonth")) Set RS=nothing SQLStmt = " select jobid,to_char(start_time,'MM/DD/YYYY HH24:MI:SS') s_time, " SQLStmt = SQLStmt & " to_char(end_time,'MM/DD/YYYY HH24:MI:SS') e_time, " SQLStmt = SQLStmt & " to_char(duration,'99990.9') elapsed from phoffline.crs_job_info " SQLStmt = SQLStmt & " where start_time between to_date('" & cmonth & "','YYYYMM') " SQLStmt = SQLStmt & " and add_months(to_date('" & cmonth & "','YYYYMM'),1) " SQLStmt = SQLStmt & " and user_name='" & user_name & "' " SQLStmt = SQLStmt & " order by start_time " Set RS = Connection.Execute(SQLStmt) %> CSR Monthly Usage

CRS Usage by <%=user_name%> during <%=fmonth%>

<% Do While Not RS.EOF %> <% RS.MoveNext Loop %>
Job ID Start Time End Time Elapsed Hours
<%=RS("jobid")%> <%=RS("s_time")%> <% If Not IsNull(RS("e_time")) Then response.write(RS("e_time")) Else response.write("N/A") End If %> <% If Not IsNull(RS("elapsed")) Then response.write(RS("elapsed")) Else response.write("N/A") End If %>
<% Set RS=nothing Connection.Close Set Connection=nothing %>