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

In reply to Re^2: Merging 2 lines based on a string by vsmeruga
in thread Merging 2 lines based on a string by vsmeruga

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.