Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 7315

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 Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us