go to post Jon Willeke · May 9, 2019 The %SYSTEM.SQL::Execute() method returns an %SQL.StatementResult object. I'm not that familiar with the iris.node module, but it appears that invoke_classmethod() does not return an object that you can pass to invoke_method() or get_property(). However, it seems that you can fake it by copying the "result" field into a new object as "oref": > result = data.invoke_classmethod({class: '%SYSTEM.SQL', method: 'Execute', arguments: ['select 1']}) { ok: 1, class: '%SYSTEM.SQL', method: 'Execute', arguments: [ 'select 1' ], result: '12' } > data.get_property(result, '%SQLCODE') Error: No object reference provided > o = {oref: result.result} { oref: '12' } > data.get_property(o, '%SQLCODE') { ok: 1, oref: 12, property: '%SQLCODE', value: '0' } > data.invoke_method(o, '%GetData', 1) { ok: 1, oref: 12, method: '%GetData', result: '1' }
go to post Jon Willeke · May 8, 2019 The main thing I can suggest is to verify that the client and server agree on the encoding. It's been years since I've used Reflection; hopefully it supports UTF-8. Check your settings and/or documentation. When you're in a Caché session, look at the value of the $zmode special variable: USER>w $zm RY\Latin1\K\UTF8\ I'm not sure offhand what determines the default I/O translation table for a terminal, but if you see "RAW" instead of "UTF8", you can set it manually: USER>u 0:(/IOT="UTF8") USER>w $zm RY\Latin1\K\UTF8\
go to post Jon Willeke · Apr 19, 2019 $toJSON() escaped forward slash unnecessarily in 2016.1. It's valid JSON, but unconventional. %ToJSON() doesn't do this in 2016.2 and later. Depending on your data, you may be able to get away with $replace(json,"\/","/"). To handle all cases would be a bit more work.
go to post Jon Willeke · Apr 12, 2019 I thought there was a method to do just this in the TestInstance class, but it's actually in %UnitTest.Portal package: USER>w ##class(%UnitTest.Portal.standardPage).GetTestStatus(^UnitTest.Result) 0 Up to you if you want to depend on an implementation detail of the portal. It is a public method that's been there since 2012.
go to post Jon Willeke · Apr 9, 2019 So the input is Windows-1252, and the output is Windows-1252 in which certain characters are mapped to their numerical escape sequence? You could do this with XSLT 2.0 using character maps. Given this input (presented here as UTF-8 for visibility on the forum): <?xml version="1.0"?> <Recordset> • coffee €5,• tea €4 </Recordset> This stylesheet will escape the bullets and euro signs: <?xml version="1.0"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:character-map name="a"> <xsl:output-character character="€" string="&#128;"/> <xsl:output-character character="•" string="&#149;"/> </xsl:character-map> <xsl:output encoding="Windows-1252" indent="yes" use-character-maps="a"/> <xsl:template match="/"> <Recordset> <xsl:value-of select="/Recordset"/> </Recordset> </xsl:template> </xsl:stylesheet> Output: <?xml version="1.0" encoding="Windows-1252"?> <Recordset> • coffee €5,• tea €4 </Recordset>
go to post Jon Willeke · Apr 9, 2019 My hunch is that XSLT is not the right tool for the job, but it's not clear to me what you're trying to do. What is the input encoding, what is the desired output encoding, and what do you mean by non-standard characters? Are these characters that don't exist in the output encoding?
go to post Jon Willeke · Apr 2, 2019 This post about the %SyntaxColor class might be useful as a starting point: https://community.intersystems.com/post/syntax-highlighting-objectscript It wouldn't integrate seamlessly with the LaTeX toolchain, but you could probably transform its output into something usable.
go to post Jon Willeke · Apr 1, 2019 The first $zf(-100) call doesn't work, because you're trying to redirect with the /STDOUT flag and the ">>" operator. You can do one or the other, but not both. If you add the /LOGCMD flag to the second $zf(-100) call, you should see something like the following in messages.log: $ZF(-100) cmd=type "" file1.txt I suggest that you not put an empty string in your options array.
go to post Jon Willeke · Mar 15, 2019 I believe that what you're looking for is available in Caché 2018.1 and should be available soon in InterSystems IRIS. Take a look at "Support for Microsoft Integrated Windows Authentication for HTTP Connections" in the release notes here: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY...
go to post Jon Willeke · Feb 14, 2019 I'm not that familiar with adapters, but the documentation suggests that you need to use the SkipBodyAttrs property to send a header like Content-Type. Also, I think you need to decide whether you're sending form data or a body. When tFormVar is "Content-Type,apikey", the documentation says that your third data argument will be assigned to the last form variable, apikey, which is almost certainly not what you want. Your second try with three variables looks more likely to work, depending on what the service expects in the body. I don't know anything about the duplicate apikey. That's presumably specific to the service you're calling.
go to post Jon Willeke · Feb 13, 2019 Take a look at the reference for the %DynamicArray and %DynamicObject classes in the InterSystems IRIS 2019.1 preview: https://irisdocs.intersystems.com/iris20191/csp/documatic/%25CSP.Documat... In 2019.1, you can get and set the value of a field as a stream: USER>w ["abc"].%Get(0,,"stream").Size 3
go to post Jon Willeke · Feb 12, 2019 I would use the InsertFormData() method on the HttpRequest object. There's an example in the class reference: https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls
go to post Jon Willeke · Feb 6, 2019 Take heart, I think you're getting close. I think all you need now is to quote the arguments to the --before switch, as shown in the documentation: --before "/usr/irissys/dev/Cloud/ICM/changePassword.sh /IRIS/pwd.txt" If you're still having trouble, build up the command incrementally, as I previously suggested, being careful to follow the correct form of the command. Dmitry's answer about looking at log files will also give you more information than simply noticing in docker ps that the container has exited.
go to post Jon Willeke · Feb 5, 2019 I'm finding it hard to read the output images, but every one of the commands that you listed has a Docker option after the image name. The form of the command should be: docker run <Docker opts> image_name <IRIS args> To be clear, the -e (--env), -p (--publish), and -v (--volume) switches are Docker options; they go before the image name. The --key and --before switches are IRIS arguments; they go after the image name.
go to post Jon Willeke · Feb 1, 2019 You're sort of back to where you were before, with Docker switches occurring after the image name, although you now have the image name in there twice. I don't have your environment, so I can't test this exact command, but I think you want something like this: docker run -d --privileged -v /nfs/IRIS:/IRIS \ --env ISC_DATA_DIRECTORY=/IRIS/iconfig \ --env ICM_SENTINEL_DIR=/license \ -p 52774:52774 --name IRIS4 efca5c59cbb7 \ --key /IRIS/iris.key ... If you're still having trouble, back up and build the command line incrementally. Start simple: docker run -d --name IRIS4 efca5c59cbb7 Then add in your Docker switches (-v, -e, -p, etc.), and finally add in the IRIS arguments (--key, etc.). That way you can tell which switch or argument is causing a problem.
go to post Jon Willeke · Feb 1, 2019 It looks like you're trying to run an image identified as efca5c59cbb7, but in this segment of the command line, iris is taken as the image name: --env ICM_SENTINEL_DIR=/license iris
go to post Jon Willeke · Jan 31, 2019 The --volume and --env switches are handled by the docker command. They should come before the image name.
go to post Jon Willeke · Jan 18, 2019 Even if you store the current password encrypted, consider storing just the hashes for old passwords. You might use $system.Encryption.PBKDF2() for this purpose, perhaps with fewer iterations than you'd otherwise use for a live password.
go to post Jon Willeke · Dec 4, 2018 I don't think that your test method is being run. I'm pretty sure that it has to start with "Test" (with a capital "T") for the manager to discover it.
go to post Jon Willeke · Nov 19, 2018 You've set the TranslateTable for both stream and tNewStream to "cp1252". If the input file is UTF-8, then stream.TranslateTable should be "UTF8". Otherwise, each UTF-8 code unit (i.e., byte) is read in separately as a CP1252 character.