What is the Cache command to display the version of Cache?
To most of us it's almost dogmatic that $H can't be negative!
This is correct concerning the COS Special Variable $HOROLOG.
No doubt. It's the presentation of the actual date & time.
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
For dates before 1841 it's suggested to use Julian date before 1841.
Good for calculations.
But what about values in $H_format ?
Conversion functions $ZD(), $ZDT(), $ZDH(), $ZDTH() and
for SQL $system.SQL.TOCHAR() and $system.SQL.TODATE()
take care of the conversion to human readable date. You know this.
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 , .
Hi, Community!
This post is a digest of the Developer Community postings in August 2017.
Most viewed
Your Workflow: Issue Tracking, Version Control etc. 243
Feeling the power of Caché 188
AES Encryption 159
from the roots to InterSystems 156
Server-side way to disable logins for all users 149
Caché and Ensemble 2017.1.x on OpenVMS - Recall 145
Winning in GIS competition 135
Frontier: A different way of working with REST 118
Handling images with Caché & JSON, and why 57 is a magic number 117
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")
Write ##class(Some.System.Hello, 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!
Hi, Community!
Please find the Developer Community Video of the week on InterSystems Developers YouTube Channel:
System Sizing for Insanely Large Deployments
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:
- Persistent (extends %Library.Persistent)
- XML-Enabled (extends %XML.Adaptor)
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?
Is it possible to dynamically adjust the RetryInterval andFailureTimeout settings in a BPL?
I've got a business process that calls a web service operation to get a session ID from an external system. There is a string property returned in the body of the response that indicate an exception occurred in the external system. I have code in the BPL that examines the property and sets the status property to an error status when that occurs.
Depending on what the value is I want to adjust the RetryInterval and FailureTimeout values used in by the system when the ReplyCodeActions is set to E=RD.
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.
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
Several Ensemble adapters have SERVICEINPUTCLASS and/or SERVICEOUTPUTCLASS parameters defined.
For example:
Class EnsLib.HTTP.InboundAdapter Extends EnsLib.TCP.InboundAdapter
{
Parameter SERVICEINPUTCLASS = "%Stream.Object";
Parameter SERVICEOUTPUTCLASS = "%Stream.Object";
...
}What are they for?
Hi everyone, I have a SQL service that is working fine, except I don't want it to run on a schedule or continuously. I'd like to only run when requested. Run once and then stop until another request. Is there anyway to set up a service like that?
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.
Hi,
I have a process in which i call a rest operation in a while loop, get a response in JSON format of 50 issues, with paging, meaning this call will happen until the total amount of issues will be returned. each JSON is parsed into a proxyObject, and inserted to a list. later the entire list will be sent to an SQL operation which will write the data in the appropriate tables.
The problem i'm encountering, is when i use the "ASSIGN" action, with insert at a certain key (context.i=context.i +1 for each iteration of the loop), i get an Error that says that the value 3 is invalid key.
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.
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 $EXTRACT(context. |
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>
so error log will be stored anyway?
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. ![]()
I have a simple SQL service that does a simple select from an SQL database. After the select, I do an update to set the ProcessedFlag to "Y" for yes, so my next pass doesn't select records already processed. The service works fine, except when it's done I get the error below, anybody know what is causing this error?
Hi all,
I'm exploring using installation manifests to deploy Ensemble configuration changes. I noticed that the documentation uses a macro within an "Error" tag.
<Error Status="$$$NamespaceDoesNotExist">
So I thought this would also be possible with "Var" tags, "If" tags, etc. For example:
<If Condition = "$$$isDevEnvironment">...
What is FHIR and How to work with FHIR in Cache.How to we write a web services using FHIR.
Please give the Example.
Hi Community!
Check the new video on InterSystems Developers YouTube Channel:
Tier 1 Applications in a Virtual Environment


