PARM ipparm=@; entry=main # This script reports all network connections to this system (as long # as the network connection creates CI.PUB.SYS). # Note: this will become less accurate as alternate logon shells start # being used; however, using LISTF on a system-wide UDC file should # work OK. # Note: I use JINFO to get the intro date/time of matching remote # sessions (6.0 express 1), but that part is easy to delete... # Jeff Vance, CSY if '!entry' = 'main' then if '!ipparm' = '?' then echo Usage: !hpfile [ip_addr] , where "ip_addr" is a full or echo partial dotted-form IP address. The default is to see all echo remote sessions. return endif # verify parm setvar _ip_i 0 setvar _ip_addr '!ipparm' while setvar(_ip_word,word(_ip_addr,'.',setvar(_ip_i,_ip_i+1))) <> '' & and (numeric(_ip_word) or delimpos(_ip_word,'@?#[-]') > 0) do endwhile if _ip_word <> '' then echo Expected only numerics in the IP address deletevar _ip_@ return endif # prepend and append an '@' to the ipparm for pmatch call later setvar _ip_addr repl('@'+_ip_addr+'@','@@','@') # listf the CI,8 to see all accessors -- then filter based on ipparm errclear continue listfile ci.pub.sys,8 >iplftmp if hpcierr = 0 then xeq !hpfile !_ip_addr entry=listf 0 do if pos('REM :',setvar(_ip_buf,rtrim(input()))) > 0 and & pmatch(_ip_addr,word(_ip_buf,,-1)) then setvar _ip_name word(_ip_buf,,2) echo ![word(_ip_buf)+" "+& _ip_name+str(' ',1,9-len(_ip_name))+" "+& word(_ip_buf,,-1)] & Intro: ![jinfo(word(_ip_buf),'FmtIntroDate')] & ![jinfo(word(_ip_buf),'FmtIntroTime')]. endif endwhile return endif