Peter smit · Jul 13, 2022

Error compiling cache code on iris


I'm trying to migrate a database from cache to iris but i get this from one of the classes on compiling.


ERROR #9101: Global name 'Jobcosting.JobActivityGroupGroupD' for 'IDLocation' is too long, must be no more than 31 characters in length.
  > ERROR #5030: An error occurred while compiling class 'Jobcosting.JobActivityGroup'

Product version: IRIS 2022.1
$ZV: IRIS for Windows (x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:16:40 EDT
0 169
Discussion (2)1
Log in or sign up to continue

Good morning Peter. 

I know what the problem is but I googled it anyway, and as usual, Intersystems explains it better than I do.

A global name may be up to 31 characters long (exclusive of the caret character prefix). You can specify global names that are significantly longer, but Caché treats only the first 31 characters as significant.

Global Structure | Using Caché Globals

It's probably worth mentioning that this was always the limit. Prior to IRIS 2020.1 (from memory) any characters after the first 31 were just ignored, so in the above example the global would be truncated to ^Jobcosting.JobActivityGroupGrou. There is now a hard stop in the class compiler that prevents global names longer than the limit as there was the potential for truncated global names to clash.