DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦c2ae1591a⟧ TextFile

    Length: 8520 (0x2148)
    Types: TextFile
    Notes: flxfile
    Names: »s28101:1.taccount    main  «, »taccount    main  «

Derivation

└─⟦2c579b2cd⟧ Bits:30004129/s28101.imd SW8101/2 BOSS v.2 rel. 2.0
    └─⟦4fb120d20⟧ 
        └─⟦this⟧ »s28101:1.taccount    main  « 

TextFile


; jma 1980.07.10          boss2, taccount          ...1...

accountjob=edit

i&
job account 51 size 16384 time 6 0 0 temp disc 800 8
head
mode list.yes
lookup accountfile accountf1

(
o accountlog             ; delete this line,
writeacc=set 40 1        ;    and this line,
writeacc=algol           ;    and this line,
writeacc in.accountfile  ;    and this line,
o c                      ;    and this line,
convert accountlog std 2 ;    and this line, if log is not wanted.
scope temp accountfile
clear temp accountfile
finis
)

begin
  message accountjob, versionid: 80 07 10, 9;
  boolean nl, sp;
  integer i, date, clock,
          lines_on_a_page, line, page,
          cause, devi1, devi2, type,
          slicelength_on_drum, slicelength_on_disc;
  integer array dummy(1:1);
  real t, k;
  real array fpparam(1:2);
  zone z(128*2, 2, stderror);
  boolean field userindex,
                finiscause, mounts, loads, tempdrum, tempdisc,
                stations, size, waitingtime, onlinelines,
                logoutcause,
                converttype,
                priority;
  integer field project, kind,
                netruntime, cputime, deviceword1, deviceword2,
                logintime, operations,
                lines, pages, paper,
                exp_netruntime, exp_grossruntime,
                param1, param2, param3;
  long field time;
  real array field username;

 procedure newline(lines_needed);
  value lines_needed;
  integer lines_needed;
  begin
    if line + lines_needed > lines_on_a_page then
    begin
      page:= page + 1;
      write(out, <:<12>account file log:>,
      sp, 85, <:page:>, << ddddd>, page, nl, 2,
      <:date   time     user (index) project kind   (cause)  :>);
      if page = 1 then write(out, nl, 2,
        sp, 37, <:jobfinis        :>);
      write(out,
      <:net   cpu   size  drum  disc  load  stat mount  wait lines:>);
      if page = 1 then write(out, nl, 1,
        sp, 37, <:logout          min  oper:>, nl, 1,
        sp, 37, <:print         lines pages  paper:>, nl, 1,
        sp, 37, <:job             net gross   prio:>, nl, 1,
        sp, 37, <:(private)    param1       param2      param3:>);
      write(out, nl, 1);
      line:= if page = 1 then 10 else 4;
    end;
    write(out, nl, 1);
    line:= line + 1;
  end;


  <* initialization *>
  <* common fields                                         *>
  project         :=  2; <* word          *>
  username        :=  2; <* text, 9 chars *>
  userindex       := 10; <* right hw      *>
  kind            := 12; <* word          *>
  time            := 16; <* doubleword    *>

  <* fields in jobfinis-record               (kind = 1)    *>
  finiscause      :=  9; <* left  hw      *>
  netruntime      := 18; <* word          *>
  mounts          := 19; <* left  hw      *>
  loads           := 20; <* right hw      *>
  cputime         := 22; <* word          *>
  tempdrum        := 23; <* left  hw      *>
  tempdisc        := 24; <* right hw      *>
  stations        := 25; <* left  hw      *>
  size            := 26; <* right hw      *>
  deviceword1     := 28; <* word          *>
  deviceword2     := 30; <* word          *>
  waitingtime     := 31; <* left  hw      *>
  onlinelines     := 32; <* right hw      *>

  <* fields in logout-record                 (kind = 2)    *>
  logoutcause     :=  9; <* left  hw      *>
  logintime       := 18; <* word          *>
  operations      := 20; <* word          *>

  <* fields in print-record                  (kind = 3)    *>
  converttype     :=  9; <* left  hw      *>
  lines           := 18; <* word          *>
  pages           := 20; <* word          *>
  paper           := 22; <* word          *>

  <* fields in jobstart-record               (kind = 4)    *>
  priority        := 18; <* right hw      *>
  exp_netruntime  := 20; <* word          *>
  exp_grossruntime:= 22; <* word          *>

  <* fields in stop-record                   (kind = 99)   *>
  <* only common fields *>

  <* fields in private account records       (kind >= 100) *>
  param1          := 18; <* word          *>
  param2          := 20; <* word          *>
  param3          := 22; <* word          *>

  <* remaining initialization *>
  nl:= false add 10;
  sp:= false add 32;
  lines_on_a_page:= 48;
  line:= lines_on_a_page;
  page:= 0;
  slicelength_on_drum:= 1;  <* installation dependent *>
  slicelength_on_disc:= 1;  <* installation dependent *>

  <* first fp parameter in call is irrelevant *>
  <* second parameter must be point and filename *>
  if system(4, 2, fpparam) <> 8 shift 12 + 10
    then system(9, 2, <:<10>***param:>);
  i:= 1;
  open(z, 4, string fpparam(increase(i)), 0);


