<%@ LANGUAGE="VBScript" %> <% Dim Action_Name(50) Dim Action_Description(50) Dim Action_Performed(50) Dim Action_Result(50) Dim Action_Web(50) Dim Action_Order(50) Dim Action_Yellow(50) Dim Action_Color(50) Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phobos_server_rd SQLStmt0 = "select ACTION,DESCRIPTION,WEBACCESS,ACTION_ORDER from ASSEMBLY.ASM_MODULE_ACTION where MODULES LIKE '%"+Request("REQ_MOD_TYPE")+"%' order by ACTION_ORDER" ' response.write(SQLStmt0) Set RS0 = Connection.Execute(SQLStmt0) SQLStmt1 = "select ami.MODULE_ID,aml.ACTION,aml.LOCATION,aml.CONFIG,to_char(aml.LOGDATE,'MM/DD/YYYY') LDATE,to_char(aml.LOGDATE,'HH24:MI:SS') LTIME " SQLStmt1 = SQLStmt1 & " from ASSEMBLY.ASM_MODULE_LOG aml,ASSEMBLY.ASM_MODULE_ID ami " SQLStmt1 = SQLStmt1 & " where aml.MODULE_ID (+) =ami.MODULE_ID and ami.MOD_TYPE='"+Request("REQ_MOD_TYPE")+"' " SQLStmt1 = SQLStmt1 & " order by ami.MODULE_ID,aml.LOGDATE" Set RS1 = Connection.Execute(SQLStmt1) SQLStmt2 = "select count(MODULE_ID) as MODULE_COUNT from ASSEMBLY.ASM_MODULE_ID where MOD_TYPE='"+Request("REQ_MOD_TYPE")+"' " Set RS2 = Connection.Execute(SQLStmt2) ' ' Get all the related Hybrids ' SQLStmt3 = "select ahbi.MODULE_ID,ahl.LOGDATE,ahl.LOCATION,ahl.ACTION,ahl.CONFIG, " SQLStmt3 = SQLStmt3 & " to_char(ahl.LOGDATE,'MM/DD/YYYY') LDATE,to_char(ahl.LOGDATE,'HH24:MI:SS') LTIME " SQLStmt3 = SQLStmt3 & " from ASSEMBLY.ASM_HYBRID_BOND_ID ahbi,ASSEMBLY.ASM_HYBRID_LOG ahl,ASSEMBLY.ASM_MODULE_ID ami " SQLStmt3 = SQLStmt3 & " where ahbi.HYBRID_ID=ahl.HYBRID_ID and ahbi.MODULE_ID=ami.MODULE_ID " SQLStmt3 = SQLStmt3 & " and ahl.ACTION like 'M_%' " SQLStmt3 = SQLStmt3 & " and MOD_TYPE='"+Request("REQ_MOD_TYPE")+"' ORDER BY ahbi.MODULE_ID,ahl.LOGDATE" Set RS3 = Connection.Execute(SQLStmt3) naction=0 Do While Not RS0.EOF ' 'select appropriate actions ' Action_Name(naction)=CStr(RS0("ACTION")) Action_Description(naction)=RS0("DESCRIPTION") Action_Performed(naction)=0 Action_Web(naction)=CInt(RS0("WEBACCESS")) Action_Order(naction)=CInt(RS0("ACTION_ORDER")) If Action_Name(naction)="M_spec" Then Action_Yellow(naction)=1 Else Action_Yellow(naction)=0 End If naction=naction+1 RS0.MoveNext Loop naction=naction-1 ' ' fill status arrays, brute force ! ' %> Module Status, Selected Type

MODULE TYPE : <%= Request("REQ_MOD_TYPE")%>

Total Count of this Module Type: <%= Cstr(RS2("MODULE_COUNT"))%>

