go to post Brett Saviano · Mar 22 @Richard Rayburn There isn't an equivalent to the Inspector's Storage editor in VS Code yet. That's on our roadmap but we don't have an ETA for it yet due to design challenges. You will have to edit the Storage block directly in the class's text. There is hover documentation and code completion support for Storage blocks in VS Code, which Studio did not have: I hope you find this helpful.
go to post Brett Saviano · Mar 1 @Kevin Kindschuh If you're using client-side editing (files on your local file system controlled by GIT directly), you can export HL7 schemas from the InterSystems Explorer view. They will be in the "Other" section:
go to post Brett Saviano · Feb 9 Thanks for your feedback! In response, I've submitted Pull Request #1311 which removes the comment-continuation feature for ObjectScript comments (it's still enabled for class description /// comments). It also adds auto-closing of C-style block comments (e.g. typing /* automatically adds */ after the cursor). You can try this out by downloading and installing the latest beta version of the vscode-objectscript extension from GitHub, which can be found here.
go to post Brett Saviano · Feb 1 @Norman W. Freeman If you upgrade to version 2023.3 or newer, you can use ##class(%RoutineMgr).OutOfDateDocuments() to check all documents in a namespace. You can use the various arguments to filter the documents that are checked (for example, to only check classes).
go to post Brett Saviano · Jan 25 Hi @Mathew Rimmington, this exact question was asked in a GitHub discussion a few weeks ago. To summarize my answer there, this isn't easy to add because the text that gets added on enter (besides indentation) is static. It acn't be generated from the regular expression used to match the previous line, so I couldn't dynamically add the correct number of dots. My recommendation is to use modern brace syntax instead of legacy dot syntax.
go to post Brett Saviano · Jan 19 @Joseph Griffen ZWrite is going to output the internal format of the %Status value, which isn't that easy to parse visually. $SYSTEM.Status.DisplayError() will output the status text to the current device in a more readable format. USER>Write ##class(%Atelier.v1.Utils.General).ValidateDocName("project.prj",.sc) 0 USER>ZWrite sc sc="0 "_$lb($lb(16006,"project.prj",,,,,,,,$lb(,"USER",$lb("e^ValidateDocName+33^%apiSRC^2","e^ValidateDocName+1^%Atelier.v1.Utils.General.1^1","e^^^0"))))/* ERROR #16006: Document 'project.prj' name is invalid [ValidateDocName+33^%apiSRC:USER] */ USER>Do $SYSTEM.Status.DisplayError(sc) ERROR #16006: Document 'project.prj' name is invalid [ValidateDocName+33^%apiSRC:USER] If you need to store the status text in a variable you can use $SYSTEM.Status.GetErrorText().
go to post Brett Saviano · Jan 19 The list of supported file systems for your version (2023.1) can be found here.
go to post Brett Saviano · Jan 17 @Mathew Rimmington Sorry, I misread the prompt in the screenshot. Can you open the settings.json file that contains the server definition that you're having trouble with and send me that? I'd like to confirm that it has "UnknownUser" as the username and not no username. If so, I can modify the Language Server to handle that case better. I know what's happening now. You're creating the server definition with no username, and when the server manager extension tries to use it, it assumes that you wanted to store your credentials securely, so it gives you this prompt. When you leave it blank, it inserts "UnknownUser" with no password as your credentials. The Language Server extension needs to handle that case. I will make the fix.
go to post Brett Saviano · Dec 18, 2023 @Rodrigo Werneck I recommend you use an intermediary stream to avoid <MAXSTRING> errors with large JSON objects: ClassMethod DuplicateDAO(dao As %DynamicAbstractObject) As %DynamicAbstractObject { Set strm = ##class(%Stream.TmpCharacter).%New() Do dao.%ToJSON(strm) Return ##class(%DynamicAbstractObject).%FromJSON(strm) }
go to post Brett Saviano · Aug 3, 2023 @Hannah Sullivan This is documented in the Server Manager's README. It will be added to the official InterSystems documentation for VS Code at a later date.
go to post Brett Saviano · Jul 26, 2023 @Kevin Kindschuh The VS Code Integrated Terminal is an OS shell, so if you want to open an IRIS terminal you need to use a command like "iris terminal <instance>". If that instance is on another machine, you'll have to use SSH. Starting with IRIS 2023.2, VS Code supports a WebSocket-based terminal so that you can launch a terminal on a remote server without needing SSH. The WebSocket terminal is not a full terminal though.
go to post Brett Saviano · Jul 13, 2023 @Sam Duncan Here's a simple method to export subclasses. It exports all of the classes in a single XML file and prints that to the console. You can easily modify that behavior by changing the $SYSTEM.OBJ.Export() line to whatever export strategy you want. ClassMethod ExportSubclasses(pSuper As %String) As %Status { #Dim tSC As %Status = $$$OK #Dim tEx As %Exception.AbstractException #Dim tPc As %ProcedureContext #Dim tRs As %SQL.ClassQueryResultSet Try { #; Build a subscripted array of subclasses Set tStmt = ##class(%SQL.Statement).%New() Set tSC = tStmt.%PrepareClassQuery("%Dictionary.ClassDefinitionQuery","SubclassOf") If $$$ISERR(tSC) Quit Set tPc = tStmt.%Execute(pSuper) If tPc.%SQLCODE < 0 { Throw ##class(%Exception.SQL).CreateFromSQLCODE(tPc.%SQLCODE,tPc.%Message) } Set tRs = tPc.%NextResult() While tRs.%Next(.tSC) { Set tSubclasses(tRs.%GetData(1)_".CLS") = "" } If $$$ISOK(tSC), $DATA(tSubclasses) = 10 { #; Export the subclasses Set tSC = $SYSTEM.OBJ.Export(.tSubclasses,,"/nodisplay") } } Catch tEx { Set tSC = tEx.AsStatus() } Quit tSC }
go to post Brett Saviano · Mar 9, 2023 @Norman W. Freeman This query will return the names of all non-system and non-generated classes in the current namespace: SELECT Name FROM %Library.RoutineMgr_StudioOpenDialog('*.cls',1,1,0,1,0,0) The documentation for this query and its parameters can be found here.
go to post Brett Saviano · Mar 6, 2023 The vscode-objectscript extension now contains a snippet for custom class queries. It was added by pull request #1111 and if you want to try this snippet before the next release you can download the beta version of the extension found here.
go to post Brett Saviano · Feb 6, 2023 @Scott Roth Please see our documentation page on server-side editing for directions for setting up your workspace.
go to post Brett Saviano · Oct 5, 2022 Maybe try using 'ck' instead of 'cuk'. The 'u' flag is the one that tells the compiler to not recompile if it doesn't detect a code change.
go to post Brett Saviano · Aug 23, 2022 @Scott Roth The custom metrics code needs to be added to the instances of IRIS that SAM is monitoring, not the SAM Manager IRIS instance itself. The full documentation for adding custom metrics can be found here.
go to post Brett Saviano · Aug 19, 2022 I believe this is the same problem described here. You need to add the --check-caps false command to the iris container in your docker-compose.yml file, like this: ... iris: command: --check-caps false init: true ... The SAM 1.1 distribution should have this done for you but that change must not have made it in. I think you can still enter the SAM 2.0 EAP if you'd like to start with the upcoming version.
go to post Brett Saviano · Aug 19, 2022 The logs are stored in the containers themselves. Using docker you can read them using the docker logs command. According to the podman docs, this is what you would need to run: podman logs sam_iris_1
go to post Brett Saviano · Aug 19, 2022 @Scott Roth SAM or Prometheus alone can be installed on a separate server. They just need network access to the IRIS servers that you want to collect metrics from.