HP3000-L Archives

February 1999, Week 4

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jeff Kell <[log in to unmask]>
Reply To:
Jeff Kell <[log in to unmask]>
Date:
Thu, 25 Feb 1999 21:37:45 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (41 lines)
John Krussel wrote:
>
> This may be a little crude but it should do the trick.  you can put in any
> part of the IP address and it will show all matching sessions.
>
> PARM IPMASK
> SETVAR IPLIST_LENGTH,LEN('!IPMASK')
> PURGE WORKFILE>$NULL
> BUILD WORKFILE;REC=-78,1,F,ASCII;DISC=1000;MSG
> FILE WORKFILE=WORKFILE,OLD
> LISTF CI.PUB.SYS,8>*WORKFILE
> SETVAR IPLIST_NUMBER_OF_RECORDS,FINFO("WORKFILE",19)
> ECHO
> WHILE IPLIST_NUMBER_OF_RECORDS > 0
>   INPUT IPLIST_RECORD_LINE;< WORKFILE
>   SETVAR IPLIST_IP_STRING,STR('!IPLIST_RECORD_LINE',63,!IPLIST_LENGTH)
>     IF '!IPLIST_IP_STRING' = '!IPMASK'
>       ECHO !IPLIST_RECORD_LINE
>     ENDIF
>   SETVAR IPLIST_NUMBER_OF_RECORDS,IPLIST_NUMBER_OF_RECORDS-1
> ENDWHILE
> DELETEVAR IPLIST_@

I can't resist but relate this back to my personal push for posix
smoothing.  The above can be done in the shell with:

   shell/ix> showip 123.145.167

Where showip is a 1-liner script:

   callci "listfile ci.pub.sys,8"|grep $1

But with MPE CI-pipes it could also be just the

   listfile ci.pub.sys,8|/bin/grep !ipmask

File processing remains painfully cumbersome in MPE, while posix deals
with it quite elegantly.

Jeff Kell <[log in to unmask]>

ATOM RSS1 RSS2