View previous topic :: View next topic
|
Author |
Message |
sun_job
New User
Joined: 18 Sep 2007 Posts: 73 Location: Bangalore
|
|
|
|
Hi All,
I have a requirement to add comma to all records and add closing bracket to end of records in a file.
Can we achieve this using ICETOOL/SORT. Below is the input
Code: |
'1000343'
'1000348'
'1000350'
'1000352'
|
The output should be
Code: |
'1000343',
'1000348',
'1000350',
'1000352')
|
Any help in this regard is appreciated |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Locate "Add comma at end of all records except the last" in the "Smart DFSORT Tricks" publication.
You will need to add some OUTFIL processing, an IFTHEN to look at the position where the comma is on all but the final record, if it is space, change it to ")". |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
Back to top |
|
|
|