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 Process Last Key of a record based on... naveen katkuri DFSORT/ICETOOL 5 Mon Nov 12, 2018 9:54 am
This topic is locked: you cannot edit posts or make replies. Get value from 2nd record and PUSH it... ashokakash JCL & VSAM 1 Wed Oct 17, 2018 11:41 am
No new posts Merge data from record pairs ashokakash DFSORT/ICETOOL 5 Wed Oct 17, 2018 11:38 am
No new posts Process only last key record in a fil... Naveen.katkuri24 DFSORT/ICETOOL 8 Tue Oct 09, 2018 9:39 am
No new posts SYNCSORT keep MIN/MAX record Cloink SYNCSORT 16 Mon Sep 17, 2018 3:00 pm

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