You ought to be able to do the "+1" in DFSORT, by the way. In case that 
changes the problem into a better one. :-)

Cheers, Martin

Martin Packer,
zChampion, Principal Systems Investigator,
Worldwide Banking Center of Excellence, IBM

+44-7802-245-584

email: martin_pac...@uk.ibm.com

Twitter / Facebook IDs: MartinPacker
Blog: 
https://www.ibm.com/developerworks/mydeveloperworks/blogs/MartinPacker



From:   "Sankaranarayanan, Vignesh" 
<vignesh.v.sankaranaraya...@marks-and-spencer.com>
To:     IBM-MAIN@listserv.ua.edu
Date:   16/04/2014 12:35
Subject:        Re: Sorting CSV data that begins with an IP address
Sent by:        IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu>



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:IBM-MAIN@LISTSERV.UA.EDU] On 
Behalf Of Shane Ginnane
Sent: 16 April 2014 12:30
To: IBM-MAIN@LISTSERV.UA.EDU
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 lists...@listserv.ua.edu 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 
741598. 
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to