· May 3, 2018

%Library.Global Export


I'm trying to export a global with this library %Library.Global with this call:

Do ##class(%Library.Global).Export(pstrNamespace, pstrGlobalName, pstrOutputPath,,,"-d")

When I call this method $ZERROR is setted to "<NOTOPEN>OpenDev+15^%Wprim"

Can someone tell me where is the problem on this?

Thanks a lot

Discussion (4)1
Log in or sign up to continue

Please, could you also post values of given variables pstrNamespacepstrGlobalNamepstrOutputPath? What OS/Caché version it is?
Try to also use "d" parameter instead of "-d" and check the status returned by method:

  Set sc = ##class(%Library.Global).Export(pstrNamespace, pstrGlobalName, pstrOutputPath,,,"-d")
  Do $system.OBJ.DIsplayError(sc)

It should return more information about the error.

Generally it tries to use device (file?) which was not opened, given line in version 2017.2.1 is:
    Xecute code Quit:'$t 0 Use dev Quit 1