<%@ LANGUAGE="VBScript" %> <% rowid=Request("REQ_ROWID") Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLStmtx = "select count(fm.reqdate) NTOT " SQLStmtx = SQLStmtx & " from ASSEMBLY.FEC_MAP_LOG fml,ASSEMBLY.FEC_MAP fm " SQLStmtx = SQLStmtx & " where fm.reqdate=fml.reqdate and fml.rowid='" & rowid & "' " ' response.write(SQLStmtx) Set RSx = Connection.Execute(SQLStmtx) If Not RSx.EOF Then ntot=CLng(RSx("ntot")) Else ntot=0 End If SQLStmt = "select af.REQDATE,af.STARTDATE,af.GEO_MOD,af.SHYBRID_NPOS,af.SWURST_ID,af.FEC_ST_LEN,af.FEC_NUMBER,af.FEC_STRING,nc.NCHAN " SQLStmt = SQLStmt & " from ASSEMBLY.ACTIVE_FECS_PERM af,ASSEMBLY.FEC_MAP_LOG fml, " SQLStmt = SQLStmt & " (select max(fec_number) fec_number,max(fec_string) fec_string,count(FEC_NUMBER) nchan " SQLStmt = SQLStmt & " from ASSEMBLY.FEC_MAP fmt1,ASSEMBLY.FEC_MAP_LOG fml1 " SQLStmt = SQLStmt & " where fmt1.reqdate=fml1.reqdate and fml1.rowid='" & rowid & "' " SQLStmt = SQLStmt & " GROUP BY fmt1.FEC_NUMBER,fmt1.FEC_STRING) nc " SQLStmt = SQLStmt & " where nc.fec_number(+)=af.fec_number and nc.fec_string(+)=af.fec_string " SQLStmt = SQLStmt & " and fml.reqdate=af.reqdate and fml.rowid='" & rowid & "' " SQLStmt = SQLStmt & " ORDER BY af.FEC_NUMBER,af.FEC_STRING " Set RS = Connection.Execute(SQLStmt) ' response.write(SQLStmt) %> Active FEC's <% If Not RS.EOF Then %>

List of active FEC connection valid on <%=RS("REQDATE") %>

Total Map Length Is <%=ntot %>

<% fec_old=-999999 fused=0 ftotal=0 ftotal_fec=0 fec_max=-1 fec_max_len=-10 Do While Not RS.EOF If CInt(RS("FEC_NUMBER"))<>fec_old Then If fec_old<>-999999 Then Response.write("") End If fec_old=CInt(RS("FEC_NUMBER")) If ftotal_fec>fec_max_len Then fec_max_len=ftotal_fec fec_max=fec_old End If ftotal_fec=0 End If If Not IsNull(RS("nchan")) Then nchan=CInt(RS("nchan")) Else nchan=0 End If ftotal=ftotal+nchan ftotal_fec=ftotal_fec+nchan string_length=CInt(RS("fec_st_len")) fused=fused+string_length If nchan<>0 Then fract=string_length/nchan Else fract=0 End If %> <% RS.Movenext Loop If ftotal_fec=>fec_max_len Then fec_max_len=ftotal_fec fec_max=fec_old End If %>

Geometrical Module

Hybrid Position

Wurst ID Module Channels FEC # FEC Port FEC String FEC Channels Used Fraction
******
"><%=RS("GEO_MOD")%> <%=RS("SHYBRID_NPOS")%> <%=RS("SWURST_ID")%> <%=string_length%> <%=RS("FEC_NUMBER")%> <%response.write(round(CInt(RS("FEC_STRING"))/2-0.1,0))%> <%=RS("FEC_STRING")%> <%=nchan%> <%=Round(fract,2)%>

Total number of channels in this map is <%=ntot%> out of which <%=fused%> are connected to modules. This makes the average FEC usage of <%=Round(fused/ntot,2)%>

<% Else %>

No active FEC's defined <% End If Connection.Close %>