Full Connection Map Text
<%
Dim fso, DataFile
ndate=CStr(Request("ndate"))
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Mode = adModeRead
Connection.Open phdb_rd
SQLStmtx = "select count(fm.reqdate) nchannels,to_char(max(fml.reqdate),'mm/dd/yyyy hh24:mi:ss') reqdate, "
SQLStmtx = SQLStmtx & " to_char(max(fml.crdate),'mm/dd/yyyy hh24:mi:ss') crdate "
SQLStmtx = SQLStmtx & " from ASSEMBLY.FEC_MAP fm ,ASSEMBLY.FEC_MAP_LOG fml "
SQLStmtx = SQLStmtx & " where fm.reqdate=fml.reqdate and fml.reqdate=to_date('" & ndate & "','YYYYMMDDHH24MISS') "
' response.write(SQLStmtx & " " & vbCrLf)
Set RSx = Connection.Execute(SQLStmtx)
'
' check how many channels are in the map, do not allow file larger than 10,000 channels
'
channels=CDbl(RSx("nchannels"))
nchannels=CStr(RSx("NCHANNELS"))
If channels<10000 Then
SQLStmty = "select to_char(SYSDATE,'mm/dd/yyyy hh24:mi:ss') ssdd from dual "
' response.write(SQLStmty & " " & vbCrLf)
Set RSy = Connection.Execute(SQLStmty)
SQLStmt = "select fm.GEO_SENSOR,fm.SENSOR_TYPE,fm.FEC_NUMBER,fm.FEC_STRING,fm.CHAN,fm.SENSOR_ROW,fm.SENSOR_COLUMN, "
SQLStmt = SQLStmt & " fm.BONDING_PATTERN,fm.PAD,fm.CHIP_NUMBER,fm.CHIP_TYPE, "
SQLStmt = SQLStmt & " to_char(fml.REQDATE,'mm/dd/yyyy hh24:mi:ss') reqdate,"
SQLStmt = SQLStmt & " to_char(SYSDATE,'mm/dd/yyyy hh24:mi:ss') ssdd"
SQLStmt = SQLStmt & " from ASSEMBLY.FEC_MAP fm, ASSEMBLY.FEC_MAP_LOG fml "
SQLStmt = SQLStmt & " where fm.reqdate=fml.reqdate and fml.reqdate=to_date('" & ndate & "','YYYYMMDDHH24MISS') "
SQLStmt = SQLStmt & " ORDER BY FEC_NUMBER,FEC_STRING,CHAN "
' response.write(SQLStmt & " " & vbCrLf)
Set RS = Connection.Execute(SQLStmt)
reqdate=CStr(RSx("REQDATE"))
crdate=CStr(RSx("CRDATE"))
sysdate=CStr(RSy("SSDD"))
Set fso = CreateObject("Scripting.FileSystemObject")
Set DataFile = fso.CreateTextFile(ph_image_directory+"fec_sensor_map_phdb.txt", True)
header = "#Full map valid at " & reqdate & " created at " & crdate & " written at " & sysdate & " with " & CStr(nchannels) & " channels "
DataFile.WriteLine(header)
header="#SNam" & vbTab & "Type" & vbTab & "FEC" & vbTab & "String" & vbTab & "ChPos" & vbTab & "Chip" & vbTab & "CHType" & vbTab & "Row" & vbTab
header=header & "Col" & vbTab & "BondPat" & vbTab & "Pad"
DataFile.WriteLine(header)
Do While Not RS.EOF
sensor_entry= CStr(RS("GEO_SENSOR")) & vbTab
sensor_entry=sensor_entry & CStr(RS("SENSOR_TYPE")) & vbTab
sensor_entry=sensor_entry & CStr(RS("FEC_NUMBER")) & vbTab
sensor_entry=sensor_entry & CStr(RS("FEC_STRING")) & vbTab
sensor_entry=sensor_entry & CStr(RS("CHAN")) & vbTab
sensor_entry=sensor_entry & CStr(RS("CHIP_NUMBER")) & vbTab
sensor_entry=sensor_entry & CStr(RS("CHIP_TYPE")) & vbTab
sensor_entry=sensor_entry & CStr(RS("SENSOR_ROW")) & vbTab
sensor_entry=sensor_entry & CStr(RS("SENSOR_COLUMN")) & vbTab
sensor_entry=sensor_entry & CStr(RS("BONDING_PATTERN")) & vbTab
sensor_entry=sensor_entry & CStr(RS("PAD")) & vbTab
DataFile.WriteLine(sensor_entry)
RS.Movenext
Loop
DataFile.Close
Set Datafile=nothing
set fso=nothing
%>
Full connection map with <%=nchannels%> channels has been written
to file fec_sensor_map_phdb.txt.
The map is valid as of <%=reqdate %>. You must reload the map after you click on the link !
<%
Else
%>
Full connection map with <%=nchannels%> channels has NOT been written.
The file would have been to large. The largest map that can be printed using this web page
must have less than 10000 channels. Use Phat to access this map.
<%
End If
Connection.Close
Set Connection=nothing
Set RS=nothing
Set RSx=nothing
Set RSy=nothing
%>