/ Cognos

Definition of system lines in Cognos TM1 Subset files (.sub)

In this article I will disclose information about how Cognos TM1 stores information about dimensions subsets in .sub files. This information can be usefull if you are Cognos TM1 developer and need to automatically change many subsets in some way, for example: turn on/off expand above in multiple subsets, find what subsets of dimension have some element. Of cource there are a lot more ways how you can use this information.

There are 2 more simular articles about Cognos TM1 system codes in files:

  1. Definition of system lines in Cognos TM1 Views files (.vue);
  2. Definition of system lines in Cognos TM1 Process files.

1

Cognos TM1 subsets can be created in three different ways:

  • as list of all elements;
  • as custom list of elements;
  • using MDX expression.

Consequently files for these three types of subsets have some difference, thus I will divide description in three sections.

All elements

283,100 – encoding of file, 100 for utf8;
284,"SubD1" – name of subset;
11,20190730094532 – time of last edit in format (YYYYMMDDHHMMSS);
274,AliasName — name of alias that is used for this subset or empty if alias does not used;
18,0 – in my models it usually equals to 0 and I don't know it purpose;
275, – used when created with MDX or empty otherwise;
278,1 – 1 if subset contains all elements of dimension, 0 otherwise;
281,0 – 1 if subset is expanded above, 0 otherwise.

Custom list of elements

Distinguished codes from "All elements" syntax: 281 and 270.

283,100 – encoding of file, 100 for utf8;
284,"SubD1" – name of subset;
11,20190730094532 – time of last edit in format (YYYYMMDDHHMMSS);
274,AliasName — name of alias that is used for this subset or empty if alias does not used;
18,0 – in my models it usually equals to 0 and I don't know it purpose;
275, – used when created with MDX or empty otherwise;
278,0 – 1 if subset contains all elements of dimension, 0 otherwise;
281,0 - 1 if subset is expanded above, 0 otherwise.
270,4 - after this code list of custom chosen elements is located;
Total
D1.EL1
D1.EL2
D1.EL3

Created with MDS

Distinguished codes from "All elements" syntax: 275, 281, 270.

283,100 – encoding of file, 100 for utf8;
284,"SubD1" – name of subset;
11,20190730094532 – time of last edit in format (YYYYMMDDHHMMSS);
274,AliasName — name of alias that is used for this subset or empty if alias does not used;
18,0 – in my models it usually equals to 0 and I don't know it purpose;
275,14 – If number is presented after this code it tells Cognos that MDX is used for creating this subset. 14 is length of MDX string.
{[D1].members}
278,0 – 1 if subset contains all elements of dimension, 0 otherwise;
281,0 – 1 if subset is expanded above, 0 otherwise.
270,0 – as subset created as MDX this code have 0 custom choosen elements;