%@ 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) %>
Sequence | Farm | Node | ")
Response.write("Dir/Name | Fpartition | ")
Response.write("Fsize | Mntpartition |
| "& sequence &" | "& farm &" | "& node &" | ") Response.write(""& dir &"/"& name &" | "& fpartition &" | ") Response.write(""& fsize &" | "& mntpartition &" | ") Response.write("