<div dir="ltr"><div class="gmail_default" style="font-size:small;color:#000000">It's no big deal to make the fields optional.  In fact, I think it's the correct action for you.</div><div class="gmail_default" style="font-size:small;color:#000000">

<br></div><div class="gmail_default" style="font-size:small;color:#000000">The engine assumes that you know what you're doing, so if you try to extract a field that isn't there, it assumes that it *should* be, and rejects the message.</div>

<div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">Thus, if you get a message where the ExecType requires 17, you should just try to extract it.  If the field is not present, the engine will throw a missing-field reject during this extraction.  The engine says: <i>I'm supposed to extract this, but it not there, so it's missing!</i>  This is the correct behavior, since now it's *them* who have screwed up.</div>

<div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">This basically saves you from having to do this all the time:</div><div class="gmail_default" style="font-size:small;color:#000000">

    if(field x is not present)</div><div class="gmail_default" style="font-size:small;color:#000000">      throw MissingFieldException(x);  // causes reject</div><div class="gmail_default" style="font-size:small;color:#000000">

<br></div><div class="gmail_default" style="font-size:small;color:#000000">This logic is built-in to the field extraction method.  (There are, of course, instances where such an if-check would be appropriate.)<br></div><div class="gmail_default" style="font-size:small;color:#000000">

<br></div><div class="gmail_default" style="font-size:small;color:#000000">-Grant</div><div class="gmail_default" style="font-size:small;color:#000000"><br></div><div class="gmail_default" style="font-size:small;color:#000000">

<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 21, 2013 at 4:59 PM, Øyvind Sævareid Ellefsen <span dir="ltr"><<a href="mailto:oyvind@ssc.no" target="_blank">oyvind@ssc.no</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="NO-BOK" link="blue" vlink="purple">
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Yeah, I know that every counterpart has it’s own variant.. but that is how it is<u></u><u></u></span></p>


<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks for your fast reply Grant, what I see in their spec is that as far as the execution report is in “pending”, it
 is not required. Sounds logic as well, since no order has been created yet. <u></u>
<u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">I will have a chat with them and see whether they would do anything with my rejection reply. In case of other Exec statuses,
 I believe I would need tag 17 and 37, so preferable I would not make them non-required.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Brgds<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Oeyvind Ellefsen<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <a href="mailto:quickfixn-bounces@lists.quickfixn.com" target="_blank">quickfixn-bounces@lists.quickfixn.com</a> [mailto:<a href="mailto:quickfixn-bounces@lists.quickfixn.com" target="_blank">quickfixn-bounces@lists.quickfixn.com</a>]
<b>On Behalf Of </b>Grant Birchmeier<br>
<b>Sent:</b> 21. november 2013 23:52<br>
<b>To:</b> Mailing list for QuickFIX/n<br>
<b>Subject:</b> Re: {{Quickfixn}} "required tag missing" in response to execution report<u></u><u></u></span></p><div><div class="h5">
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p>
<div>
<div>
<p class="MsoNormal"><span style>In the standard FIX 4.4 message spec, 17 and 37 are required fields of ExecReport, so it is not a bug.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style>Making it optional is a customization that your counterparty has made.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style>No problem, though.  You did exactly what you need to do, which is edit your DD xml file to make the fields optional.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style>These are likely not the only customizations that your counterparty has done.  You should get ahold of their specs and read through your DD file to make sure there are no other changes you need to make.  I would
 be very surprised if they didn't add other custom fields elsewhere.<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style>(Really, this is something that you have to do for every new counterparty you work with.  It seems nobody wants to use the default FIX definitions; they all have to make weird changes.)<u></u><u></u></span></p>


</div>
<div>
<p class="MsoNormal"><span style><u></u> <u></u></span></p>
</div>
<div>
<p class="MsoNormal"><span style>-Grant<u></u><u></u></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Thu, Nov 21, 2013 at 4:37 PM, Øyvind Sævareid Ellefsen <<a href="mailto:oyvind@ssc.no" target="_blank">oyvind@ssc.no</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I am doing some MARKET orders with FOK method, and I see that quickfix/n respons wih “Message 2 Rejected: Required tag missing (Field=17)”. However, this field
 is not required (according to my counterparts documentation) when the ExecType=”A”. In FIX4.4.xml it is either Required=”N” / “Y”, is this a bug in the quickfix/n, or is there any other way to handle this, or is it ignorable?</span><u></u><u></u></p>


<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">My application is obviously sending a reject to the counterpart. Here’s the conversation;</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"><a href="tel:20131121-22" target="_blank">20131121-22</a>:24:53.962 : 8=FIX.4.4 9=171 35=8 49=<counterpart> 56=<me> 34=5 52=20131121-22:24:34.884 11=140823115
 150=A 39=A 1=20009000000 55=GBP/USD 54=2 38=10000.00 44=0 15=GBP 59=4 151=10000.00 14=0 6=0 10=055
</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"><a href="tel:20131121-22" target="_blank">20131121-22</a>:24:53.966 : 8=FIX.4.4 9=114 35=3 34=5 49=<me> 52=20131121-22:24:53.965 56=<counterpart> 45=5 58=Required
 tag missing 371=17 372=8 373=1 10=063</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I had the same error with TAG 37, and I changed the OrderID to Required=”N”, then error on 17 popped up.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US">I see when I receive messages with 150=0 or 150=F, tag 17 and 37 is provided from my counterpart.</span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal"><span lang="EN-US"> </span><u></u><u></u></p>
<p class="MsoNormal">Brgds<u></u><u></u></p>
<p class="MsoNormal">Oeyvind Ellefsen<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com" target="_blank">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<p class="MsoNormal"><span style="background:white">Grant Birchmeier</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><b><span style="color:#3333ff;background:#ffcc00">Connamara Systems, LLC</span></b><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><b>Made-To-Measure Trading Solutions.</b><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Exactly what you need. No more. No less.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="http://connamara.com" target="_blank">http://connamara.com</a><u></u><u></u></p>
</div>
</div>
</div></div></div>
</div>

<br>_______________________________________________<br>
Quickfixn mailing list<br>
<a href="mailto:Quickfixn@lists.quickfixn.com">Quickfixn@lists.quickfixn.com</a><br>
<a href="http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com" target="_blank">http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font><span style="background-color:#000000"><span style="background-color:#ffffff">Grant Birchmeier</span></span></font><font><font color="#3333ff"><br>

</font></font></div><div><font><b><font color="#3333ff"><span style="background-color:#ffcc33"><span style="background-color:#ffcc66"><span style="background-color:#ffcc99"><span style="background-color:#ffffff"><span style="background-color:#ffcc00">Connamara Systems, LLC</span></span></span></span></span></font></b></font><br>

</div><div><font><b>Made-To-Measure Trading Solutions.</b></font></div><div><font>Exactly what you need. No more. No less.</font><font><b><font color="#3333ff"><br></font></b></font></div><div><font><a href="http://connamara.com" target="_blank">http://connamara.com</a><br>

</font></div>
</div>