<%@ LANGUAGE="VBScript" %> <% timedate=Request("timedate") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd If Not IsEmpty(request.form("Latest")) Then timedate="" End If If timedate="" Then SQLStmtX = " select to_char(sysdate,'MM/DD/YYYY HH24:MI:SS') timedate from dual " Set RSX = Connection.Execute(SQLStmtX) timedate = CStr(RSX("timedate")) End If ' response.write(SQLStmtX) If Not IsDate(timedate) Then message="Wrong Time/Date format " & timedate %> <% End If timedate_par=replace(timedate," ","%20") %> Test scalers

               

Trigger scalers

<% SQLStmt = " select to_char(ft.logdate,'MM/DD hh24:mi:ss') ddate,ft.fec_number,ft.fec_port,gm.geo_mod, " SQLStmt = SQLStmt & " 24*60*(to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')-ft.logdate) ddif, " SQLStmt = SQLStmt & " to_char(1.95*(ascii(fec_vbc)-127),999.0) Vbc, " SQLStmt = SQLStmt & " to_char(0.195*(ascii(fec_temp)+128),99.0) Temp, " SQLStmt = SQLStmt & " to_char(19.5*(ascii(fec_Outbias)-127),9999.0) Outbias, " SQLStmt = SQLStmt & " to_char(19.5*(ascii(fec_IBC)-127),9999.0) Ibc, " SQLStmt = SQLStmt & " to_char(19.5*(ascii(fec_PREBIAS)-127),9999.0) Prebias, " SQLStmt = SQLStmt & " to_char(19.5*(ascii(fec_SHABIAS)-127),9999.0) Shabias, " SQLStmt = SQLStmt & " to_char(19.5*(ascii(fec_VFP)-127),9999.0) Vfp, " SQLStmt = SQLStmt & " to_char(19.5*(ascii(fec_VFS)-127),9999.0) Vfs " SQLStmt = SQLStmt & " from phoffline.fec_monitoring ft, " SQLStmt = SQLStmt & " (select max(logdate) logdate,max(fec_number) fec_number,max(fec_port) fec_port " SQLStmt = SQLStmt & " from phoffline.fec_monitoring " SQLStmt = SQLStmt & " where logdate between to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')-0.1 and to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')" SQLStmt = SQLStmt & " group by fec_number,fec_port) pt, " SQLStmt = SQLStmt & " (select distinct afp.fec_number,ms.fec_port,afp.geo_mod from assembly.active_fecs_perm afp, " SQLStmt = SQLStmt & " (select max(reqdate) reqdate,max(fec_number) fec_number,max(fec_port) fec_port from assembly.fec_map_log fml, " SQLStmt = SQLStmt & " (select max(logdate) logdate,max(fec_number) fec_number,max(fec_port) fec_port " SQLStmt = SQLStmt & " from phoffline.fec_monitoring where logdate between to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS')-0.1 and to_date('" & timedate & "','MM/DD/YYYY HH24:MI:SS') " SQLStmt = SQLStmt & " group by fec_number,fec_port) pt " SQLStmt = SQLStmt & " where pt.logdate>fml.reqdate " SQLStmt = SQLStmt & " group by pt.fec_number,pt.fec_port) ms " SQLStmt = SQLStmt & " where afp.reqdate=ms.reqdate and afp.fec_number=ms.fec_number " SQLStmt = SQLStmt & " and round((afp.fec_string-0.01)/2,0)=ms.fec_port) gm " SQLStmt = SQLStmt & " where ft.logdate=pt.logdate " SQLStmt = SQLStmt & " and ft.fec_number=pt.fec_number " SQLStmt = SQLStmt & " and ft.fec_port=pt.fec_port " SQLStmt = SQLStmt & " and gm.fec_number(+)=ft.fec_number " SQLStmt = SQLStmt & " and gm.fec_port(+)=ft.fec_port " SQLStmt = SQLStmt & " order by ft.fec_number,ft.fec_port " Set RS = Connection.Execute(SQLStmt) ' response.write(SQLStmt) %>
<% Do While Not RS.EOF If Not IsNull(RS("geo_mod")) Then geo_mod=CStr(RS("geo_mod")) link="" & CStr(geo_mod) & "" Else geo_mod="N/C" link=CStr(geo_mod) End If %> <% RS.Movenext Loop %>
FEC# Port# Module(*) Graph Last DB write Vbc Ibc Temp Shabias Outbias Prebias Vfs Vfp
<%=RS("fec_number")%> <%=RS("fec_port")%> <%=link%>

&fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECgraph',.6,.9,'yes',0.7,0.5)">Graph

<% If CDbl(RS("ddif"))" & CStr(RS("ddate")) & "") Else Response.write("" & CStr(RS("ddate")) & "") End If %> &fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECMVbc',.3,.4,'no',0.16,0.2)"><%=RS("Vbc")%> &fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECMIbc',.3,.4,'no',0.16,0.4)"><%=RS("Ibc")%> &fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECMTemperature',.3,.4,'no',0.16,0.6)"><%=RS("Temp")%> &fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECMShabias',.3,.4,'no',0.16,0.8)"><%=RS("Shabias")%> &fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECMOutbias',.3,.4,'no',0.26,0.2)"><%=RS("Outbias")%> &fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECMPrebias',.3,.4,'no',0.26,.4)"><%=RS("Prebias")%> &fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECMVfs',.3,.4,'no',0.26,.6)"><%=RS("Vfs")%> &fec_port=<%=RS("fec_port")%>&days=2" onClick="openWindow(this,'FECMVfp',.3,.4,'no',0.26,.8)"><%=RS("Vfp")%>
<% Connection.Close Set RS=nothing Set Connection=nothing %>