I'm trying to interpret a ObjectScript pattern and I am stumped on the first part. I understand everything else but not sure what 1.A means. I know A stands for Alpha characters just not sure what the 1. means
I have been trying to pull data through a linked server in SSMS from an InterSystems Cache Database for a while, this is to enable us to join the data to other source systems in our Data Warehouse.
I have set up an ODBC connection and a linked server to the database and can execute queries through OPENQUERY in Management studio, but the data is huge (> 100million rows). So when I execute a SQL query with a WHERE clause the query just spins.
I'm trying to execute a nodejs process to perform some work on a string from Cache/Mumps over to nodejs, then return the result from nodejs as a string back to the code in Cache and I was looking at the `$ZF` logic - it will let me output the results to a file (i.e. temp.txt) but I dont see a way to just get the output set back to an M variable like (and I know this is not the correct syntax, but just for example)
S myOutput=$ZF(-100, "echo something") ;; wrong syntax but just for example
W myOutput ;; want to write out "something" but of course this doenst work
I was understanding the cluster configuration supported by the Cache. Have couple of queries around that:
1. In Cache version 2018.2, there is a shrading concept which splits the data of a Master Data server into multiple small data server which store shraded data.
Where do I download the package cache-jdbc-2.0.0.jar. I'm trying to develop a java app that connects to a Cache Database to grab information? Thank you.
We are using BI tool for reporting which required to connect TrakCare system using JDBC Connection Can some can assist with Jar file which is required for the connection or anyone did befoe?
We are trying to write an external backup application to backup Cache Database. After going through the Cache DB documentation, we have found that in Backup.General class there are methods for creating snapshot (Freeze/Thaw) which is required during backup. Are there REST APIs for the same?
(Originally posted on Intersystems CODE by @Eduard Lebedyuk, 10/12/15) The following code snippet outputs all filenames in the file path "dir" in the Cache/IRIS terminal. The class method "test" runs the code:
Class eduardlebedyuk.filenamesInDir Extends %RegisteredObject
{
classmethod test() {
// replace dir with file path you want
set dir = "D:\directory"
set dir = ##class(%File).NormalizeDirectory(dir)
set file=$ZSEARCH(dir_"*")
while file'="" {
write !,file
set file=$ZSEARCH("")
}
}
}
I would like to know if anyone has had some experience in building systems for multiple end-users.
To keep things simple, in a hypothetical example, say an Event Booking System, where a Venue could sign up to use such a system and define it's Venue, costs, calendars, etc.. and then invite their customers to book the Venue on different days/times.
If I wish to offer such a system to many Venues, there are a number of options available.
This code snippet contains the class method "test" which sends an HTML email. Change the literal strings in the method to customize the email's from address, to address, subject, and body:
Class objectscript.sendEmail Extends %RegisteredObject
{
classmethod test() {
set m=##class(%Net.MailMessage).%New()
set m.From="user@company.com"
set m.IsHTML=1
do m.To.Insert("user@company.com")
set m.Subject="Sent by IRIS mail"
set m.Charset="iso-8859-1"
do m.TextData.Write("<HTML><HEAD><TITLE></TITLE>"_$char(13,10))
do m.TextData.Write("<META http-equiv=Content-Type content=""text/html; charset=iso-8859-2""></HEAD>"_$char(13,10))
do m.TextData.Write("<BODY><FONT face=Arial size=2>Test <B>Test</B></FONT></BODY></HTML>")
set s=##class(%Net.SMTP).%New()
set s.smtpserver="mail.company.com"
set status=s.Send(m)
}
}
From the first glance, the task of configuring LDAP authentication in Caché is not hard at all – the manual describes this process in just 6 paragraphs. On the other hand, if the LDAP server uses Microsoft Active Directory, there a few non-evident things that need to be configured on the LDAP server side. Those who don’t do anything like that on a regular basis may get lost in Caché settings. In this article, we will describe the step-by-step process of setting up LDAP authentication and cover the diagnostic methods that can be used if something doesn’t work as expected.
I want to do some logic based on what environment code is running in. I can't find a built-in function to retrieve this so I'd like to write a custom function. Does anyone know of a command that would get the current environment?
Recently, a partner company started to develop an Angular client for their Cache application. Together, we decided to leverage the power of Caché dynamic objects to exchange JSON encoded data between client and server parts. However, we realized that currently there is a gap in Cache JSON implementation that prevents simple use of traditional registered and persistent classes to exposed their data with the same ease as with XML. I wrote a small JSON adapter, that does the job and bridgers the gap. It's purpose is simple expose data described by a regular Cache class in a one-to-one fashion to a %DynamicObject. On the other hand, when a serialized JSON data comes in, it can be easily deserialized into dynamic object and subsequently bound to regular class by the newly created adapter.
I think I already know the answer to this but I thought I'd ask anyway. So the Node.js adapter allows you to perform operations directly on Globals. Does the InterSystems.Data.CacheClient.dll or InterSystems.CacheExtreme.dll provide a mechanism to access Gobals directly or are you accessing globals via Caché ObjectScript classes?
This code snippet uses %ZEN.Auxiliary.jsonSQLProvider. The namespace and string of SQL can be edited for different situations. The class method "test" runs the code:
Class eduardlebedyuk.passQuestionParams
{
classmethod test(pValue = 50) {
s ns = $Namespace
zn "samples"
s tSQL = "SELECT ID, Name FROM Sample.Person WHERE Id > ?"
s tPR = ##class(%ZEN.Auxiliary.jsonSQLProvider).%New()
s tPR.sql = tSQL
s tPR.%Format = "tw"
s tPR.maxRows = 100
s tParam = ##class(%ZEN.Auxiliary.parameter).%New()
s tParam.value = pValue
d tPR.parameters.SetAt(tParam,1)
d tPR.%DrawJSON()
//d ##class(%ZEN.Auxiliary.jsonSQLProvider).%WriteJSONFromSQL(,,,,,tPR) //same thing
zn ns
}
}
(Originally posted to Intersystems CODE by @Eduard Lebedyuk, 5/13/15)
I have a ZEN page with nine tablepanes. Each tablepane queries a table in the same SQLServer db. I have a single SQLGateWay(odbc) to this SQLServer db. I need to get better performance when I query all nine table at the same time. Would my performance improve if I had nine SQLGateWays(nine odbc configurations/connections), one for each query? I would appreciate any and all suggestions for getting the very best performance when using SQLGateWays. Thank you.
I have created a view to stage some data in a different format and then want to reference that view in a SQL query from a table that filters the data from the view using a property of the table.
Example:
select MsgId, FileName, (select ReportName from custom_view where MsgId = ReportId ) as ReportName from main_table
Is this even possible? When I try this, I get an error table not found for the view?
I was understanding the cluster configuration supported by the Cache. Have couple of queries around that:
1. In Cache version 2018.2, there is a shrading concept which splits the data of a Master Data server into multiple small data server which store shraded data.