# Encoding the Template ID for a Dynamic Template Reference

**URL:** https://forum.fixtrading.org/t/encoding-the-template-id-for-a-dynamic-template-reference/1128
**Category:** General Q&A
**Tags:** xid\_169775, imported, fast-protocol
**Created:** [November 18, 2009, 9:43pm UTC](https://forum.fixtrading.org/t/encoding-the-template-id-for-a-dynamic-template-reference/1128 "2009-11-18T21:43:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![dalewilson\_x](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dalewilson\_x](https://forum.fixtrading.org/u/dalewilson_x)
#### Post date: [November 18, 2009, 9:43pm UTC](https://forum.fixtrading.org/t/encoding-the-template-id-for-a-dynamic-template-reference/1128/1 "2009-11-18T21:43:34Z")

</div>

Imported from previous forum

---

<div class="post-metadata">

### Author: ![dalewilson\_x](https://avatars.discourse-cdn.com/v4/letter/d/eada6e/32.png) [@dalewilson\_x](https://forum.fixtrading.org/u/dalewilson_x)
#### Post date: [November 18, 2009, 9:43pm UTC](https://forum.fixtrading.org/t/encoding-the-template-id-for-a-dynamic-template-reference/1128/2 "2009-11-18T21:43:34Z")

</div>

I need some clarification concerning the handling of the Template ID for a dynamic template reference.

Given the following two quotes from FAST[sm] Specification 1.x.1:

From: Section 6.4 Template Reference Instruction

A dynamic reference specifies that a presence map and a template identifier are present in the stream. The processing continues with the template indicated by the identifier as the current template. The representation in the transfer encoding is a segment.

From: Section 10 Transfer Encoding

# A segment has a header consisting of a Presence Map followed by an optional Template Identifier. The segment has a template identifier either if it is a message segment, or if the segment appears as the result of a dynamic template reference instruction. A template identifier is encoded as if a copy operator was specified. The operator uses the global dictionary and has an internal key common to all template identifier fields. This means that a segment with a template identifier does not always contain the template identifier physically. However, the first bit in the presence map is allocated by its copy operator.

The question is, does the presence map for a dynamic template contain a bit for the template ID of the dynamic template? Or to ask the same question another way, is the TemplateID of a dynamic template encoded as if a copy operator was specified?

I would tend to think the TemplateID does use a presence map bit except for the phrase that says, “… a presence map and a template identifier are present in the stream” which is not always true for the template identifier if the copy operator is being used.

Thanks,

## Dale

Dale Wilson  
Principal Software Engineer  
Object Computing, Inc. ([www.ociweb.com](http://www.ociweb.com))  
Lead developer for QuickFAST (http:www.quickfast.org)

---

<div class="post-metadata">

### Author: ![davidrosenborg30\_x](https://avatars.discourse-cdn.com/v4/letter/d/7ea924/32.png) [@davidrosenborg30\_x](https://forum.fixtrading.org/u/davidrosenborg30_x)
#### Post date: [November 19, 2009, 10:07pm UTC](https://forum.fixtrading.org/t/encoding-the-template-id-for-a-dynamic-template-reference/1128/3 "2009-11-19T22:07:23Z")

</div>

Yes it has a bit for an implicit copy operator for the TID.

/David

> I need some clarification concerning the handling of the Template ID for  
> a dynamic template reference.
> 
> Given the following two quotes from FAST[sm] Specification 1.x.1:
> 
> From: Section 6.4 Template Reference Instruction
> 
> A dynamic reference specifies that a presence map and a template  
> identifier are present in the stream. The processing continues with the  
> template indicated by the identifier as the current template. The  
> representation in the transfer encoding is a segment.
> 
> From: Section 10 Transfer Encoding
> 
> # A segment has a header consisting of a Presence Map followed by an optional Template Identifier. The segment has a template identifier either if it is a message segment, or if the segment appears as the result of a dynamic template reference instruction. A template identifier is encoded as if a copy operator was specified. The operator uses the global dictionary and has an internal key common to all template identifier fields. This means that a segment with a template identifier does not always contain the template identifier physically. However, the first bit in the presence map is allocated by its copy operator.
> 
> The question is, does the presence map for a dynamic template contain a  
> bit for the template ID of the dynamic template? Or to ask the same  
> question another way, is the TemplateID of a dynamic template encoded as  
> if a copy operator was specified?
> 
> I would tend to think the TemplateID does use a presence map bit except  
> for the phrase that says, “… a presence map and a template identifier  
> are present in the stream” which is not always true for the template  
> identifier if the copy operator is being used.
> 
> Thanks,
> 
> ## Dale
> 
> Dale Wilson Principal Software Engineer Object Computing, Inc.  
> ([www.ociweb.com](http://www.ociweb.com)) Lead developer for QuickFAST (http:www.quickfast.org)
