cancel
Showing results for 
Search instead for 
Did you mean: 

What is a 'region tag'?

Former Member
0 Kudos

We just upgraded to the first service pack for MDM 5.5, and I'm starting to write some Java to play with the repository. There appears to be a CatalogData.Login method that let's you specify a min/max number of pooled connections - very handy! However, there's an additional parameter called a 'region tag'. Does anyone know what this is?

The API documentation is woefully inadequate in this respect. Calling a parameter a 'region tag', and then indicating in the documention that a region tag is the region tag to use for the repository isn't that useful.

Specifying a blank region tag generates this exception:

a2i.core.StringException: No matching region tag

at a2i.common.CatalogData.LoadCatalogData(Unknown Source)

at a2i.common.CatalogData.Login(Unknown Source)

at com.xxx.dw.mdm.utils.ConnectionPool.getConnection(ConnectionPool.java:59)

Error code: 0x80000001 at com.xxx.dw.mdm.utils.Test.run(Test.java:26)

at com.xxx.dw.mdm.utils.Test.main(Test.java:21)

Error message : No message for RC (0x80000001)

So: what's a region tag?

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

That is the language and region you specify when you log in to the client tool.

Former Member
0 Kudos

Well, so it is.

In the previous version, it was called what it was - the language. (sigh) A small note to mention that this field was renamed would have been nice.

SAP, are you listening? This is a new tool, and good documentation is a must.

Thank DS - full points awarded.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ken

There are two language parameters which you can specify when working with the API:


1)       The data language – this is defined in the CatalogData.Login() function via the LanguageString/RegionTag parameter.

2)       The schema language – this is defined with the function CatalogData.SetCodeRegion(), and must  be called before CatalogData.Login(). If no schema language is defined, the schema language defaults to the data language.

e.g. CatalogData.SetCodeRegion(“English [US]”)

 

 

The implications of this are as follows:

1)       The function GetName() of CMFieldInfo and CMTable info returns the data language name.

2)       The new function GetCode() of CMFieldInfo and CMTableInfo returns the schema language name.

3)       When referring to fields or tables by name, you MUST use the schema language name. For example, when adding field names to a ResultSetDefintion.

 

·         NB.  1)  The function CatalogData.Login() will fail with ReturnCode = 6 (BAD_DATA) if you set a schema language for which not all table and field names exist.

·         NB   2) You cannot call CatalogData.SetCodeRegion() after logging into the catalog.

 

Former Member
0 Kudos

This code works:

<i>Catalog.Login("192.168.1.71", 2343, "Login", "pwd", "English [US]");</i>

So the region tag is the final parameter - <i>"English [US]"</i>

Former Member
0 Kudos

I forgot to present <i>Catalog</i> variable:

<i>a2i.common.CatalogData Catalog = new a2i.common.CatalogData();</i>