Find invisible characters

Introduction

Lately I had to debug a problem for one of the customers. They had a load process in Turbo Integrator which would give minor errors on an element, a company. The company is called '3CN3GA'. The relational table that is queried for its data also contains the name '3CN3GA'. Howcome this could give an error in a CellPutN in TM1 ?

The customer was stumped and asked for advice. While first doing some manual checks in the Subset Editor, I wrote a useful TI process to debug this situation, see below. Feel free to use it.

Debug code

vDim = 'Company';
vIndex = 811;

vElement = Dimnm( vDim, vIndex );


DataSourceAsciiQuoteCharacter = '';
DataSourceAsciiDelimiter = ', ';

i = 1;
While( i <= Long( vElement ));

   AsciiOutput( 'test.txt',
      'Element: ' | vElement,
      'Length: ' | NumberToString( Long( vElement )),
      'Character n°: ' | NumberToString( i ),
      'Character: ' | Subst( vElement, i, 1 ),
      'Ascii code: ' | NumberToString( Code( vElement, i ) ) );

   i = i + 1;

End;

The output of the debug code is a text file. That cleared up the haze for the customer :-)




Homepage

Section contents

About Wim

Wim Gielis is a Business Intelligence consultant and Excel expert

Other links