[Quickfix-developers] =?iso-8859-1?Q?R=E9f=2E_=3A_RE=3A_[Quickfix-developers]_Problem_with?= repeat
Brought to you by:
orenmnero
From: <ili...@bn...> - 2004-01-23 10:24:17
|
Thanks for your answer Oren. Here's a slightly simplified version of my code. no_allocs & no_misc_fees are the integer values of the fields NoAllocs and NoMiscFees. All the other variables are string containing the value of the corresponding FIX field. Please assume that they are initialised correctly within the first "for" loop. FIX41::Allocation::NoAllocs groupNoAllocs ; for (int i=0 ; i < no_allocs ; i++){ if (account.length()>0) groupNoAllocs.set( FIX::AllocAccount ( account ) ); if (shares.length()>0) groupNoAllocs.set( FIX::AllocShares ( atoi( shares ) ) ); // and so on and so forth if (accruedinterestamt.length()>0) groupNoAllocs.set( FIX::AccruedInterestAmt ( atof( accruedinterestamt) ) ); if (settlinstmode).length()>0) groupNoAllocs.set( FIX::SettlInstMode ( atoi( settlinstmode ) ) ); if (no_misc_fees > 0) { FIX41::Allocation::NoAllocs::NoMiscFees groupNoMiscFees ; for (int k=0; k<no_misc_fees; k++) { if (miscfeeamt.length()>0) groupNoMiscFees.set( FIX::MiscFeeAmt ( atof( miscfeeamt ) ) ); if (miscfeecurr.length()>0) groupNoMiscFees.set( FIX::MiscFeeCurr ( miscfeecurr ) ); if (miscfeetype.length()>0) groupNoMiscFees.set( FIX::MiscFeeType ( miscfeetype ) ); groupNoAllocs.addGroup(groupNoMiscFees); } } message.addGroup(groupNoAllocs); } } This is the message we send: 8=FIX.4.1 9=781 35=J 34=7 49=FIXTEST 52=20040123-10:03:51 56=TEST 6=16.061700 15=EUR 22=2 48=7118047 53=87850 54=1 55=Official Confirmation to follow 60=20040121-08:21:04 63=6 64=20040126 70=005157150011 71=0 73=1 11=MANUAL 37=00902020 75=20040121 78=2 // 1st Alloc Repeating Group 79=ACCOUNT1 80=87850 76=BROKER1 109=CLIENT1 12=4233.06 13=3 153=16.109885 154=1415253.41 119=1415253.41 120=EUR 136=2 // MiscFee Repeating Groups 137=111 138=EUR 139=1 137=222 138=USD 139=2 // 2nd Alloc Repeating Group 79=ACCOUNT2 80=90000 76=BROKER2 109=CLIENT2 12=8466.06 13=1 153=32.109885 154=1415253.41 119=1415253.41 120=EUR 136=6 // MiscFee Repeating Groups 137=111 138=EUR 139=1 // shouldn't be here 137=222 138=USD 139=2 // shouldn't be here 137=333 138=EUR 139=3 137=444 138=USD 139=4 137=555 138=GBP 139=5 137=666 138=SGD 139=6 107=SUEZ ORD EUR 2 SHS 118=1415253.410000 124=0 10=078 Many thanks, Ilyas Internet OM...@ri... - 22/01/2004 22:36 Pour : Ilias USAL, quickfix-developers cc : Objet : RE: [Quickfix-developers] Problem with repeating groups Can you post the code you are using to create the message as well as the results from the toString call? --oren -----Original Message----- From: ili...@bn... [mailto:ili...@bn...] Sent: Thursday, January 22, 2004 11:05 AM To: qui...@li... Subject: [Quickfix-developers] Problem with repeating groups Hello, I'm getting a strange behaviour when I send a FIX 41 allocation message. The message contains 2 NoAllocs repeating groups, and each one of those groups contains 2 NoMiscFees repeating groups. For instance: 1st NoAlloc repeating group: 136=2 137=1111 138=EUR 139=1 137=2222 138=EUR 139=1 2nd NoAlloc repeating group: 136=2 137=3333 138=EUR 139=1 137=4444 138=EUR 139=1 When I send the message, I get: 1st NoAlloc repeating group is correct: 136=2 137=1111 138=EUR 139=1 137=2222 138=EUR 139=1 2nd NoAlloc repeating group contains both repeating groups: 136=4 137=1111 138=EUR 139=1 137=2222 138=EUR 139=1 137=3333 138=EUR 139=1 137=4444 138=EUR 139=1 I do create the repeating group for each new NoAlloc repeating group with: FIX41::Allocation::NoAllocs::NoMiscFees groupNoMiscFees ; Do you guys know how to solve this? Many thanks, Ilyas This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. --------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers This message and any attachments (the "message") is intended solely for the addressees and is confidential. If you receive this message in error, please delete it and immediately notify the sender. Any use not in accord with its purpose, any dissemination or disclosure, either whole or partial, is prohibited except formal approval. The internet can not guarantee the integrity of this message. BNP PARIBAS (and its subsidiaries) shall (will) not therefore be liable for the message if modified. --------------------------------------------- Ce message et toutes les pieces jointes (ci-apres le "message") sont etablis a l'intention exclusive de ses destinataires et sont confidentiels. Si vous recevez ce message par erreur, merci de le detruire et d'en avertir immediatement l'expediteur. Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est interdite, sauf autorisation expresse. L'internet ne permettant pas d'assurer l'integrite de ce message, BNP PARIBAS (et ses filiales) decline(nt) toute responsabilite au titre de ce message, dans l'hypothese ou il aurait ete modifie. |