Getting FieldName for particular value

View: New views
2 Messages — Rating Filter:   Alert me  

Getting FieldName for particular value

by crazy4venu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear all,

I have a fix message and i need to convert into fix field values and names so the output should be in this format

8=FIX.4.4 9=112 35=D 11=neww-1222068480593 21=1 38=100 40=2 44=10 54=1 55=ght 59=0 60=20080922-07:34:05.296 167=CS 10=173



BeginString: FIX.4.4
BodyLength: 247
MsgSeqNum: 5
MsgType: s
SenderCompID: sender
SendingTime: 20060319-09:08:20.881
TargetCompID: target
SecurityIDSource: 8
OrdType: 2
Price: 9
SecurityID: ABC
Symbol: ABC
TransactTime: 20060319-09:08:19
CrossID: 184214
CrossType: 2
CrossPrioritization: 0
NoSides: 2
CheckSum: 056


it is only a sample taken from Quick fix emails. so can anyone please tell how do i parsed FIX messages ?


Regards
Venu




Re: Data dictionary

by crazy4venu :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Dear All,

i have tried this sample code for pulling the data dictionary but i don't get all the fields and their tag values

 FIX::DataDictionary dd("FIX42.xml");
   FIX::Message msg=(FIX::Message)text.c_str();
   FIX::FieldMap fieldmap;
   string str,str2;
   for (FIX::FieldMap::iterator i = msg.begin (), e = msg.end (); i != e; ++i)
   {
   dd.getFieldName(i->first,str2);
      cout <<str2<<':'<< i->first << '=' << i->second <<"\n";
 
   }



 let me know  can anyone tried on this ?

crazy4venu wrote:
Dear all,

I have a fix message and i need to convert into fix field values and names so the output should be in this format

8=FIX.4.4 9=112 35=D 11=neww-1222068480593 21=1 38=100 40=2 44=10 54=1 55=ght 59=0 60=20080922-07:34:05.296 167=CS 10=173



BeginString: FIX.4.4
BodyLength: 247
MsgSeqNum: 5
MsgType: s
SenderCompID: sender
SendingTime: 20060319-09:08:20.881
TargetCompID: target
SecurityIDSource: 8
OrdType: 2
Price: 9
SecurityID: ABC
Symbol: ABC
TransactTime: 20060319-09:08:19
CrossID: 184214
CrossType: 2
CrossPrioritization: 0
NoSides: 2
CheckSum: 056


it is only a sample taken from Quick fix emails. so can anyone please tell how do i parsed FIX messages ?


Regards
Venu


LightInTheBox - Buy quality products at wholesale price!