Thanks for your inputs, Shane and Martin.

Shane,

We don't have a zLinux instance to pop over to.
Plus, when the sorting is done in Excel, it takes 5 seconds. But I want the 
data to go out right from the mainframe.
Besides, I will be looking for the next available IP in the last octet based on 
the sorted list of IP's. That is,

If I see the below, I need to "use" 192.168.5.223.

.
.
192.168.5.222,.....
192.168.6.200,.....
.
.

- Vignesh
Mainframe Admin

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf 
Of Shane Ginnane
Sent: 16 April 2014 12:30
To: [email protected]
Subject: Re: Sorting CSV data that begins with an IP address

On Wed, 16 Apr 2014 09:01:28 +0000, Sankaranarayanan, Vignesh wrote:

>I need help sorting some 5000 lines based on the first entry in a CSV - IP 
>address. When sorting, I need the whole record to be involved in the sort, not 
>just the IP's.

I long ago gave up trying to decipher the runes to make sort/icetool work 
properly. Even the exits didn't help sometimes.
Flick it to a zLinux instance and use GNU sort - you can use the "dot" as a key 
separator, and sort in one command. As Martin points out, any header/trailers 
may (will ) need particular attention.
Not too surprisingly the perl monks have also had had a say on this - several 
times - but I'd forgo perl in this instance.

Shane ...

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

MARKSANDSPENCER.COM
________________________________
 Unless otherwise stated above:
Marks and Spencer plc
Registered Office:
Waterside House
35 North Wharf Road
London
W2 1NW

Registered No. 214436 in England and Wales.

Telephone (020) 7935 4422
Facsimile (020) 7487 2670

www.marksandspencer.com

Please note that electronic mail may be monitored.

This e-mail is confidential. If you received it by mistake, please let us know 
and then delete it from your system; you should not copy, disclose, or 
distribute its contents to anyone nor act in reliance on this e-mail, as this 
is prohibited and may be unlawful.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to