<%=Action_Description(iaction)%> <%=Action_Description(iaction)%> <%=Action_Description(iaction)%> <%=Action_Description(iaction)%> <%=Action_Description(iaction)%>
To be done To be done, optional test conducted, chips assigned OK NOT OK
<% For iaction=0 To naction %> <% Next %> <% old_module="XXXXXX" Do While Not RS1.EOF If old_module<>"XXXXXX" Then ' ' Loop through the Module Log ' If Not IsNull(RS1("ACTION")) Then Action_Done=CStr(RS1("ACTION")) For iaction=0 To naction If Action_Done=Action_Name(iaction) Then Action_Performed(iaction)=Action_Performed(iaction)+1 If Not IsNull(RS1("CONFIG")) Then If RS1("CONFIG")="NOT OK" Then Action_Color(iaction)=3 ' Red Elseif RS1("CONFIG")="OK" Then Action_Color(iaction)=2 ' Green Else Action_Color(iaction)=4 ' Blue End If Else Action_Color(iaction)=4 ' Blue End If Exit For End If Next End If If Not IsNull(RS1("LOCATION")) Then This_Recording=DateValue(RS1("LDATE"))+TimeValue(RS1("LTIME")) If Last_Recording<=This_Recording Then Location=CStr(RS1("LOCATION")) ddate=(date-datevalue(CStr(RS1("LDATE")))) Last_Recording=This_Recording End If End If RS1.MoveNext End If If RS1.EOF Then present_module="YYYYYY" Else present_module=RS1("MODULE_ID") End If If present_module<>old_module Then ' ' get the hybrid data and then print the whole lot... ' If old_module<>"XXXXXX" Then ' ' loop through hybrid data and pick up "M_*" type tests of the old_module, ignore everything else ' be careful about MODULE_ID sequence, assume perfect sorting ' If Not RS3.EOF Then Do While RS3("MODULE_ID")=old_module If Not IsNull(RS3("ACTION")) Then Action_Done=CStr(RS3("ACTION")) For iaction=0 To naction If Action_Done=Action_Name(iaction) Then Action_Performed(iaction)=Action_Performed(iaction)+1 If Not IsNull(RS3("CONFIG")) Then If RS3("CONFIG")="NOT OK" Then Action_Color(iaction)=3 ' Red Elseif RS3("CONFIG")="OK" Then Action_Color(iaction)=2 ' Green Else Action_Color(iaction)=4 ' Blue End If Else Action_Color(iaction)=4 ' Blue End If Exit For End If Next End If If Not IsNull(RS3("LOCATION")) Then This_Recording=DateValue(RS3("LDATE"))+TimeValue(RS3("LTIME")) If Last_Recording<=This_Recording Then Location=CStr(RS3("LOCATION")) ddate=(date-datevalue(CStr(RS3("LDATE")))) Last_Recording=This_Recording End If End If RS3.MoveNext If RS3.EOF Then Exit Do End If Loop End If %> <% For iaction=0 To naction %> <% Next %> <% End If ' ' reset counters ' For iaction=0 To naction Action_Performed(iaction)=0 ' ' Prepare default colors ' ' Prepared now ' 0 Grey - action not done, it needs to be done ' 1 Yellow - action not done, it is optional ' Set later while scanning the data ' 2 Green - action done, OK or automatic entry ' 3 Red - action done, NOT OK ' If Action_Yellow(iaction)=1 Then Action_Color(iaction)=1 Else Action_Color(iaction)=0 End If Next Location="Unknown" ddate=999 Last_Recording=DateValue("03/04/1959")+TimeValue("12:00:00") old_module=present_module End If Loop %>
Module<%=iaction%>  Last seen at
<% If ddate<=1 Then %>

new.gif (1118 bytes) <% End if %>

<%=old_module%>
<% Select Case Action_Color(iaction) Case 0 %>

<%=Action_Description(iaction)%><% Case 1 %><%=Action_Description(iaction)%><% Case 2 %><%=Action_Description(iaction)%><% Case 3 %><%=Action_Description(iaction)%><% Case 4 %><%=Action_Description(iaction)%> <% Case Else %>???<% End Select %>

<%=Location %>

Legend

<% For iaction=0 To naction %> <% Next%>
<%=iaction%> <%=Action_Description(iaction)%>