%externalroutine tcpusers(%string(255) s) %constant %integer maxtcps=39 %constant %string(15) %array tcpname(1:maxtcps)="TCPA","TCPC","TCPD","TCPM","JCMB", "G.SQ.","EULIB","SOCS","ATB-1","ATB-2","ATB-3","CS-AT1","CS-AT2","ENGIN","CHEM", "POLLCK","XGATE","TCPS","GEOG","PSSE","SIAE","FCNRS","BUSH","IGS","HFRO", "SCRI-I","SCRI-P","FOREST","ERSKIN","WS-COA","GTCP1","GTCP2","GTCP3","GTCP4", "GTCP5","STCP","STCL-2","null","TEMP" %integer i,j %recordformat rf1(%integer n,a) %recordformat pf(%string(6)user,%string(15)tcp,%byteinteger a,invoc,b,n,f, %integer logs,%byteinteger c,d,e,r,%integer id,proc,g,h,z) %record(rf1) r1 %record(pf)%array p(1:256) %externalroutinespec prompt(%string(255) s) %externalintegerfnspec dprocedure(%integer a,b) %systemstringfnspec username(%string(6) user,%integer flag) %on %event 4 %start printstring("You Are Supposed To Type The Number Associated With The Tcp!") newline %stop %finish r1_a=addr(p(1)) i=dprocedure(1,addr(r1)) %if s="?" %start printstring("The Following Tcps Are Currently Supported");newline;newline %for i=1,2,maxtcps %cycle write(i,3);printstring(": ".tcpname(i)); %if i+1<=maxtcps %start write(i+1,15-length(tcpname(i))) printstring(": ".tcpname(i+1)) %finish newline %repeat prompt("TCP-Number?:") read(i) %if (i<1) %or (i>maxtcps) %then printstring("Wrong Number") %and newline %and %stop s=tcpname(i) %finish %if s<>"*" %start printstring("Users For Tcp:".s);newline %for i=1,1,r1_n %cycle %if p(i)_tcp=s %start printstring(p(i)_user."(".username(p(i)_user,1).")") %if '0'<= p(i)_e <='9' %start printsymbol('+');printsymbol(p(i)_e);printsymbol(p(i)_r) %finish newline %finish %repeat %finishelsestart %for i=1,1,maxtcps %cycle s=tcpname(i) printstring("Users For Tcp:".s);newline %for j=1,1,r1_n %cycle %if p(j)_tcp=s %start printstring(p(j)_user."(".username(p(j)_user,1).")") %if '0' <= p(j)_e <= '9' %start printsymbol('+');printsymbol(p(j)_e);printsymbol(p(j)_r) %finish newline %finish %repeat newlines(2) %repeat %finish %end %endoffile