View previous topic :: View next topic
|
Author |
Message |
pradeepkit Warnings : 1 New User
Joined: 25 Jun 2008 Posts: 60 Location: chennai
|
|
|
|
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 |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
pradeepkit,
In the future, please try to use a more meaningful topic name. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3051 Location: NYC,USA
|
|
|
|
Have you thought of JOINKEYS, IF THEN and BUILD? I think , that should help. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It is not quite clear what you want, but see if this and its links help. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
It is not quite clear what you want, but see if this and its links help. |
|
Back to top |
|
|
Arunkumar Chandrasekaran
New User
Joined: 01 Jun 2010 Posts: 63 Location: India
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Arunkumar Chandrasekaran
New User
Joined: 01 Jun 2010 Posts: 63 Location: India
|
|
|
|
Yes Bill. You are right. |
|
Back to top |
|
|
|