in reply to Re: Merging 2 lines based on a string
in thread Merging 2 lines based on a string

Hi vinoth I gave you the output in my post.
My inputfile will be like below
VSIN : VJ000A0WCCX5 ACCOUNT TYPE : VJ SETTLEMENT CURRENCY : USD TRADE DATE : 22-01- +12 VJRE 1556522 1 0234000759762 S 30-01-14 15,000,000.000- + 15,000,000.00 0.290000 73,506.94 VETS VJRE 1556524 1 0234000759763 S 30-01-14 15,000,000.000- + 15,000,000.00 0.290000 73,506.94 VETS VSIN : VJ000A0WCCX5 ACCOUNT TYPE : VJ SETTLEMENT CURRENCY : USD TRADE DATE : 23-04- +14 VJRE 1022786 1 0234000790324 S 25-04-14 85,000,000.000- + 15,000,000.00 0.300000 63,750.00 VETS VJRE 1022788 1 0234000790325 S 25-04-14 85,000,000.000- + 85,000,000.00 0.300000 63,750.00 VETS VJRE 1022790 1 0234000790326 S 25-04-14 85,000,000.000- + 85,000,000.00 0.300000 63,750.00 VETS VSIN : VJ000A0WCCX5 ACCOUNT TYPE : VJ SETTLEMENT CURRENCY : USD TRADE DATE : 25-04- +14 VJRE 1024906 1 0234000791296 S 30-04-14 75,000,000.000- + 75,000,000.00 0.310000 59,201.39 VETS VJRE 1024908 1 0234000791297 S 30-04-14 75,000,000.000- + 75,000,000.00 0.310000 59,201.39 VETS VSIN : VJ000A0WCCX5 ACCOUNT TYPE : VJ SETTLEMENT CURRENCY : USD TRADE DATE : 28-04- +14 VJRE 1026070 1 0234000791843 S 30-04-14 90,000,000.000- + 90,000,000.00 0.330000 167,291.67 VETS ISIN : VJ000A1ABC49 ACCOUNT TYPE : VJ SETTLEMENT CURRENCY : USD TRADE DATE : 05-01- +15 VJRE 1812943 1 0234000874452 B 07-01-15 8,500,000.000 + 8,771,500.41- 0.150000- 139.17- VETS ISIN : VJ000A1ABC49 ACCOUNT TYPE : VJ SETTLEMENT CURRENCY : USD TRADE DATE : 12-01- +15 VJRE 1917309 1 0234000876369 B 14-01-15 3,500,000.000 + 8,771,931.30- 0.200000- 185.58- PECT

Replies are listed 'Best First'.
Re^3: Merging 2 lines based on a string
by vsmeruga (Acolyte) on Feb 05, 2015 at 10:02 UTC
    Output format is like below
    Line1: VSIN .... (Space) SETTLEMENT CURRENCY .... Line2: VJRE ... Line3: VJRE ... Line4: VSIN .... (Space) SETTLEMENT CURRENCY .... Line5: VJRE .... Line6: VJRE .... Line7: VJRE... Line8: VSIN. ...(Space) SETTLEMENT CURRENCY....

      Please show us what you have tried and where it is failing you. Show us the perl code.

      Cheers, Sören

      Créateur des bugs mobiles - let loose once, run everywhere.
      (hooked on the Perl Programming language)

      Hi I am not a perl programmer. I am an architect. Can yo please let me + know if you need further information on this. Many Thanks

        This site is more for Perl programmers and people solving their problems and having fun with Perl.

        Maybe you can ask your programmers where your architecture cannot be implemented by them?

      I tried in Unix(awk command). And I got close answer. which I can get +away with it for the time being. Many Thanks for your time .