|
DataMuseum.dkPresents historical artifacts from the history of: RC4000/8000/9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC4000/8000/9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 3840 (0xf00) Types: TextFile Names: »treadjob«
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ. └─⟦b2ec5d50f⟧ └─⟦this⟧ »treadjob«
<*read job file 1982.01.05 Anders Lindgård*> procedure read_job_file(ct,bufref,A,pz); integer array field ct,bufref; integer array A; zone pz; begin integer i,j,res,char,c,error; boolean batch; integer array field t,des,cpda; integer array cur(1:qdescsize//2),ht(1:17); long array file(1:3); long array field name; t:=14; batch:=childtable.ct.ctbatch>0; des:=childtable.ct.ctref; for j:=qdescsize//2 step -1 until 1 do cur(j):= if batch then q.des(j) else condesc.des(j); <*+2*> if testop(9) then write(pz,"nl",1,<:read job file called :>, if batch then <: batch :> else <: on line :>); <*-2*> name:=8+8; for i:=1,2 do file(i):=core.bufref.name(i); <*+2*> if testop(9) then write(pz,file); <*-2*> cpda:=childtable.ct.ct_childpda; cur.conprocin:=cur.conprocout:=cur.contermpda; error:=0; if -,readusercat(childtable.ct.ct_jobname,cur,false,pz) then error:=8 else begin <*this must allways be the case*> <*+2*> if testop(9) then begin write(pz,"nl",1,<:child found in usercat :>,childtable.ct.ctjobname); setposition(pz,0,0); end; <*-2*> std_claim(cur); std_bs(cur,pz); name:=cpda+2; for i:=1,2 do cur.conprocname(i):=core.name(i); set_base(core.cpda.stdbaseref(1),core.cpda.stdbaseref(2)); res:=lookup_head_and_tail(file,ht); cur.qremovejobfile:=0; <*+2*> if testop(9) then disable begin write(pz,"nl",1,<:lookup :>,file); listentry(pz,ht); setposition(pz,0,0); end; <*-2*> if res<>0 or ht.t(1)<1 then error:=3 else begin if ht(1) extract 3<2 then begin permanent_entry(file,2); set_entry_base(file,cur.conloweruser,cur.conupperuser); cur.q_remove_job_file:=1; end; wait(zsem); setbase(cur.conloweruser,cur.conupperuser); createareaprocess(file); res:=reserve_process(file); if res>0 then error:=3 else begin open(z,4,file,0); name:=8+4; for i:=1,2 do cur.qprinter(i):=0; if core.bufref.name(1)<>long <::> then begin cur.qprinter(1):=core.bufref.name(1); <*+2*> if testop(9) then disable begin write(pz,"nl",1,<:printer :>,cur.qprinter,"sp",2,cur.conoutname); setposition(pz,0,0); end; <*-2*> end; char:='sp'; while char='sp' or char='nl' do readchar(z,char); <*+2*> if testop(9) then disable begin write(pz,"nl",1,<:char :>,char); setposition(pz,0,0); end; <*-2*> cur.q_max_time:=b_std_time; error:=0; if char=';' then begin <*+2*> if testop(9) then disable begin write(pz,"nl",1,<:call readsubmit:>); setposition(pz,0,0); end; <*-2*> if readsubmit(z,pz,cur,true) then begin close(z,true); res:=job_to_queue(cur,file,pz); if res=0 then A(2):=cur.qjobno else error:=res; end else begin close(z,true); error:=5; end; end read job file else begin close(z,true); res:=job_to_queue(cur,file,pz); if res=0 then A(2):=cur.qjobno else error:=res; end; resetbase; end check reservation; resetbase; end job file lookup; signal(zsem); end readuscat; A(1):=error; <*+2*> if testop(9) then disable begin write(pz,"nl",1,<:readjob: res: :>,error,A(2)); setposition(pz,0,0); end; <*-2*> end read_job_file; ▶EOF◀