Hi, Jim.

You might try something like this in Rexx (untested):

/*****/
IP_addr.1 = '10.23.178.200'
IP_addr.2 = '192.168.128.12'
IP_addr.3 = '172.12.210.34'
IP_addr.0 = 3
do i = 1 to IP_addr.0
  parse var IP_addr.i num1 '.' num2 '.' num3 ',' num4
  num1 = right(num1,3,'0')
  num2 = right(num2,3,'0')
  num3 = right(num3,3,'0')
  num4 = right(num4,3,'0')
  padded_IP_addr.i = num1 || '.' || num2 || '.' || num3 || '.' || num4
end
/* now sort padded_IP_addr stem */
padded_ip_addr.0 = 3
'pipe stem padded_ip_addr. | sort | cons'
exit

On 05/24/2011 09:40 AM, Jim Bohnsack wrote:
> 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
> 

-- 
Dave Jones
V/Soft Software
www.vsoft-software.com
Houston, TX
281.578.7544

Reply via email to