<%@ LANGUAGE="VBScript" %> <%dim dir, farm, node, name, fpartition , fsize, mntpartition, run, sequence dim nloops If Request("run")<>"" then run= cstr(Request("run")) Else run="0" end if dim s , c , my3array(10) dim seq_min(10), seq_max(10), other_seq(10) If Request("sequence")<>"" then dim my2array , my1array, nloop seq = cstr(Request("sequence")) my1array= Split(seq,",", -1, 1) ' u have my1array(0) and my1array(1) nloop=0 do nloop=nloop+1 loop while not (Instr(1,seq,my1array(nloop-1),1))>(InstrRev(seq,"," ,-1,1)) 'counters c and s c=0 s=0 other_seq(0)= null For i=0 to nloop-1 if not(Instr(1,my1array(i),"-",1)=0) then my2array=split(my1array(i),"-",-1,1) seq_min(c)=my2array(0) seq_max(c)=my2array(1) c=c+1 else other_seq(s)=my1array(i) s=s+1 end if next else other_seq(s)=0 end if if isnull(other_seq(s)) then other_seq(s)=seq_min(0) end if ' ' Open Database ' Set Connection = Server.CreateObject("ADODB.Connection") Connection.Mode = adModeRead Connection.Open phdb_rd SQLstatement="select rf.sequence sequence, pf.farm,pf.node, f.dir, f.name,pcd.fpartition," SQLstatement= SQLstatement &" f.fsize,pcd.mntpartition, f.status from phoffline.files f, " SQLstatement= SQLstatement &" phoffline.runseq_files rf,phoffline.pcfarm pf, " SQLstatement= SQLstatement &" phoffline.pcfarm_disk pcd where rf.fileid=f.fileid and " SQLstatement= SQLstatement &" pf.node=f.node and pcd.node=f.node and pcd.fpartition=f.fpartition " SQLstatement= SQLstatement &"and rf.run="& run SQLstatement= SQLstatement &" and (" SQLstatement= SQLstatement &" (rf.sequence="& other_seq(0) &")" for i=0 to c-1 SQLstatement= SQLstatement &" or (rf .sequence between "& seq_min(i) &" and "& seq_max(i)&")" next for i=1 to s-1 SQLstatement= SQLstatement &" or (rf.sequence="& other_seq(i) &")" next SQLstatement= SQLstatement &") order by sequence" 'response.write(SQLstatement) set RS=Connection.Execute(SQLstatement) %> File Tracker

File tracker

Data Processing Index

 

Run Number
Sequence number
<% if Request("run")<>"" then Response.write("

Run:" & run &"

") Response.write("") Response.write("") Response.write("") nloops=0 f=0 ' counter for errors dim error, seque(10), f error=false Do while not RS.EOF if not isnull(RS("sequence")) then sequence=cint(RS("sequence")) else sequence="N/a" end if farm=cstr(RS("farm")) node=cstr(RS("node")) dir=cstr(RS("dir")) name=cstr(RS("name")) fpartition=cstr(RS("fpartition")) if not isnull(RS("fsize")) then fsize=cstr(RS("fsize")) else fsize="N/a" end if if not isnull(RS("mntpartition")) then mntpartition=cstr(RS("mntpartition")) else mntpartition="N/A" end if if isnull(RS("status")) then Response.write("") Response.write("") Response.write("") Response.write("") else error=true seque(f)= sequence f=f+1 end if nloops=nloops + 1 RS.Movenext Loop response.write("

Sequence

Farm

Node

Dir/Name

Fpartition

Fsize

Mntpartition

"& sequence &""& farm &""& node &""& dir &"/"& name &""& fpartition &""& fsize &""& mntpartition &"
") if nloops=0 then response.write("Sorry, this file is not available in the computer farms or the database has no record from it") end if if error then for i=0 to f-1 response.write(" The file containing run="& run &" and sequence="& seque(i) &" has been deleted from this computer farm") next end if else end if %> <% ' ' CLose database connection ' Set RS=nothing Connection.Close Set Connection=nothing %>