Global names must be no more than 31 characters in IRIS, but OK in Ensemble 2018?
We're upgrading to IRIS 2020.1 from Ensemble 2018.x.
I have a lookup table class that compiles fine in Ensemble but in IRIS causes the following compilation error: "ERROR #9101: Global name 'HH.LookupLabResultsToPhysiciansD' for 'IDLocation' is too long, must be no more than 31 characters in length."
Is this length limitation a new restriction or could I have done something years ago to increase the maximum character length.
Thanks,
Jim
Product version: IRIS 2020.1
The 31-character limitation is there in 2018 (I'm using 2017 for this demonstration) - although anything longer doesn't technically error out, only the first 31 characters are recognized.
A quick demo I pulled from a test server:
I underlined the characters that are 'ignored' - you can see on the ZWRITE command that the last 'D' (or anything after it) isn't displayed, and you can type all sorts of characters after that final 'D' and it still changes the 'base' 31-character global.
InterSystems probably put that check in because folks were using longer global names thinking all of the characters were significant, but some data was getting changed inadvertently.
Does that help?
Thank you Roger. I wish it were flagged as a warning. Since it's an error, I suspect it's no longer accepting it but truncating internally. Thanks!
Jim
With the global name lengths, there are two pitfalls,
- first, names could have arbitrary lengths, but only the first 31 characters are considered, but this was already mentioned (Roger Merchberger)
- second, a global name can contain a period ("."), but the first (after the caret) or the last character must not be a period, where at "last" means, the period may not appear at the position 31.
The following short test shows this.
the output is:
i = 34..37: always the same global (^abcdefghijklmnopqrstuvwxyz1234A) hence, the same content
i = 33: the last character is a period, hence a syntax error
i = 30..32: different globals,
and the global name length is always 31 characters long.
By the way, if you start this example with
which is the preferred method over
the you end up with a cropped value in glb
Roger is correct. I wonder if the error is controllable though through the cpf.
The rules on global names - linked to the temporary doc location -
http://dreamymclean.intersystems.skytapdns.com:52773/csp/docbook/Doc.View.cls?KEY=GGBL_structure
Hi @Jim Dolson ,
This was a feature introduced in 2018.1+
I believe this is something you can change using some setting but this was introduced to improve performance.
Please see the documentation for more deatils: http://ubuntu:52773/iris/csp/docbook/Doc.View.cls?KEY=GOBJ_persobj_intro...
(tem server link : http://dreamymclean.intersystems.skytapdns.com:52773/csp/docbook/DocBook... )
Hope this helps.
Regards,
Mary
This new error is indeed a breaking change in InterSystems IRIS 2019.3, as described in the 2020.1 release notes. Since I unfortunately can't link to them at the moment, I'll quote the relevant section from the upgrade compatibility checklist:
I don't believe that you can disable this validation.
Social networks
InterSystems resources
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue
Log in or sign up
Log in or create a new account to continue