Question Lucas Galdino · Apr 27, 2023

import global (2012.5 to 2018.1.4)

Dear experts,
Please, could you help me?

Im trying import a global:

ACB> K ^GlobalManualSend
ACB> D $System.OBJ.Load("C:\Users\BNAPC\GlobalManualSend.xml")
ACB> Set sc = ##class(%Studio.Project).InstallFromGbl("^GlobalManualSend","fv")

But is returning a error about version:

Please, could you help me about it?

Thank you.

Product version: Caché 2018.1

Comments

Pietro Montorfano · May 10, 2023

why don't you use ^%GOF and ^%GIF? They should be compatible i think.
Else the "bad" workaround is do something dirty, you could try to:

Create a new DB in the old instance
copy the global in that db
copy the db on the new instance
attach the db
move your global where you like

Don't know if this works, it "should"

0
Alex Woodhead  May 16, 2023 to Pietro Montorfano

Great point Pietro. Experienced similar challenge for a global.

Between Cache 2010.2 and IRIS 2019.1 I needed to use ^%GOF and ^%GIF.

Also as global was mapped to different database, I needed to change from Namespace to Database Directory context for %GOF to export the data.

0
Pietro Montorfano  May 17, 2023 to Alex Woodhead

yes if you have the global mapped in some different db, GOF will tell you so you need to go first with ^%GD to display the mapping, zn to that db and use ^%GOF.

^%GIF can be used anywhere inside the Namespace.

0
Enrico Parisi · May 10, 2023

The problem/error is importing the project/code from the global, not importing the global itself.

My guess is that the code has been exported in deployed mode without source, so it can be imported only in the same version. If so, you need the source to recompile.

Enrico

0
Pietro Montorfano  May 15, 2023 to Enrico Parisi

Ok, if we are talking about code in deployed mode you simply can't do this. You must get a code compiled for your actual version.

You can try with $SYSTEM.OBJ.Export which export the obj, but you will probably get the same error.

0