I connected from InterSystems Cache to devices connected via RS232 (commonly known as COM-port).
Can the same be done with devices connected via RS422/RS485 interfaces?
InterSystems Caché is a multi-model DBMS and application server. See more details here.
I connected from InterSystems Cache to devices connected via RS232 (commonly known as COM-port).
Can the same be done with devices connected via RS422/RS485 interfaces?
Hi,
Is there any COS command could kill all the globals given the namespace?
Thanks.
Hello,
I have some beginner questions as I am working through the InterSystems Cache learning path:
- Where I work, we us Cache, but we often learning about and train on MUMPS. No one really talks about or mentions MUMPS here, but my understanding is that ObjectScript is basically MUMPS plus whatever new things InterSystems put on top of it. Is that a fair assessment?
- The training online often refers to IRIS. We don't use IRIS, but we use globals to store data. I suppose I'm just confused on the difference between Cache, Zen, IRIS and other products as they all seem to do similar things.
Has anyone called any outside Javascript code from inside their class files? I asked a long time ago if there was a way to manipulate an image within Cache Object Script, and since Cache doesn't have any image libraries its not really possible. However I have found Javascript to resize an image and wonder how hard it would be to mesh the two together.
Can anyone share any examples?
Thanks
Scott
Hi -
I'm wondering if anyone has coded up a means to create an extension for a %Persistent class from a base class to a sub-class without making a ton of assumptions about the Global structure. I'm trying to create a new "extension" record that would have the same ID as the Base Class
Class BaseRecord Extends %Persistent
and
Class SubRecord Extends BaseRecord
where I would have an instance of a "BaseRecord" and I want to turn it into a "SubRecord" instance and have all of the existing references to the BaseRecord survive.
Hi,
Is it possible to implement Drag and Drop with the TablePane component?
There's a new and exciting enhancement to QEWD that has just been released - it's an additional layer of abstraction known as QEWD-Up. QEWD-Up hides away all the mechanics of QEWD itself, allowing you to focus on just your REST APIs and the code that implements them.
Additionally, and importantly, QEWD-Up simplifies the maintenance of your REST APIs, allowing you (and others) to quickly and easily understand their life-cycle and implementation.
QEWD-Up supports both monolithic application designs and MicroService-based architectures where APIs are broken down by, for example, functional role.
Example: I have a list of tags that I have to find, and a string with these and other tags separated by commas. How to find the desired tags in the string optimally?
Recently I reread this article by @Bernd.Mueller. It's about calling DELFATE function from zlib library. In this article I'll demonstrate several different approaches to callout libraries, we'll build the same functionality (compress function) in several different languages and compare them.
Hello everybody.
I have task to find out possibility call method from background task. I need run some class with methods. I've found out than I can run it via ^%ZSTART routine. And now I wanna to learn is it possible to call this class and run it's methods.
Thank you
When working at the Caché command prompt I sometimes want to run an operating system command on the server host. By prefixing my command line with ! or $ I can do this with ease. The following examples are from 2017.1 on Windows, but the feature is available on all versions and platforms:
USER>!dir
$dir
If I need to issue more than one command I can almost get myself an interactive shell:
USER>!
The current date is: 23/06/2017
I wrote "almost" because in the example above the 'date' command prompted me to enter a new date but didn't wait for my keystrokes.
The following code walks a DOM using %XML.Node. It also prevents %XML.Writer to change whitespace. Run the code using the class method "test":
Class objectscript.walkDOM Extends %Persistent
{
ClassMethod dfs(node As %XML.Node)
{
s entrynode=node.NodeId
do {
//element nodes with one whitespacetyped child are the ones we want to change
if (node.NodeType=$$$xmlELEMENTNODE){
s snode=node.NodeId
if (node.MoveToFirstChild())
{
i ('node.MoveToNextSibling()){
i (node.NodeType=$$$xmlWHITESPACENODE){
s node.NodeType=$$$xmlTEXTNODE
s node.NodeId=snode
}
}
}
s node.NodeId=snode
}
if (node.HasChildNodes()){
d node.MoveToFirstChild()
d ..dfs(node)
}
} while (node.NodeType'="" && node.MoveToNextSibling())
s node.NodeId=entrynode
}
ClassMethod test()
{
set xml = "abcdefg <![CDATA[ ]]> "
s reader=##class(%XML.Reader).%New()
do reader.OpenString(xml)
set writer = ##class(%XML.Writer).%New()
//do some magic
d ..dfs(reader.Document)
w !,"with indent=1:",!
set writer.Indent = 1
do writer.OutputToString()
do writer.Document(reader.Document)
w writer.GetXMLString()
set writer.Indent = 0
w !,"with indent=0:",!
do writer.OutputToString()
do writer.Document(reader.Document)
w writer.GetXMLString()
}
}
Here's a link to the code on GitHub: https://github.com/intersystems-community/code-snippets/blob/master/src/cls/objectscript/walkDOM.cls
InterSystems products (IRIS, Caché, Ensemble) already include a built-in Apache web server. But the built-in server is designed for the development and administration tasks and thus has certain limitations. Though you may find some useful workarounds for these limitations, the more common approach is to deploy a full-scale web server for your production environment. This article describes how to set up Apache to work with InterSystems products and how to provide HTTPS access. We will be using Ubuntu, but the configuration process is almost the same for all Linux distributions.
I am trying to use Entity Framework with Visual Studio 2017. After following the Intersystems documentation ("Using the Caché Entity Framework Provider") I still cannot see the data source in Server Explorer. Any ideas why?
how do you change a date format to dd-MMM-YYYY in cache
How to configure Remotedatabase into our local instance. While connecting remote database i am getting "ERROR #463: Database C:\InterSystems\HealthShare2\mgr\Remote\ is not allowed for ECP Mirror Connection". so can anyone help me to sort this out.
I've been looking at the idea of developing a Time Travel Debugger utility.
It would take a debug target and have a few options such as stack depth and disclude system code.
The debugger would either be started from an external tool, or triggered from a line of code inserted into a method that I want to record.
The debugger would execute the code from start to end and record the full stack on each step to the configured depth.
A visualisation tool would provide a set of controls to play the recording forwards and backwards and provide various ways to search and jump to points in the recording.
In Persistent class, a data global is created which holds the data similar to the table created . Through terminal we can add more records to this table according to the structure of the table. How are the records reflected back into the table which has been set at global . In other words How are the global mapped to the SQL table?
Hello!
I'm trying to get files from FTP server. Bellow my code:
Set sc=$$$OK
set ftp = ##class(%Net.FtpSession).%New()
set ftp.Timeout = 5
set host="speedtest.tele2.net"
set port = 21
If 'ftp.Connect(host,"USER","USER",port) Write ftp.ReturnMessage,! Quit sc
Write "Ftp server messsage:",!,ftp.ReturnMessage,!
Set stream=##class(%GlobalCharacterStream).%New()
If 'ftp.Binary() Write "Can not swap to binary mode",! Quit sc
Write "Mode now: ",ftp.Type,!
If 'ftp.Retrieve("512KB.zip",stream) Write "Failed to get file",! Quit sc
Write "Length of file received: ",stream.Size,!
If 'ftp.
This article was written as an attempt to share the experience of installing the InterSystems Caché DBMS for production environment. We all know that the development configuration of a DBMS is very different from real-life conditions. As a rule, development is carried out in “hothouse conditions” with a bare minimum of security measures, but when we publish our project online, we must ensure its reliable and uninterrupted operation in a very aggressive environment.
Hi,
We are using Cache 5.0, we use Cache telnet and Other emulator (using telnet connection) to launch the applications.
Is there a way to identify the type of device is used?. Based on the emulator I can few custom changes to be applied.
Thanks and Regards,
Sankar
I have a simple callout library:
#define ZF_DLL
#include
#include
#undef ERROR
int GetRandom(double* random) {
// Py_Initialize();
// Py_Finalize();
*random = 1.0;
return ZF_SUCCESS;
}
int main(int argc, char **argv)
{
printf("Random: ");
double random=0;
GetRandom(&random);
printf("%lf", random);
return 0;
}
ZFBEGIN
ZFENTRY("GetRandom","D",GetRandom)
ZFEND I compile this code as a shared library and it works fine with:
set path = "library.dll"
write $ZF(-3, path, "GetRandom")It also compiles and works as an executable.
Hello All,
Hoping someone can help with this odd error.
A vbscript file is being used to perform an update to cache.
The file has worked without an issue for well over a year.
Recently, the update has begun to throw an error.
(class references modified to remove client data)
UPDATE CACHE.UCI.Reg.Pat (Column1) VALUES ('USERNAME') WHERE ID = '2190284'
C:\Web\Config\SchedTasks\script1.VBS(73, 6)
Microsoft OLE DB Provider for ODBC Drivers: [Cache ODBC][State : S1000][Native Code 105]
[c:\Windows\SysWOW64\cscript.
A very simple SQL
SELECT field1 F1, count(field2) CntF2
FROM GCT.PA_Data
where field1 is not null
group by field1
gives an error back:
[SQLCODE: <-461>:<Communication link failure>]
[%msg: <Connection 'TRAKCARELIVE': Execute: SQLState: (HY000) NativeError: [10053] Message: [Cache ODBC][State : HY000][Native Code 10053] [c:\intersystems\ensemble\bin\cache.exe] Software caused connection abort> ]
It does work in another (test) environment, but not on live. Any idea why?
what is mirroring??
Dear all,
In our application made in Caché object script, when we deploy some classes modified we have the option of calling "Purge queries" feature of Caché.
We only were doing this call when a %Persistent class definition (table) was modified, as we assume that no other changes affect the cached queries and we don't want to purge them by default, as the first run of a query becomes slow.
We had a case where no table definition was changed but a purge queries was the solution.
Do you know if any other change could affect the cached queries and a purge queries is necessary?
Regards,
After enabling archiving log functions, Oracle can get real-time change data through CDC.
Can Cache database realize such functions?
My requirement is to take incremental data from the cache database regularly every day and synchronize it to other relational databases.
Incremental data can be text files.
Hi
May I know what is the benefits of using the License Servers option and when to use it? Read through the documentation http://localhost:57772/csp/docbook/DocBook.UI.Page.cls?KEY=GSA_license#… but failed to comprehend it.
Thanks
Regards
Jimmy
Hi. I have the following tables
User.Order [Parent][Primary Key : Year , Month, OrderNo]
> User.OrderDetails [Child] [Primary Key : {%%PARENT}("ITM")(Running Number)]
> User.OrderDetails2[Child] [Primary Key : {%%PARENT}("ITM2")(Running Number)]
My question is there any problem if I use a composite key in User.Order? I am using the composite key is because I have a lot of records each month(millions) and sometimes I will need to clear the records for a specific month for reloading, with those primary key removing the data would be easier (possibility faster too).
I have this code here;I am trying to read a csv file but when I run this code I get <LIST>%open+3^%stream.Object.1 would anyone have a look and tell me where I am going wrong .Record mapper is fine but I need a custom csv Importer
ClassMethod ImportCSV() { set adapter =##class(%File).%New() set status=adapter.%Open("C:\In\in.csv") if $$$ISERR(status) { do $System.Status.DisplayError(status) } set counter =1 while 'adapter.AtEnd { set line=adapter.ReadLine() set rec= ##class(CSVRecord).%New() set rec.ID=$piece(line,",",1) set rec.FName=$piece(line,",",2) set rec.SecName=$piece(line,",",3) set rec.Gender=$piece(line,",",4) set rec.Age=$piece(line,",",5) write rec.ID, rec.FName,