10 sub logrms( errcode% ) & \ on error go to 19000 & 20 ! patch for logout (put call right before sys(4+5) & ! to update datatrieve file if it exists. must be & ! used in conjunction with LIN.MAC and LINX.MAC & ! insert 'call logrms(junk%)' before the logout & ! sys call. 1020 map (acnt) lastname$ = 20 , firstname$ = 20 , & password$ = 10 , connect% , & logins% , logouts% , & dtr.dla$ = 8 , rsts.dla%, & ppn%(1) , lastkbn% , & lastjobn$ = 2 , cputime% , & maxconnecttiime%,rsts.jdb%, & extrajunk$ = 4% & & \ map (acnt) fill$ = 72, lastjobn% & \ map (syscal) sysp$ = 30 & \ map (syscal) sysp%(15) & 1040 sysp$ = sys( chr$(6%)+chr$(26%)+chr$(0%)+chr$(0%)) & \ s.ppn% = sysp%(10%) & \ s.kbn% = swap%(sysp%(1%)) and 255% & \ s.jobn%= (sysp%(1%) and 255%) / 2% & \ proj% = swap%(s.ppn%) and 255% & \ prog% = s.ppn% and 255% & \ s.con% = sysp%(4%) & \ s.cpu = sysp%(3%) & \ s.cpu = (sysp%(3%) and 32767%) + 32768.0 & if sysp%(3%) < 0% & \ s.cpu = s.cpu + ascii(mid(sysp$,16%,1%)) * 65536.0 & \ sysp$ = sys( chr$(6%)+chr$(26%)+chr$(0%)+chr$(1%)) & \ jdb% = sysp%(12%) & \ cdate% = peek(512%) & \ filnam$= 'LB:[' + num1$(proj%)+ ',0]STU' & + left('000',3%-len(num1$(proj%)))+num1$(proj%)& + '.' & + left('000',3%-len(num1$(prog%)))+num1$(prog%)& \ junk$ = sys(chr$(6%)+chr$(-21%)+chr$(0%)) & 1050 open filnam$ for input as file #8 , & organization indexed fixed , & map acnt , & access modify , & allow modify , & primary lastname$ , & alternate password$ , & alternate lastjobn$ & \ go to 1060 & 1055 openc% = openc% + 1% & \ go to 32100 if errcode% = 5% & \ if openc% > 5% & then go to 32000 & else go to 1050 & 1060 restore #8, key #2 & \ keystring$ = chr$(s.jobn%) + chr$(0%) & \ get #8, key #2 eq keystring$ & \ while (lastkbn% <> s.kbn%) and (rsts.jdb% <> jdb%) & and (s.jobn% = lastjobn%) & \ get #8 & \ next & \ go to 32000 if s.jobn% <> lastjobn% & \ rsts.jdb% = 0% & \ lastkbn% = 0% & \ lastjobn% = 0% & \ s.c = s.con% & \ s.c = s.c + connect% & \ s.c = 32767.0 if s.c > 32767.0 & \ connect% = s.c & \ cputime% = cputime% + ( s.cpu/600.0 ) & \ logouts% = logouts% + 1% & 2000 update #8 & \ go to 32000 & 19000 print '?RMS error ',err unless err = 5% or err = 155% & \ errcode% = err & \ resume 32100 if err = 5% & \ resume 32100 if erl = 32000% & \ resume 1055 if erl = 1050% & \ if erl <> 2000% & then resume 32000 & else & ntimes% = ntimes% + 1% & \ if ntimes% > 6% & then resume 32000 & else & sleep 1% & \ resume 2000 & 32000 close #8 & 32100 junk$ = sys(chr$(6%)+chr$(-21%)+chr$(255%)) & 32767 subend