View previous topic :: View next topic
|
Author |
Message |
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Hi, We have two files.
File-1:
Code: |
----+----1----+----2
RUMBAYR08D123
RUMBAYR09D198
RUMBAYR10D233
|
File-2:
Code: |
----+----1----+----2----+----3
ABCD1111 265 1012008
ABCD1111 5 2012008
ABCD2111 365 1012008
ABCD2111 5 2012008
ABCD1112 265 1012009
ABCD1112 5 2012009
ABCD1113 265 1012009
ABCD1113 5 2012009
ABCD1114 265 1012010
ABCD1114 5 2012010
|
I want the output in the below format:
Output:
Code: |
----+----1----+----2----+----3
RUMBA0800123
ABCD1111 265 1012008
ABCD1111 5 2012008
ABCD2111 365 1012008
ABCD2111 5 2012008
RUMBA0900198
ABCD1112 265 1012009
ABCD1112 5 2012009
ABCD1113 265 1012009
ABCD1113 5 2012009
RUMBA1000233
ABCD1114 265 1012010
ABCD1114 5 2012010
|
Thanks. |
|
Back to top |
|
|
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
Sorry, I hit the submit button instead of preview button |
|
Back to top |
|
|
ramsri
Active User
Joined: 18 Oct 2008 Posts: 380 Location: India
|
|
|
|
The additional requirement is to increment the number (11th column in File-1) by one (if '101' type records at 19 column in File-2 are equal to 1500) and write a seperate header followed by records as shown below:
Code: |
----+----1----+----2----+----3
RUMBA0800124
ABCD1111 265 1012008
ABCD1111 5 2012008
ABCD2111 365 1012008
ABCD2111 5 2012008
|
This is same for the 09 & 10 also. Please let me know if my requirement is clear.
Thanks. |
|
Back to top |
|
|
arvind.m
Active User
Joined: 28 Aug 2008 Posts: 205 Location: Hyderabad
|
|
|
|
I think this can be done thru COBOL program. |
|
Back to top |
|
|
|