Here is something I wrote years ago to verify the format of an IP address. It 
was written to  verify a single IP address per call. You might be able to use 
it as a starting point.

'PIPE (end \ name VeriftIPA)',   
'\ var ipa',                     
   '| v: verify /.0123456789/',  
   '| deblock linend .',         
   '| pad 1 0',                  
   '| p: pick w1 <<= /255/',     
   '| c: count lines',           
   '| join * /./',               
   '| var ipaddr'                
'\ v:',                          
   '| stem badchar.',            
'\ c:',                          
   '| var segs',                 
'\ p:',                          
   '| stem badsegs.' 

Instead of the "pad 1 0" stage you could "pad 3 left 0" to make all octets 3 
bytes long. 

Regards, 
Richard Schuh 

 

> -----Original Message-----
> From: The IBM z/VM Operating System 
> [mailto:IBMVM@LISTSERV.UARK.EDU] On Behalf Of Jim Bohnsack
> Sent: Tuesday, May 24, 2011 7:40 AM
> To: IBMVM@LISTSERV.UARK.EDU
> Subject: Sort IP addresses
> 
> Does anyone have an xedit macro, or some other means, to sort 
> a column of ip addresses that will accommodate the varying 
> number of digits between the dots.  I looked on the IBM 
> download website, but don't see anything.
> 
> Jim Bohnsack
> 
> --
> James Bohnsack
> (972) 596-6377 home/office
> (972) 342-5823 cell
> 

Reply via email to