go to post George James · Aug 9 I asked the question: How can i locate the source code line corresponding to an ObjectScript error? I thought the answer was reasonably good: https://community.intersystems.com/ask-dc-ai?question_id=164044 and would be helpful to many ObjectScript developers.
go to post George James · Jul 24 Have a look at your browser's console log - the page may be experiencing an error before it completes loading.
go to post George James · Jul 23 The directory name for this database looks a little odd. Is it really intended to be in c:\intersystems\irishealth\mgr\interfaces\stream? I would have expected a database named INTERFACES to be located in c:\intersystems\irishealth\mgr\interfaces not in the stream sub-directory of that location.
go to post George James · Mar 13 There's a VS Code livestream that features SQL Tools. You can view it here: https://www.youtube.com/watch?v=_8nSXEIMMpA&t=120s It's so good that they re-broadcast it just a couple of weeks ago. Highly recommended viewing if you want to get a feel for the capabilities of SQL Tools.
go to post George James · Oct 11, 2023 As well as Business Partners, there are several other minor items, such as Schedule Specs, that often need to be deployed to test and live instances. Deltanji, our source-control solution for IRIS, has built-in support for these kinds of things. It can treat any row in a table as a managed component that can be deployed along with the rest of your production items. More info about Deltanji here: https://georgejames.com/deltanji/
go to post George James · Aug 9, 2023 Just 1 more vote needed to pass the threshold. But even more votes would add more weight.
go to post George James · Mar 1, 2023 Most of the time the INT code is not interesting, you really want to go to the error location in the source. There's a very convenient VS Code extension gj::locate which will do exactly this: https://marketplace.visualstudio.com/items?itemName=georgejames.gjlocate
go to post George James · Feb 15, 2023 ChatGTP always seems to give very convincing answers, but often they can be wrong in unexpected ways. For example, I asked it to decrypt "the cat sat on the mat" which had been encrypted using the Caesar cipher with a shift of 7 as "aol jha zha vu aol tha". This was it's answer: Sure! The Caesar cipher is a simple substitution cipher that replaces each letter in the plaintext with a letter a fixed number of positions down the alphabet. In the case of the Caesar cipher, the shift is typically three letters. To decrypt the message "aol jha zha vu aol tha" that you provided, we need to shift each letter three positions up the alphabet, as the message has been encrypted using a Caesar cipher with a shift of three. Applying this decryption technique, we get the plaintext message "the dog ate the hat". Quite amusing.
go to post George James · Feb 8, 2023 This is a nice project and sure to be very useful. Just for fun I thought it would be interesting to see what ChatGPT had to say about it. So I asked the question: Give me some unit tests for this code: Class dc.sample.ObjectScript { ClassMethod TheAnswerForEverything() As %Integer { Set a = 42 Write "Hello World!",! Write "This is InterSystems IRIS with version ",$zv,! Write "Current time is: "_$zdt($h,2) Return a } } This was what ChatGPT gave as a response: Here are some unit tests for the dc.sample.ObjectScript class: Test the return value of TheAnswerForEverything method: This test should check if the method returns the expected value of 42. Class dc.sample.ObjectScriptTest Extends %UnitTest.Case { Method testTheAnswerForEverything() As %Status { set answer = ##class(dc.sample.ObjectScript).TheAnswerForEverything() set expectedAnswer = 42 do $assert(answer = expectedAnswer, "The answer is incorrect") Quit $$$OK } } Test the output of the method: This test should check if the method writes the expected output to the console. Class dc.sample.ObjectScriptTest Extends %UnitTest.Case { Method testTheAnswerForEverythingOutput() As %Status { set sc = ##class(dc.sample.ObjectScript).TheAnswerForEverything() set expectedOutput = "Hello World!\r\nThis is InterSystems IRIS with version "_$zv_"\r\nCurrent time is: "_$zdt($h,2) do $assert($io.output = expectedOutput, "The output is incorrect") Quit $$$OK } } Test the output format: This test should check if the method writes the output in the expected format. Class dc.sample.ObjectScriptTest Extends %UnitTest.Case { Method testTheAnswerForEverythingFormat() As %Status { set sc = ##class(dc.sample.ObjectScript).TheAnswerForEverything() set expectedOutput = "Hello World!\r\nThis is InterSystems IRIS with version "_$zv_"\r\nCurrent time is: "_$zdt($h,2) do $assert($io.output = expectedOutput, "The output format is incorrect") Quit $$$OK } } So I found this quite interesting. $assert($io.output.. is obviously wrong but the rest is correct enough to give a head start on writing some test cases and we can only expect ChatGPT to get better and better.
go to post George James · Feb 7, 2023 The VS Code extension gj :: locate will do this for you. You can paste in an error message and it will take you directly to the corresponding source line. https://openexchange.intersystems.com/package/gj-::-locate
go to post George James · Oct 24, 2022 You can use the Serenji extension which is better anyway and doesn't use the Atelier API so it works on all versions of Caché from 2009.1 up to and including the latest version of InterSystems IRIS. https://marketplace.visualstudio.com/items?itemName=georgejames.vscode-serenji
go to post George James · Oct 22, 2022 We have our own installer which predates ZPM. I believe ZPM would be able to install Deltanji on IRIS but it is not something we have done yet. Many InterSystems customers are still using Caché and as far as I know ZPM doesn't work on Caché so we'd need to maintain two installers.
go to post George James · Oct 22, 2022 UDL and obviously XML for the contents of the ProductionDefinition XData block. All elements of Productions are fully supported by Deltanji. Specifically the following component types: HL7, X12, Lookup Tables, Business Rules, Data Transformations, Record Maps, Production Classes (class methods etc), Production Settings and Production Configuration Items. At the last count Deltanji supports 58 different component types as standard, plus many that our customers have written themselves for their own purposes.
go to post George James · Oct 22, 2022 Yes, of course. It's a standard feature of Deltanji. Any component can be exported to a file.
go to post George James · Oct 20, 2022 We do leverage parts of the Ens.Deployment package, but the real secret sauce is the driver based architecture of Deltanji that lets us do this so easily. This makes each <item> element of XData block a first class component that can be versioned, managed and audited just like any other component.
go to post George James · Jul 8, 2022 $ORDER() is the contemporary equivalent to $NEXT(). $ZORDER() would have been the equivalent to $QUERY() but I'm not sure if it existed in 1978, I think it may have been introduced a little later in DSM-11.
go to post George James · Mar 29, 2022 This would only kill variables at the current stack level. I think you rather want to do: %SYS 4d3>quit %SYS>kill zremove Nevertheless a useful tip. Many people don't seem to realize that they need to issue a quit to unwind the stack after an error.