What is the Cache command to display the version of Cache?
InterSystems Caché is a multi-model DBMS and application server. See more details here.
InterSystems Caché is a multi-model DBMS and application server. See more details here.
What is the Cache command to display the version of Cache?
SOLVED
tl;dr how can you tell if a number is really a string
The original question has been updated/improved.
Equality comparisons on floating point numbers will produce different results...
"1.1"=1.1 //is true!
"0.1"=0.1 //is not true :(
This second comparison can be fixed with...
+"0.1"=+0.1 // is true!
The problem is, what if we don't realise that a value is a stringy number, or just overlook implementing this defensive check.
One solution would be to lint check %Float properties and return types that should originate from a number and not a string, as discussed here...
I am trying to capture the write of a method to test the response in an unit test. I know everything works because one of my colleagues ran the code and did not froze on his machine.
I don't what is the cause of the freeze. I know that at line Use $io::("^"_$ZNAME) it stopes because i have put some write functions after every line in WriteCapture method and i only saw the first write function in terminal
I also used debug and in this case it didn't froze
PS: forgot to put the status in the XECUTE (vstrCommand, .status)
This is my method that captures the write:
ClassMethod WriteCapture(vstrComma
Greetings,
Is it possible to save Cache code into a file and then run it via command line?
IE: csession [ini] -U [ini] /path/cacheCodeFile.?
What I need to do is run a Cache script from the Linux command line. The script will navigate data to produce a file and then it will exit back to the command line.
Thanks in advance for everyone's time.
I need to check if one class is a subclass of another (either direct or indirect).
For example:
Class Package.ClassA Extends %Library.Persistent
{
}
Class Package.ClassB Extends Package.ClassA
{
}
Class Package.ClassC Extends Package.ClassB
{
}In this example Package.ClassC is a subclass of 3 classes: %Library.Persistent, Package.ClassA, Package.ClassB.
So any of these checks should return 1:
Write ##class(Some.System.Class).IsSubclass("Package.ClassC", "%Library.Persistent")
Write ##class(Some.System.Class).IsSubclass("Package.ClassC", " Package.ClassA")
WriteHello, I've completed this tutorial: https://community.intersystems.com/post/deepsee-period-date-vs-same-per…
I've used the "year" level instead of a pivot variable.
I want to calculate something like the following variation: 100 * ([DateOfSale].[PTD] - [DateOfSale].[LYPTD]) / [DateOfSale].[LYPTD]
I create a new calculated member, under the same dimmension with the above expression.
I put the new calculated member under the Count measure and it tells me that "Two measures cannot be crossjoined"
What am I doing wrong?
Can you redirect me to some explanations and maybe a solution?
Thanks!
I need to get a list of all classes that are subclasses of two unrelated classes.
For example I want to get a list of all classes that are both:
To get subclasses of one class I can use this query:
set rs = ##class(%Dictionary.ClassDefinitionQuery).SubclassOfFunc("%Library.Persistent")But what about two classes?
I suppose I can run this query twice, build two $lb, then iterate over one of them and build a new $lb with classes that appear in both lists. Are there any better approaches?
Hi!
I am not system admin. But it used to be very simple to install CSP Gateway on an apache system on Linux with Apache installed. I used to run the CSP Gateway installation program and after it was done, all I had to do was fine tune some configurations on CSP Gateway portal on http://<ip>/csp/bin/Systems/Module.cxw and I was up and running.
Good afternoon -
I'm in the process of learning to make COS calls to REST-based web services and while I am having success, I'm struggling on how to parse out the results (I admit I'm very green at this):
Here's the code retrieving the JSON response:
w !,"Get the JSON"Set Result = {}.%FromJSON(Request.HttpResponse.Data)This has Result as a Library.DynamicObject.
I can then write out the response using:
w !,Result.%ToJSON()
This works, I can see the response is valid and what I want. Here is the JSON returned (de-identified):
{
"RecordIDs": [
{
"ID": "1234",
"Type":I'm working on an existing Zen Report that uses queryClass/queryName to retrieve data using a class that has a Stored Procedure method. Which works fine.
I have created second class with a Stored Procedure method, I modified the zen report to use this class and now I'm having the following error.
Error: SQLCODE: -99 Message: User UnknownUser is not privileged for the operation ErrorNo: 5540
Regards,
Rui
Hello everybody.
What I have is a criteria how to select "my" strings. What I need is to replace all of them with macro calls (using the same strings as arguments) in all classes of current namespace.
I was ready to write straightforward code, but at the last moment decided to ask the community: maybe I've overlooked a smarter option?
Any comments and advices would be great appreciated.
Trying to use AES encryption for a url. I have a plain text string, a 16-byte key and a initialization vector. I am trying to match a C# implementation that uses RijndaelManaged class with a BlockSize = 128, Mode = CipherMode.CBC, Padding = PaddingMode.PKCS7. The output of the $SYSTEM.Encryption.AESCBCEncrypt(text,key,IV), doesn't match what is coming out of C#. All inputs into the $SYSTEM.Encryption.AESCBCEncrypt(text,key,IV) are converted to UTF8 as in the documentation.
I can encrypt / decrypt in Caché as specified in the documentation, but the string is differet from the C#, so the
Hi folks, I'm trying to pad my patient MRN to 10 characters before I do a SQL lookup in my BPL. I've tried various approaches, and have not been successful.
When I add a "code" statement with the following code, I get an error as below.
set context.NewID = "0000000000"
set $EXTRACT(context.NewID,10-len(context.PatientID)) = context.PatientID
ERROR <Ens>ErrException: <OBJECT DISPATCH>zS8+5 ^CHSLI.BPLQueryDatabaseforPatientID.Thread1.1 *Property 'NewID' in class 'CHSLI.BPLQueryDatabaseforPatientID.Context' must be MultiDimensional -- logged as '-' number - @' set |
Is there a way to omit or skip rollback of some data changes during a transaction rollback? Maybe some sort of "autonomous transaction"?
The issue is with error logging in transaction. For example we may have in nested calls the following structure:
TS
<some code>
<error happens>
TRO 1
<error log to database>
but if this code is in another transaction, and that rolls back we lose error data.
Is there a way to do something like
TS
<some code>
<error happens>
TRO 1
<autonomous transaction start\flag>
<error log to database>
<autonomous transaction finish\flag>
so error log will be stored anyway?
I know about
Hi All, I want to run the routine automatically when the system gets login.How to do that?
Hi, folks!
I'm sending emails with %Net.MailMessage.
How can I add a new line for the email body?
The code is:
dim msg as %Net.MailMessage = ##class(%Net.MailMessage).%New()
set msg.Charset="UTF-8"
do msg.TextData.Write("Dear "_Username)
do msg.TextData.Write("Line1")
do msg.TextData.Write("Line2")
And I'm getting in email:Dear UserLine1Line2
How can I get:
Dear User Line1 Line2
I want to manipulate all the objects whose type is%Dictionary.StorageSQLMapDefinition by %OpenId
However, I don't know the exact id to feed into %OpenId, is there a way to query all the existing ids of %Dictionary.StorageSQLMapDefinition in a namespace?
Thanks.
We are running Caché v2010.2 on OpenVMS and are receiving the message, 'Unable to start the database read test' in our CCONSOLE.LOG.
I was wondering if anyone could offer some insight on this as I was not able to find the error mentioned in the documentation.
Does anyone know of a utility to compare two databases (i.e., CACHE.DAT files) and find globals/subscripts that are different between them?
If not, I'll write one and share it. ![]()
What is FHIR and How to work with FHIR in Cache.How to we write a web services using FHIR.
Please give the Example.
The dataCombo property columnHeaders is a comma-delimited list of column headers displayed in the dropdown list.
Comma is a delimiter.
But, if I want add comma to columh header, for instance "House number, apartment" - this is value for header of one column.
How can I escape comma in this case?
"House number\, apartment" - is not working.
Hi
Does anybody know what happend to %SYS.GSET routine in Cache 2016 ?
In Cache 2013 it still existed, I didn't find anything about it in Cache realese notes 2014 and 2015.
Uri
tl;dr I have discovered that using $THIS in a very specific way will make persistent objects go stale.
I found that it only happens when using $get on an array that contains the OID reference of $THIS. I assume that this is an unwanted feature and have raised a WRC. The problem can be recreated following the steps below, I have also posted the workaround that I am currently testing and looks to be working fine.
1. Create a persistent class...
Hi all,
I need to create a routine to modifiy some values in a global.
My first attempt was:
but if I use a *.bas file (cache basic script), I'm not able to use these commands ($Order and $Next) and I don't know how to translate theses words.
please, could the comunity help
I worked through the Community for proposals to provide end users
in an easy way with data formatted as EXCEL sheet.
There is a great article Tips & Tricks - SQL to Excel
there's an important message embedded: "EXCEL can interpret HTML tables and display them as usual"
Where's the light weight export to EXCEL ?
Good old CSP is well equipped to produce HTML tables accepted from EXCEL as input.
With modern Browsers you don't even need <head>and <body> tags.
So the required code around your SQL result set is really slim.
And you are free to add any formatting you need either by HTML or in SQL.
The
Hi,
I have been working on a csp page and trying to export it to excel using the standard activex object. I would like to know if it is possible to export the table on the page with formatting to excel? Thank you in advance for any insight.
Thank you,
Subba.
This post will guide you through the process of sizing shared memory requirements for database applications running on InterSystems data platforms. It will cover key aspects such as global and routine buffers, gmheap, and locksize, providing you with a comprehensive understanding. Additionally, it will offer performance tips for configuring servers and virtualizing IRIS applications. Please note that when I refer to IRIS, I include all the data platforms (Ensemble, HealthShare, iKnow, Caché, and IRIS).
[A list of other posts in this series is
Hello everybody,
We have a piece of Caché software which calls an external utility using $zf(-1,command). It works fine under Linux, but under Windows an external process occasionally hangs (due to some internal problems out of the scope here) and need to be killed programmatically. Having PID, it's easy to kill a process. If a Caché process is called with JOB command, the caller can easily get its PID from $zchild, but alas $zf(-1) does not seem to return the similar info. Is it possible to get it somehow?
This is the first article of a series diving into visualization tools and analysis of time series data. Obviously we are most interested in looking at performance related data we can gather from the Caché family of products. However, as we'll see down the road, we are absolutely not limited to that. For now we are exploring python and the libraries/tools available within that ecosystem.
The series is closely tying into Murray's excellent series about Caché performance and monitoring (see here) and more specifically this article.
Disclaimer I: While I will be talking in passing about the
I was wondering if there was a way to if the user is using Studio and changes a file to get the users name and have a function run when the file is changed.
Ive got this working for .int files but not for .csp or .js or .css or any other kinds of files.
When we edit code we are logged in to the Cache backend’s server through Studio by using an iPaddress (which is on our network).
I know now there are concepts of file locks and logs for when certain tasks are ran or when a user maybe edits a file
I was thinking there might be a way to get that Info because of the fact of being logged in through