externalintegerfunctionspec dsfi(string (6) user,integer fsys,type,
set,adr)
externalintegerfunctionspec get usnames(integername n,integer adr,
fsys)
externalroutinespec get av fsys(integername n,integerarrayname a)
systemstringfunctionspec itos(integer n)
!
!
integerfunction stoi(string (255) s)
if s = "-1" then result = -1
if length(s) = 1 then s = "0".s
if length(s) # 2 then result = -2
unless '0' <= charno(s,1) <= '9' then result = -2
unless '0' <= charno(s,2) <= '9' then result = -2
result = (charno(s,1) - '0')*10 + charno(s,2) - '0'
end ; ! of stoi
!
!
externalroutine doftp(string (255) s)
string (6)array u(0:1023)
integer nu,nusers,flag
integer j,n,fx,fsys,priv
integerarray a(0:99)
string (63) user
!
fsys = -1
if s # "" then start
fsys = stoi(s)
unless -1 <= fsys <= 99 then -> bp
finish
if fsys<0 then get av fsys(n,a) else a(0) = fsys and n = 1
fx = 0
while fx<n cycle
fsys = a(fx)
printstring("+++ FSYS ".itos(fsys)." +++"); newline; newline
j = get usnames(nusers,addr(u(0)),fsys)
printstring("GET USNAMES flag ="); write(j,1)
printstring(" No of users ="); write(nusers,1); newlines(2)
nu = 0
while nu<nusers cycle
user<-u(nu)
if length(user) = 6 then start
flag = dsfi(user,fsys,38,0,addr(priv))
if priv & x'40' # 0 then start
printstring(user); newline
finish
finish
nu = nu+1
repeat
fx = fx + 1
repeat
return
bp:
printstring("Illegal fsys specification"); newline
end ; ! of doftp
endoffile