Hi ,
I have a question. If you can help me I would really appreciate it.
I am attaching a file containing a few records. I am trying to load them
into a table. However some records have a "return" (enter) in middle of
the record which splits the record into 2 or 3.
the fields are divides with bars ("|". Every line has to have 57 bars.
How do I say in awk that if a line does not have 57 bars it should join
it with the next line?
Please let me know of any solutions.
Thanks
Ahuva
/**This file contains 2 records. (each starting with 37.... The problem is that the first record is divided into 3**/
379331198|MPTPLUS|Pollard, John and Bonnie|||John Pollard and Bonnie Pollard||John Pollard and Bonnie Pollard|721 Maple Ridge Road||Milford|OH|45150|US|||285-26-7575|CASH||9/30/1999 0:00:00|A|1|6/30/1999 0:00:00|Q|1|Q|0||1|Mr. and Mrs. Pollard||O|||||||||||||0|||1|0|0||1|1|V||0.00||RCA 379331201|MPT|Juniet, Mary|Moderate||Mary Juniet||Mary Juniet|9830 Regatta Drive #101||Cincinnati|OH|45252|US|||289-57-6056|CASH||9/30/1999 0:00:00|A|1|12/31/1999 0:00:00|Q|1|Q|0|10/11/99 assets to be transferred out.
12/14/99 - per Chris Kiley - client decided she wanted this account under management. 3-31-00 Per Chris Kiley, account should be closed.|1|Ms. Juniet||C||||||||4/13/2000 0:00:00|ADMIN|1.58|3/31/2000 0:00:00||0|||1|0|0||1|1|V||0.00||
379330671|MPTPLUS|Cox, James|||James Cox|Rollover IRA|James Cox|10216 Dewhill||Cincinnati|OH|45251|US|||271-36-2689|CASH||9/30/1999 0:00:00|A|1|6/30/1999 0:00:00|Q|1|Q|0||1|Mr. Cox||O|||||||||||||0|||1|0|0||1|1|V||0.00||RCA
I have a question. If you can help me I would really appreciate it.
I am attaching a file containing a few records. I am trying to load them
into a table. However some records have a "return" (enter) in middle of
the record which splits the record into 2 or 3.
the fields are divides with bars ("|". Every line has to have 57 bars.
How do I say in awk that if a line does not have 57 bars it should join
it with the next line?
Please let me know of any solutions.
Thanks
Ahuva
/**This file contains 2 records. (each starting with 37.... The problem is that the first record is divided into 3**/
379331198|MPTPLUS|Pollard, John and Bonnie|||John Pollard and Bonnie Pollard||John Pollard and Bonnie Pollard|721 Maple Ridge Road||Milford|OH|45150|US|||285-26-7575|CASH||9/30/1999 0:00:00|A|1|6/30/1999 0:00:00|Q|1|Q|0||1|Mr. and Mrs. Pollard||O|||||||||||||0|||1|0|0||1|1|V||0.00||RCA 379331201|MPT|Juniet, Mary|Moderate||Mary Juniet||Mary Juniet|9830 Regatta Drive #101||Cincinnati|OH|45252|US|||289-57-6056|CASH||9/30/1999 0:00:00|A|1|12/31/1999 0:00:00|Q|1|Q|0|10/11/99 assets to be transferred out.
12/14/99 - per Chris Kiley - client decided she wanted this account under management. 3-31-00 Per Chris Kiley, account should be closed.|1|Ms. Juniet||C||||||||4/13/2000 0:00:00|ADMIN|1.58|3/31/2000 0:00:00||0|||1|0|0||1|1|V||0.00||
379330671|MPTPLUS|Cox, James|||James Cox|Rollover IRA|James Cox|10216 Dewhill||Cincinnati|OH|45251|US|||271-36-2689|CASH||9/30/1999 0:00:00|A|1|6/30/1999 0:00:00|Q|1|Q|0||1|Mr. Cox||O|||||||||||||0|||1|0|0||1|1|V||0.00||RCA