Optional default operator with no initial value

Imported from previous forum

What are the differences between a field with no operator and the field using the default operator?

For example, given this template are my following assumptions for decoding correct?

<template name=“MyTemplate” ns=“http://www.fixprotocol.org/ns/fix/FIXT.1.1”;>

<string name=“bar” presence="optional”/>






<string name=“fi” presence="optional”>


<string name=“fo” presence="optional”>


  1. ‘foo’ is manditory and has no presence bit

  2. when the presense bit is unset for ‘bar’, its value is considered absent

  3. ‘baz’ is manditory has no presence bit

  4. ‘bop’ is also manditory and has no presence bit so the initial value is redundant

  5. if the presense bit is unset for ‘fi’, it will cause an error [ERR S5] as it has no initial value

  6. when the presense bit is unset for ‘fo’, its value will always be “fum”

If my assumptions are correct, I can’t see a scenerio where you would ever define an optional default operator unless you are also going to define an initial value for it. However, in one of the data-feeds that I am currently decoding ,there are several optional default operators with no inital values defined in the xml.

Thanks,

Paul

[Repost]

A field with a default operator uses a bit in the presence map. If the bit is set, the value of the field is present in the stream. If the bit is not set, the value is the initial value or NULL if no initial value is supplied.

A field with no operator must always have a value, which can be NULL, in the stream.

  1. Yes
  2. No, no bit is used since there is no operator. A NULL value in the stream must be used to indicate absence.
  3. No, baz has a bit in the presence map. But since it is mandatory and does not provide an initial value, it should generate an error if the bit was unset. So this combination is meaningless.
  4. No, bop has a bit in the presence map (see first paragraph above)
  5. No, if the presence bit is unset, the field is considered absent.
  6. Yes

/David

What are the differences between a field with no operator and the field
using the default operator?

For example, given this template are my following assumptions for
decoding correct?

<template name=“MyTemplate”
ns=“http://www.fixprotocol.org/ns/fix/FIXT.1.1”;>
<string name=“bar” presence="optional”/>
<string
name=“fi” presence="optional”> <string name=“fo”
presence="optional”>

  1. ‘foo’ is manditory and has no presence bit

  2. when the presense bit is unset for ‘bar’, its value is
    considered absent

  3. ‘baz’ is manditory has no presence bit

  4. ‘bop’ is also manditory and has no presence bit so the initial value
    is redundant

  5. if the presense bit is unset for ‘fi’, it will cause an error [ERR
    S5] as it has no initial value

  6. when the presense bit is unset for ‘fo’, its value will always be
    “fum”

If my assumptions are correct, I can’t see a scenerio where you would
ever define an optional default operator unless you are also going to
define an initial value for it. However, in one of the data-feeds that I
am currently decoding ,there are several optional default operators with
no inital values defined in the xml.

Thanks,

Paul

Shouldn’t case 3 signal an error [ERR S5] according to section 6.3.4 of the spec?
“Unless the field has optional presence, it is a static error [ERR S5] if the instruction context has no initial value.”

Thanks,

George

[Repost]

A field with a default operator uses a bit in the presence map. If the
bit is set, the value of the field is present in the stream. If the bit
is not set, the value is the initial value or NULL if no initial value
is supplied.

A field with no operator must always have a value, which can be NULL, in
the stream.

  1. Yes
  2. No, no bit is used since there is no operator. A NULL value in the
    stream must be used to indicate absence.
  3. No, baz has a bit in the presence map. But since it is mandatory and
    does not provide an initial value, it should generate an error if the
    bit was unset. So this combination is meaningless. 4. No, bop has a
    bit in the presence map (see first paragraph above)
  4. No, if the presence bit is unset, the field is considered absent.
  5. Yes

/David

What are the differences between a field with no operator and the
field using the default operator?

For example, given this template are my following assumptions for
decoding correct?

<template name=“MyTemplate”
ns=“http://www.fixprotocol.org/ns/fix/FIXT.1.1”;>
<string name=“bar” presence="optional”/>

<string name=“fi” presence="optional”>
<string name=“fo” presence="optional”>

  1. ‘foo’ is manditory and has no presence bit

  2. when the presense bit is unset for ‘bar’, its value is considered
    absent

  3. ‘baz’ is manditory has no presence bit

  4. ‘bop’ is also manditory and has no presence bit so the initial
    value is redundant

  5. if the presense bit is unset for ‘fi’, it will cause an error [ERR
    S5] as it has no initial value

  6. when the presense bit is unset for ‘fo’, its value will always be
    “fum”

If my assumptions are correct, I can’t see a scenerio where you would
ever define an optional default operator unless you are also going to
define an initial value for it. However, in one of the data-feeds that
I am currently decoding ,there are several optional default operators
with no inital values defined in the xml.

Thanks,

Paul

Yes it should.

Shouldn’t case 3 signal an error [ERR S5] according to section 6.3.4 of
the spec? “Unless the field has optional presence, it is a static error
[ERR S5] if the instruction context has no initial value.”

Thanks,

George

Great thanks, makes perfect sense now.

Paul

[Repost]

A field with a default operator uses a bit in the presence map. If the
bit is set, the value of the field is present in the stream. If the bit
is not set, the value is the initial value or NULL if no initial value
is supplied.

A field with no operator must always have a value, which can be NULL, in
the stream.

  1. Yes
  2. No, no bit is used since there is no operator. A NULL value in the
    stream must be used to indicate absence.
  3. No, baz has a bit in the presence map. But since it is mandatory and
    does not provide an initial value, it should generate an error if the
    bit was unset. So this combination is meaningless. 4. No, bop has a
    bit in the presence map (see first paragraph above)
  4. No, if the presence bit is unset, the field is considered absent.
  5. Yes

/David

What are the differences between a field with no operator and the
field using the default operator?

For example, given this template are my following assumptions for
decoding correct?

<template name=“MyTemplate”
ns=“http://www.fixprotocol.org/ns/fix/FIXT.1.1”;>
<string name=“bar” presence="optional”/>

<string name=“fi” presence="optional”>
<string name=“fo” presence="optional”>

  1. ‘foo’ is manditory and has no presence bit

  2. when the presense bit is unset for ‘bar’, its value is considered
    absent

  3. ‘baz’ is manditory has no presence bit

  4. ‘bop’ is also manditory and has no presence bit so the initial
    value is redundant

  5. if the presense bit is unset for ‘fi’, it will cause an error [ERR
    S5] as it has no initial value

  6. when the presense bit is unset for ‘fo’, its value will always be
    “fum”

If my assumptions are correct, I can’t see a scenerio where you would
ever define an optional default operator unless you are also going to
define an initial value for it. However, in one of the data-feeds that
I am currently decoding ,there are several optional default operators
with no inital values defined in the xml.

Thanks,

Paul