rep:
  inrec6(z, 32);
  if z.kind = 99 then goto stop;
  newline(if z.kind = 1 then 3 else 1);
  k:= z.time//10000;
  date:= systime(4, k, t);
  clock:= t;
  write(out, <<dddddd>, date,
    if clock >= 1 00 00 then << dd dd dd> else <<  z dd dd>,
    clock, sp, 1);
  outtext(out, 9, z.username, 1);
  write(out, << bd>, z.userindex extract 12,
    << dddddd>, z.project, sp, 1);
  if z.kind >= 1 and z.kind <= 4
  then write(out, case z.kind of (
    <: jobfinis:>, <: logout  :>, <: print   :>, <: job     :>))
  else write(out, << -ddddddd>, z.kind);
  write(out, sp, 1);

  if z.kind = 1 then
  begin
    comment jobfinis;
    cause:= z.finiscause extract 12;
    devi1:= z.deviceword1;
    devi2:= z.deviceword2;
    if cause = 100 then write(out, <:conv:>)
                   else write(out, <<bddd>, cause);
    write(out, << ddddd>,
      z.netruntime,
      z.cputime*0.8192,
      << dddddd>, (z.size extract 12)*512, << ddddd>,
      (z.tempdrum extract 12)*slicelength_on_drum,
      (z.tempdisc extract 12)*slicelength_on_disc,
      z.loads extract 12,
      z.stations extract 12,
      z.mounts extract 12,
      z.waitingtime extract 12,
      z.onlinelines extract 12);
    if devi1 <> 0 or devi2 <> 0 then
    begin
      write(out, nl, 1, sp, 37, <:deviceword1: :>);
      line:= line + 1;
      for i:= -23 step 1 until 0 do
      write(out, if devi1 shift i extract 1 = 1
                 then <:1:> else <:.:>,
                 sp, if i = -12 then 1 else 0);
      if devi1 shift (-22) extract 1 = 1
        then write(out, <: reader:>);
      if devi1 shift (-21) extract 1 = 1
        then write(out, <: printer:>);
      if devi1 shift (-20) extract 1 = 1
        then write(out, <: card:>);
      if devi1 shift (-19) extract 1 = 1
        then write(out, <: punch:>);
      if devi1 shift (-18) extract 1 = 1
        then write(out, <: plotter:>);
      if devi2 <> 0 then
      begin
        write(out, nl, 1, sp, 37, <:deviceword2: :>);
        line:= line + 1;
        for i:= -23 step 1 until 0 do
          write(out, if devi2 shift i extract 1 = 1
                     then <:1:> else <:.:>,
                     sp, if i = -12 then 1 else 0);
      end
    end
  end
  else
  if z.kind = 2 then
  begin
    comment logout;
    cause:= z.logoutcause extract 12;
    if cause = 1 then write(out, <:hard:>) else
    if cause = 2 then write(out, <:remo:>) else
    if cause = 3 then write(out, <:time:>)
                 else write(out, <<bddd>, cause);
    write(out, << ddddd>,
      z.logintime,
      z.operations);
  end
  else
  if z.kind = 3 then
  begin
    comment print;
    type:= z.converttype extract 12;
    if type = 1 then write(out, <:prim:>) else
    if type = 3 then write(out, <:jobc:>)
                else write(out, <<bddd>, type);
    write(out, << ddddd>,
      z.lines,
      z.pages, sp, 1,
      z.paper);
  end
  else
  if z.kind = 4 then
  begin
    comment jobstart;
    write(out, sp, 4, << ddddd>,
      z.exp_netruntime*0.8192,
      z.exp_grossruntime*0.8192, sp, 1,
      z.priority extract 12);
  end
  else
  if z.kind >= 100 then
  begin
    comment private account;
    write(out, sp, 4, <<    -ddddddd>,
      z.param1, sp, 1,
      z.param2,
      z.param3);
  end
  else
  begin
    comment illegal account kind;
    write(out, <: *** illegal account kind:>);
  end;

  goto rep;

stop:
  write(out, <:<12>end accountfile log:>);
end

finis

&, f

scope user accountjob
base

▶EOF◀