dc. {DO} TERM c. Show the active terminals ,c. c. This requires a file, SCI_EXE that contains a MAP of the c. facility. This map is a text file with the locations of the Xc. terminals indicated by TTxx (the TT and be lower case). c. The program uses a file FOR002 generated by the MCR WHO, to c. determine WHO is logged on to each terminal, replaces the TTxx c. by that name, and outputs it. c. Lc. c. -end.of.info- c. xc. uses: for001 TERM. c. for002 WHO.DAT if available @c. 41 format(132a) c. l character*2000 data,updata  data data/' '/ 4 character*78 inline  character*25 tim  character*2 home ` real rtime(3) character*10 tchar ( data tchar/'*123456789'/ c. call date(tim) T home(1:1) = char(27) !!esc home(2:2) = 'H'  call time(tim(12:)) ishift = mod(ichar(tim(19:19)),3)-1 open( unit=1,name='SCI_EXE:term.',type='old' H 1 ,readonly ) c. c... read the map of the facility tc.  data = ' '  do 390 ii=1,25 < read(1,41,end=395) data(ii*80-79:ii*80) 390 continue 395 continue h updata = data  call jjupp(updata) 0c. c... try to read the 'who' file c. \ open( unit=2,type='old',readonly,err=500 )  read(2,41) inline $ numbus = -1  do 490 ii=1,20  read(2,41,end=495) inline P inx = index( updata, inline(2:5) )  if(inx.ne.0) then  inx = inx+ishift-1 | data(inx:inx+6) = inline(15:)  numbus = numbus+1 D endif 490 continue 495 continue pc.  goto 900 8c. c... no who file c. d500 continue  ipos = 1 ,c. 510 continue  inx = index( updata(ipos:),'TT' ) X if( inx.eq.0 ) goto 590  ipos = ipos+inx-1  open( unit=99,name=updata(ipos:ipos+3)//':',err=550 )  close( unit=99 )  ipos = ipos+4 L goto 510 c. 550 continue x data(ipos:ipos+2+ishift) = '******'  ipos = ipos+4 @ numbus = numbus+1  goto 510  c. l 590 continue c. 4!900 continue ! do 910 ii=1,20 ! inx = index( data,'tt' ) `" if( inx.eq.0 ) goto 915 " data(inx:inx+1)=' ' (#910 continue #915 continue #c. T$ call jjtime( rtime ) $ do 210 ii=1,100 000 % i = x %210 continue % call jjtime( rtime ) H& percent = 100.0 * ( 1.0 - rtime(1)/rtime(2))+1.0 & inx = index(data,'<' )+1 ' data(inx:inx+0.25+percent/5.0) = '********************' t' if( percent.lt.0 ) percent=0 ' write(6,1010) home, numbus,tim, percent <(1010 format(' ',a,i5,' Other busy terminals ',a,f5.1,'% active' ) ( do 1090 ii=1,21 ) write(6,41)' ',data(ii*80-79:ii*80-1) h)1090 continue ) end