I have a file that has lines that are deliminated with '^A', but some of the lines go for a few lines and I need those lines to be appended into one line.
All of the lines start with 'low debug' and end with ' " 0 '.
How can I read each line from start to finish without some of the data being screwed up because the middle of the line starts at a new line.
Here are some examples:
This is an example of a line that is correct from beginning to end:
low debug 2010/4/1 9:00:33.40 ICSNotificationAlarm Prodics01ics0001 ICS "1.0^AB^A7611^A1270130433400^A1965^A1963^A2^Am[0]=801^A10635^AProdfixcas11v2fix61^ACD
890/CM/ConsumerProxy@29002971^Am[1]=19002^A10635^AProdfixcas11v2fix61^ACD890/CM/ConsumerProxy@29002971^A" 0
Notice how the line is deliminated with ^A. I use those fields in the data that I need to capture.
Here is an example of one that is broken up into a few new lines which does not help because when I try to search for $7(the 7th value), my data gets all screwed up because that value is on a new line and since the value number starts over each time a new line begins, everything gets messed up.
low debug 2010/4/1 9:00:37.38 ICSNotificationAlarm Prodics01ics0001 ICS "1.0^AB^A7612^A1270130437380^A31829^A31827^A1^Am[0]=31806^A[[(ProdBC10x1OHServerHybri
dprdbc10b) ]] OhsSender(W_MAIN.ProdBC10x1HybridTradeServer4.Sender): : Exception while sending data to OHS.
-------- Exception --------
org.omg.CORBA.TIMEOUT: Request timed out after 10000065563 ns, falseNotifies(0). RequestId(2), typeId(IDL:orderHandlingServices/ManualOrderMaintenanceService
:1.0), operation(getQuoteQueryDataForProducts), orbName(ProdBC10x1OHServerHybridprdbc10b), iiopHost(prdbc10b), iiopPort(18202), tiopHost(prdbc10b), tiopPort(
18701) vmcid: 0x0 minor code: 0 completed: Maybe
-------- Trace ------------
com.cboe.ORBInfra.Transport.PendingRequestManager.waitForCompletion(PendingRequestManager.java:133)
com.cboe.IIOPTransport.IIOPClientConnection.receiveReply(IIOPClientConnection.java:529)
com.cboe.IIOPTransport.IIOPClientConnection.receiveReply(IIOPClientConnection.java:513)
com.cboe.IIOPTransport.IIOPClientConnection.receiveReply(IIOPClientConnection.java:507)
com.cboe.ORBInfra.ORB.GenericBindMediator.twoWaySendAndReceive(GenericBindMediator.java:259)
com.cboe.ORBInfra.ORB.DelegateImpl.invoke(DelegateImpl.java:693)
org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
com.cboe.idl.orderHandlingServices._ManualOrderMaintenanceServiceStub.getQuoteQueryDataForProducts(_ManualOrderMaintenanceServiceStub.java:519)
com.cboe.ohsadapters.par.orderHandling.ParManualOrderMaintenanceServiceProxyImpl.getQuoteQueryDataForProducts(ParManualOrderMaintenanceServiceProxyImpl.java:
325)
com.cboe.ohsadapters.par.orderHandling.formatters.outbound.TopOfTheSpreadBookRequestHandler.sendMessage(TopOfTheSpreadBookRequestHandler.java:52)
com.cboe.ohsadapters.par.orderHandling.formatters.OhsOutboundHandler.send(OhsOutboundHandler.java:96)
com.cboe.ohsadapters.par.orderHandling.OhsSender.doTask(OhsSender.java:120)
com.cboe.lwt.thread.ThreadTask.execute(ThreadTask.java:365)
com.cboe.lwt.thread.WorkerThread.run(WorkerThread.java:164)
java.lang.Thread.run(Thread.java:619)
^AProdOHSA00ParAdapter9pprdaps04aA^AParAdapter^A" 0
Notice here, the beginning of the first line starts with 'low debug', and the end of the last line ends with ' " 0 ' but every com.cboe is a new line along with a few others, like -------- Exception -------- and -------- Trace ------------ are new lines. I need this too all be one line.
Please help. Thanks!!!