%@ LANGUAGE="VBScript" %>
<%
Dim Action_Name(50)
Dim Action_Description(50)
Dim Action_Performed(50)
Dim Action_Comments(50)
Dim Action_Result(50)
Dim Action_Rowid(50,1)
Dim Action_Web(50)
Dim Action_Order(50)
Dim Action_Data_Entry(50)
Set Connection = Server.CreateObject("ADODB.Connection")
Connection.Mode = adModeRead
Connection.Open phdb_rd
SQLStmtx = "select to_char(sysdate,'dd-MON-yyyy hh24:mi:ss') dispdat from sitester.sensor_log where rownum<2"
Set RSx = Connection.Execute(SQLStmtx)
SQLStmt3 = "select HYBRID_TYPE from ASSEMBLY.ASM_HYBRID_ID where HYBRID_ID='"+Request("REQ_HYBRID_ID")+"'"
Set RS3 = Connection.Execute(SQLStmt3)
SQLStmt0 = "select ACTION,DESCRIPTION,WEBACCESS,ACTION_ORDER from ASSEMBLY.ASM_HYBRID_ACTION where ACTION_ORDER<3000 and HYBRIDS LIKE '%"+RS3("HYBRID_TYPE")+"%'order by ACTION_ORDER"
'response.write(SQLStmt0)
Set RS0 = Connection.Execute(SQLStmt0)
SQLStmt1 = "select OPERATOR, LOCATION, ACTION, CONFIG, COMMENTS, ROWID, WURST_ID from ASSEMBLY.ASM_HYBRID_LOG where HYBRID_ID='"+Request("REQ_HYBRID_ID")+"' order by LOGDATE"
Set RS1 = Connection.Execute(SQLStmt1)
SQLStmt4 = "select MODULE_ID,HYBRID_POS from ASSEMBLY.ASM_HYBRID_BOND_ID where HYBRID_ID='"+Request("REQ_HYBRID_ID")+"'"
Set RS4 = Connection.Execute(SQLStmt4)
SQLStmt5 = "select distinct ACTION from ASSEMBLY.ASM_MEASUREMENT_LIST"
Set RS5 = Connection.Execute(SQLStmt5)
naction=0
Do While Not RS0.EOF
'
'select appropriate actions
'
If (Left(RS0("ACTION"),2)<>"O_" Or RS3("HYBRID_TYPE")="OCTA") And ((RS0("ACTION")<>"Subplate_mount" And RS0("ACTION")<>"Subplate_meas") Or RS3("HYBRID_TYPE")<>"OCTA") Then
Action_Name(naction)=CStr(RS0("ACTION"))
Action_Description(naction)=RS0("DESCRIPTION")
Action_Performed(naction)=0
Action_Comments(naction)=""
Action_Result(naction)="N/A"
For i=0 To 1
Action_Rowid(naction,i)=""
Next
Action_Web(naction)=CInt(RS0("WEBACCESS"))
Action_Order(naction)=CInt(RS0("ACTION_ORDER"))
Action_Data_Entry(naction)=0
naction=naction+1
End If
RS0.MoveNext
Loop
naction=naction-1
' fill status arrays, brute force !
' find if broken chips were ever found...
'
bad_chip=0
special_test=0
Do While Not RS1.EOF
Action_Done=CStr(RS1("ACTION"))
For iaction=0 To naction
If Action_Done=Action_Name(iaction) Then
Action_Performed(iaction)=Action_Performed(iaction)+1
Action_Comments(iaction)=RS1("COMMENTS")
Action_Result(iaction)=RS1("CONFIG")
If Not IsNull(RS1("WURST_ID")) Then ' looks like tests, need to record ROWID
Action_Rowid(iaction,CInt(RS1("WURST_ID")))=RS1("ROWID")
End If
Exit For
End If
Next
If Action_Done="Bad_chip_check" Then
If Cstr(RS1("CONFIG"))="NOT OK" Then
bad_chip=bad_chip+1
End If
End If
If Action_Done="H_spec" Then
special_test=special_test+1
End If
RS1.MoveNext
Loop
'
' select which actions have some data to be entered
'
Do While Not RS5.EOF
Action_In_Table=CStr(RS5("ACTION"))
For iaction=0 To naction
If Action_In_Table=Action_Name(iaction) Then
Action_Data_Entry(iaction)=1
End If
Next
RS5.MoveNext
Loop
%>
Hybrid Status
HYBRID ID : <%= Request("REQ_HYBRID_ID")%>
Action
Status
<% For iaction=0 To naction
If (Action_Order(iaction)<1200 Or Action_Order(iaction)>1300 Or bad_chip>0) And (Not (Action_Description(iaction)="Special Test of Hybrid" and special_test=0)) Then 'suppress actions valid only after broken chips
%>
<%=Action_Description(iaction) %>
<%
If Action_Performed(iaction)>0 Then
If Action_Result(iaction)="OK" Then
If Action_Data_Entry(iaction)=1 Then
%>
&REQ_ACTION=<%=Action_Name(iaction)%>">Add
<%
End If
Else
If Action_Performed(iaction)>0 and Action_Name(iaction)="Create New Hybrid" Then
Select Case Cstr(RS3("HYBRID_TYPE"))
Case "MSDL"
%> ">Picture <%
Case "MSDR"
%> ">Picture <%
Case "MS4L"
%> ">Picture <%
Case "MS4R"
%> ">Picture <%
Case "MS3L"
%> ">Picture <%
Case "MS3R"
%> ">Picture <%
Case "VXIL"
%> ">Picture <%
Case "VXIR"
%> ">Picture <%
Case "VXOR"
%> ">Picture <%
Case "VXOL"
%> ">Picture <%
Case "RING"
%> ">Picture <%
Case "OCTA"
%> ">Picture <%
End Select
End If
If Action_Performed(iaction)>0 and (Action_Name(iaction)="H_cal" Or Action_Name(iaction)="H_spec") Then
%> <%
End If
End If
%>
<%
End If 'broken chip selection
Next
%>
Database Time is <%=Cstr(RSx("DISPDAT")) %>
Note that only the status of the LATEST action
is displayed in the table. Manual actions recorded more than once are marked with an
exlamation mark: . The complete record of actions is available in the ">complete log display.
<% If Not RS4.Eof Then %>
This Hybrid is assigned to module "><%=RS4("MODULE_ID")%> at position <%=RS4("HYBRID_POS")%> <% Else %> This
Hybrid is not yet assigned to a module<%End If%>