go to post Eduard Lebedyuk · Jan 28, 2022 You can't call native api methods which write to device as is. If you need to call some piece of code which writes to device use this wrapper: /// Executes and returns device output /// pObj - OREF or class /// pMethod - instance or class method to execute respectively /// pArgs - additional arguments ClassMethod OutputToStr(pObj, pMethod, pArgs...) As %String [ ProcedureBlock = 0 ] { set tOldIORedirected = ##class(%Device).ReDirectIO() set tOldMnemonic = ##class(%Device).GetMnemonicRoutine() set tOldIO = $io try { set str="" //Redirect IO to the current routine - makes use of the labels defined below use $io::("^"_$ZNAME) //Enable redirection do ##class(%Device).ReDirectIO(1) if $isobject(pObj) { do $Method(pObj,pMethod,pArgs...) } elseif $$$comClassDefined(pObj) { do $ClassMethod(pObj,pMethod,pArgs...) } } catch ex { set str = "" } //Return to original redirection/mnemonic routine settings if (tOldMnemonic '= "") { use tOldIO::("^"_tOldMnemonic) } else { use tOldIO } do ##class(%Device).ReDirectIO(tOldIORedirected) quit str //Labels that allow for IO redirection //Read Character - we don't care about reading rchr(c) quit //Read a string - we don't care about reading rstr(sz,to) quit //Write a character - call the output label wchr(s) do output($char(s)) quit //Write a form feed - call the output label wff() do output($char(12)) quit //Write a newline - call the output label wnl() do output($char(13,10)) quit //Write a string - call the output label wstr(s) do output(s) quit //Write a tab - call the output label wtab(s) do output($char(9)) quit //Output label - this is where you would handle what you actually want to do. // in our case, we want to write to str output(s) set str=str_s quit } So in your case it would be something like: IRISObject data = (IRISObject) iris.classMethodObject(CACHE_CLASS_NAME, method, _args); String string = iris.classMethodString("SomeClass", "OutputToStr", data, "ToJSON") data.close();
go to post Eduard Lebedyuk · Jan 27, 2022 If you check Ens.Util.Log class where logs are stored, you'll notice that Text property is limited to 32 000 characters, so logging anything larger than that is impossible. There are several approaches you can take: Logging to files as described by @Jeffrey Drumm. I'd add that you can use %File:TempFilename to obtain a random but valid filename to write to. Alternatively use session id and timestamp to create the filename, with each session having a separate folder. Logging to streams. Use %Stream.GblChrCompress to save on space. JSON is very compressible. Use a debugging business operation. Create a business operation which accepts everything and either defers or just does nothing. Send a copy of your stream there. This way you get immediate access to a content from the Visual Trace.
go to post Eduard Lebedyuk · Jan 27, 2022 Assuming you need a detached signature: gpg --local-user [fingerprint] --sign --armor --output somefile.tar.xz.asc --detach-sig somefile.tar.xz Copied from Stack.
go to post Eduard Lebedyuk · Jan 27, 2022 Use TO_CHAR: write $tr($SYSTEM.SQL.Functions.TOCHAR($h, "YYYYMMDD HH mi ss"), " ")
go to post Eduard Lebedyuk · Jan 26, 2022 docker pull containers.intersystems.com/intersystemscorp/iris-community:2021.2.0.649.0 is probably docker pull containers.intersystems.com/intersystems/iris-community:2021.2.0.649.0 Interesting news. Question: as access to containers.intersystems.com requires a WRC account, how do prospects/new users/people without WRC access can get community version of InterSystems IRIS?
go to post Eduard Lebedyuk · Jan 26, 2022 Yes, file would probably be better if you need a lot of settings. Is ^%zStartupError something system-defined?
go to post Eduard Lebedyuk · Jan 26, 2022 Are there any news on docker hub publication? docker pull store/intersystems/iris-community:2021.2.0.649.0 Error response from daemon: manifest for store/intersystems/iris-community:2021.2.0.649.0 not found: manifest unknown: manifest unknown
go to post Eduard Lebedyuk · Jan 24, 2022 Add to csproj <PackageReference Include="IRISUtilsCore21" Version="1.0.0" />
go to post Eduard Lebedyuk · Jan 14, 2022 I get 404 opening this url in the browser https://www.sidra.ibge.gov.br/api/values/t/1612/n2/all/v/all/p/last/c81/...
go to post Eduard Lebedyuk · Jan 12, 2022 No, as long as response is json this should work - %FromJSON accepts strings, streams and even file paths as input: set response = result.HttpResponse.Data set dados = {}.%FromJSON(response)
go to post Eduard Lebedyuk · Jan 12, 2022 It should work. Here's an example: Installer Dockerfile Please consider providing sample code.
go to post Eduard Lebedyuk · Jan 11, 2022 There's a FORMAT property parameter. Maybe setting it would help @Oliver Wilms? Checked, it's only for Display conversions. I suppose a custom data type would work.
go to post Eduard Lebedyuk · Jan 6, 2022 VSTS supports Git, I would recommend using it for version control. As for CI/CD pipeline check this series of articles.
go to post Eduard Lebedyuk · Jan 4, 2022 Use System Default Settings and set them on container startup via %ZSTART or OnStart (pass settings values inside via env vars or mounted file). Production would get System Default Settings automatically when started. We're using this approach and it works.
go to post Eduard Lebedyuk · Dec 30, 2021 Cool. I use custom ObjectScript commands via ^%ZLANG Routines. Advantages: Crossplatform Easy to transfer between servers Available since times immemorial Post your favorite aliases below. SQL shorthand is definitely useful.