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
 

 

Need to add new column with the amount

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

New User


Joined: 25 Jun 2008
Posts: 60
Location: chennai

PostPosted: Fri Nov 21, 2014 12:38 am    Post subject: Need to add new column with the amount
Reply with quote

Hi,

I have a file in the below mentioned record layout.

A 11-01-2014 10.0
A 11-01-2014 10.0
A 11-02-2014 20.0
B 11-01-2014 30.0
C 11-02-2014 20.0
C 11-03-2014 10.0

I need to creat the output file in the below format.

A 11-01-2014 10.0
A 11-01-2014 10.0 10.0
A 11-02-2014 20.0 20.0
B 11-01-2014 30.0 30.0
C 11-02-2014 10.0
C 11-03-2014 10.0 10.0

I need to add new column with the amount but written to the only last record of the First and second columns combination.

your help is appreciated.

Thanks,
Pradeep
Back to top
View user's profile Send private message

Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Fri Nov 21, 2014 2:09 am    Post subject:
Reply with quote

pradeepkit,

In the future, please try to use a more meaningful topic name.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Fri Nov 21, 2014 2:46 am    Post subject:
Reply with quote

Have you thought of JOINKEYS, IF THEN and BUILD? I think , that should help.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Fri Nov 21, 2014 6:45 pm    Post subject: Reply to: Need to add new column with the amount
Reply with quote

It is not quite clear what you want, but see if this and its links help.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Fri Nov 21, 2014 6:45 pm    Post subject: Reply to: Need to add new column with the amount
Reply with quote

It is not quite clear what you want, but see if this and its links help.
Back to top
View user's profile Send private message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 61
Location: India

PostPosted: Fri Nov 21, 2014 7:10 pm    Post subject:
Reply with quote

Quote:
I need to add new column with the amount but written to the only last record of the First and second columns combination.




Then,Why the 5th record is not appened with the amount ??

A 11-01-2014 10.0
A 11-01-2014 10.0 10.0
A 11-02-2014 20.0 20.0
B 11-01-2014 30.0 30.0
C 11-02-2014 10.0
C 11-03-2014 10.0 10.0

I believe you should use JOINKEYS,SEQNUM (giving your combination field).
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Fri Nov 21, 2014 8:30 pm    Post subject: Reply to: Need to add new column with the amount
Reply with quote

Arunkumar Chandrasekaran,

Yes, and why does the value for that record also change from 20.00 to 10.00 :-)

I think we should pause until all this is clarified.
Back to top
View user's profile Send private message
Arunkumar Chandrasekaran

New User


Joined: 01 Jun 2010
Posts: 61
Location: India

PostPosted: Sat Nov 22, 2014 1:22 am    Post subject:
Reply with quote

Yes Bill. You are right.
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 SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Amount field is getting corrupted whe... thesumitk SYNCSORT 5 Tue Oct 18, 2016 8:20 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


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