go to post Yaron Munz · Jul 8, 2022 Hello, We are using this on an a-sync mirror member, that we want to be "behind" for any X minutes (parameter) Here is a sample code: s sc=1 try { I ##class(%SYSTEM.Mirror).GetMemberType()'="Failover" { S diff=..GetDiff(debug) I diff < minutes { I $zcvt(##class(SYS.Mirror).AsyncDejournalStatus(),"U")="RUNNING" { D ##class(SYS.Mirror).AsyncDejournalStop() } } else { I $zcvt(##class(SYS.Mirror).AsyncDejournalStatus(),"U")'="RUNNING" { D ##class(SYS.Mirror).AsyncDejournalStart() } } } } catch e { ; any error trp you want } Quit sc
go to post Yaron Munz · Feb 28, 2022 I also suggest that you will try to use %PARALLEL. sometimes it helps. We have experienced that in some (very heavy queries) a good option is in some cases is to have a SP (stored procedure) that will get the query request parameters and run it in parallel "segments" using the build in "queue manager"
go to post Yaron Munz · Jul 29, 2021 Usually you do not mix between your "own" persistent (classes) data and Interoperability (aka Ensemble) request & respond messages (which are also persistent). When you purge Ensemble data. the request/response messages are also being purged ! A best practice is to have for each component its own request/response messages. e.g.PROD.BO.ComponentName.Msg.Request & PROD.BO.ComponentName.Msg.Responsewhere BO = business operation (so you could have BS for business service and BP for business process)and ComponentName is the name of your components.(sometimes few components, can share the same request & response messages, which is totally fine !)
go to post Yaron Munz · Jul 14, 2021 I agree with Eduard. However, there is an option to have global mapping (by subscript) to different databases that might be located on multiple disks for getting better I/O https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GG...
go to post Yaron Munz · Jul 1, 2021 Hello Subramaniyan, If you can have a downtime for the DB, than you could write a script that dismount the DB, FTP it to another server and mount it again. This of course depends on the DB size and your network speed. If a downtime is not possible, I would recommend doing a "hot backup" then copy (or FTP) it to another server and restore it. Another option is to use "external backup" with using a "freeze" & "Thaw" to ensure data integrity. Further information: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...
go to post Yaron Munz · Jun 2, 2021 Hello, I assume you are looking for something like CDC (capture data changes) for . The basic idea is to programmatically read journal files record by record and analyze the SET/KILL ones (according to some dictionary you build to determine which globals or classes need the CDC capability). I have done something similar using the ^JRNUTIL https://docs.intersystems.com/irislatest/csp/docbook/Doc.View.cls?KEY=GC...
go to post Yaron Munz · Oct 14, 2019 Hello, your method returns %ArrayOfObjects so you need to create and populate it within your code... your code should look like (I have highlighted the relevant changes in code) : set booksRS = ##class(%ResultSet).%New("Library.Book,BooksLoaned") set rsStatus = booksRS.Execute() S books = ##class(%ArrayOfObjects).%New() if rsStatus = $$$OK { while booksRS.Next() { set book = ##class(Library.Book).%New() set book.Title = booksRS.Get("Title") set book.Author = booksRS.Get("Author") set book.Genre = booksRS.Get("Genre") set dbFriend = ##class(Library.Person).%OpenId(booksRS.Get("Friend")) set book.Friend = dbFriend Set sc = books.SetAt(book,$Increment(i)) } }else{ w !,"Error fetching books in GetoanedBooks()" } do booksRS.Close() return books
go to post Yaron Munz · Aug 27, 2019 Hello,\You may find documentation on how to work with streams here: https://docs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_propstreamin BPL you can add a "code" element where you can create and populate your stream with data,. or you can add a "call" element to call a classmethod where you implement the code.For example: to create a stream and write some data into it :(if you need to have this stream data vailable for other components of the BPL it is best to use a %context property for it) set stream = ##class(%Stream.GlobalCharacter).%New() do stream.Write("some text") do stream.Write(%request.anyproperty) do stream.Write(%context.anyproperty) in your request / response messages to pass to BO you will have to add a stream property : Property MyProp As %Stream.GlobalCharacter;
go to post Yaron Munz · Jul 3, 2019 Hello Godfrey.Can you please give more information about the problem you are facing ?where do you have this "insert" button ? Is it in a CSP page you developed (if yes, the code might help here) or is it in the management portal ?
go to post Yaron Munz · Jul 1, 2019 Hello,If you mean to use "Internal" keyword, this will prevent the Class (Web) method from being displayed in the class documentation.https://irisdocs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=ROBJ_method_internalIf this SOAP web service if for internal use, and should not be used elsewhere, I would go for an approach of secure this specific web service.https://irisdocs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=GSOAPSEC
go to post Yaron Munz · Jun 28, 2019 Hello,If you need to save your class in more than 1 namespace, and you are using studio, you may do it automatically with studio hooks.This is done in that way:1. You create your own source control class which inherit from %Studio.SourceControlBase2. you put your code in that class. For example you may use OnAfterSave method to run on all namespaces that your class need to be saved, loop on this list (except the current one of course) and save + compile your class (programmatically) in each namespace. https://irisdocs.intersystems.com/iris20191/csp/docbook/DocBook.UI.Page.cls?KEY=GSTD_Intro#GSTD_intro_schookshttps://irisdocs.intersystems.com/iris20191/csp/documatic/%25CSP.Documatic.cls?APP=1&LIBRARY=%25SYS&CLASSNAME=%25Studio.SourceControl.Base
go to post Yaron Munz · Jun 19, 2019 Hi.You could do that with the following way1. Define your own custom event class (inherit from %CSp.SessionEvents) then you may interact with the session creation/deletion:2. In OnStartSession() callback in the event class, you may store the sessionId in your own global/table.3. In OnEndSession() callback in the event class you may delete/kill your own data.4. Pass the SessionId from the parrent window to the child (if you do not have it there already)5. Have a timeout JS code to call the server using #server or #call every x sec. with a check of your own global/table for this SessionId.If not exist - preform a "windowsClose" or a in-window message...Here is more documentation abourt it :https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCSP_sessions
go to post Yaron Munz · Jun 18, 2019 Hello,As I understand, you want to have Cache as a client, doing a post toward a secure web page.For this you need to define an SSL "Client".1. Go to "System Administration" --> "Security" --> "SSL/TLS configuration" --> "Create new configuration"2. Give any name you want in "Configuration name" for example : SSL3. Default values for "Type" = "client" and "Enabled"4. Clisk "Test" button (before save) enter a web site (google.com) click "ok" then enter port = 443. You should get the following:"SSL connection succeeded" 5. Save the configuration.Using that SSL with %Net.Httprequest - https://irisdocs.intersystems.com/iris20191/csp/documatic/%25CSP.Documatic.cls?APP=1&LIBRARY=%25SYS&CLASSNAME=%25Net.HttpRequestThe trick is to use the "SSLConfiguration" property of %Net.HttpRequest class to store the name of the SSL configuration you have devfined earlier.Here is a sample code : S Req = ##class(%Net.HttpRequest).%New()S Req.Server = "www.server.com"S Req.SSLConfiguration = "SSL"D Req.InsertFormData("name","value")D Req.Post("/location/path")S Res = Req.HttpResponseI $IsObject(Req) D Res.OutputToDevice()
go to post Yaron Munz · May 10, 2019 Hello,1. A deeper look on how you implement ed your indexes According to the "cost" it looks that the query is not optimized.2. Do you have an index on "TranEffectDate" on "SDS_DATA._Transaction" table ?3. I would recommend that you run this query (after improve of the "cost") with parallel processing.
go to post Yaron Munz · Apr 12, 2019 Every class (with its methods) is compiled into an INT routine.MOMLBL will help you diagnose performance on executed lines of code.https://docs.intersystems.com/iris20181/csp/docbook/DocBook.UI.Page.cls?...
go to post Yaron Munz · Mar 26, 2019 Hi,Take a look on %Dictionary.ClassDefinition class.you may get all the properties from Properties
go to post Yaron Munz · Nov 14, 2018 Hi,To get information about a namespace, You may use this code :(run it only in %sys" namespace) Properties variable is passed by ref (i.e. it has a point at the beginning)%SYS>S Status=##Class(Config.Namespaces).Get("user", .Properties)%SYS>zw PropertiesProperties("Globals")="USER"Properties("Library")="CACHELIB"Properties("Routines")="USER"Properties("SysGlobals")="CACHESYS"Properties("SysRoutines")="CACHESYS"Properties("TempGlobals")="CACHETEMP"