IPv4 addresses (the dotted decimal stuff) should be converted to binary, one "octet" for each component. It's fixed at 32 bits total, so you can sort that reliably.
Personally, I would rather convert it to hex and sort that, but ... ahhh the joy of EBCDIC collating sequence. (Someone will jump in and say the table can be changed, but I hate going there.) You may also want to handle IPv6 at some point: 128 bits, represented in hex, 16 bits for each component, one run of zeros can be squished out. -- R; <>< Rick Troth Velocity Software http://www.velocitysoftware.com/ On Tue, May 24, 2011 at 10:40, Jim Bohnsack <jab...@cornell.edu> 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 > > -- > James Bohnsack > (972) 596-6377 home/office > (972) 342-5823 cell >