<div dir="ltr">Hi Lopez,<div><br></div><div><i><span style="font-family:arial,sans-serif;font-size:13px">I assume I won't get a </span><span style="font-family:arial,sans-serif;font-size:13px">"RequiredFieldMissing" error if the XML file shows required="N." So</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">I'll check first only where 'required="Y"' in the definition file</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">(after making sure it is set to "Y" for all fields my counterparty</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">requires).</span></i><br></div><div><br></div><div>I think you got it mixed up.</div><div><br></div><div>When a field is set to Required="Y" by your counter party then its safe for you to just get the field without checking (If they didn't set it, then your engine rejecting the message is a completely legal behavior (: ),</div>
<div>but on the other hand when they set the Required="N" meaning they can send it or not depending on some condition on their side, then its mandatory for you to check if it's set before getting the field.</div>
<div>Take for example if your counter party defines Tag 58 as optional for the ExecutionReport (35=8) and only sets it if your NewOrderSingle (35=D) was rejected with the reason for rejection, If you try to get that field when it's not set, your FIX engine would assume the message your received is incomplete as a field you require is not set, thereby rejecting the message, hence why you should always check Non-Required fields before trying to get them.</div>
<div><br></div><div><br></div><div><i><span style="font-family:arial,sans-serif;font-size:13px"><br></span></i></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 27, 2013 at 10:23 AM, Manuel Lopez <span dir="ltr"><<a href="mailto:lopez.post@gmail.com" target="_blank">lopez.post@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ola,<br>
Thanks, I had missed that IsSetField method. I assume I won't get a<br>
"RequiredFieldMissing" error if the XML file shows required="N." So<br>
I'll check first only where 'required="Y"' in the definition file<br>
(after making sure it is set to "Y" for all fields my counterparty<br>
requires).<br>
<br>
"3.The best way to check for existence of a field is to use the<br>
msg.IsSetField(Field) method, and its recommended to do this for all fields<br>
marked as optional by your counter party, because if you try to get a field<br>
in a message that is not set by your counter party your FIX engine would<br>
rejects the message citing the reason as Unconditionally Require Field<br>
Missing."<br>
<br>
--Manuel<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>
</blockquote></div><br></div>