Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Add comma to end of the record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sun_job

New User


Joined: 18 Sep 2007
Posts: 73
Location: Bangalore

PostPosted: Fri Dec 20, 2013 2:28 pm    Post subject: Add comma to end of the record
Reply with quote

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
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Fri Dec 20, 2013 3:18 pm    Post subject: Reply to: Add comma to end of the record
Reply with quote

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
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Dec 23, 2013 10:51 pm    Post subject:
Reply with quote

Here is the link for the "Smart DFSORT Tricks" publication that Bill mentioned.

http://www.ibm.com/support/docview.wss?uid=isg3T7000094
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Squeeze record left so that zeroes ar... Vignesh Sid SYNCSORT 5 Fri Nov 10, 2017 1:40 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us