Caché2016
InterSystems Caché is a multi-model DBMS and application server. See more details here.
Caché2016
It's well-known among Studio users that besides few predefined code fragments (for ObjectScript, Basic, MV Basic) it's possible to add user-defined code fragments. I found it rather convenient to use them as patterns that help to follow some conventions (internal standards) of writing, say, methods descriptions.
But I didn't find a way how to share these patterns, except dumb copy-pasting. Did somebody succeed with this task? Any help would be appreciated.
The use of Source Code Control systems in development is important. And there are a few systems known in the world, like GIT, SVN (Subversion), Perforce, Mercurial. Where the most popular nowadays is the git. Using it is very useful in many cases, but mostly it depends on the code as text, which can be compared between commits, branches, or versions of releases and so on.
Hi,
I exported selected globals from a Cache 2017 database into a single 4 Gb gof file. Now I tried to import from this file via Management Portal on a different machine . Only about half of the globals was imported and my attempts to select additional globals led to nothing, no new globals have been imported. Well, obviously I am mildly curious what's going on and how can I see the corresponding error which did not appear in the Import window but I can also shrug it off and consider what should I do next.
I have java language experence. If I need parse a binary tcp packet . like following format
encoded string and send it to peer by tcp
1byte msg type + 4 byte(unsigned int) + raw byte(body)
To parse this package , Some Java code like this:
byte[] data = new byte[1024];
Bytebuf buf = new ByteBuf(data)
byte type = buf.read()
int len = buf.ReadInt()
byte[] bodyBuff = new byte[len]
buf.Read(bodyBuff)
String str = new String(strBody)
So, does Objectscript have similar functionality to achieve similar results?
Tks.
Hello,
I would like to schedule the Database Compact and Freespace methods as legacy tasks.
Has anyone implemented this yet?
Is this even possible?
The request for this is due to the fact that we have 3 interfaces in a namespace whose messages are deleted after 7 days. All other messages in this namespace should be kept for one year.
This leads to a certain fragmentation. Furthermore, the messages to be deleted are relatively large (MDM^T02 > 32MB), which in turn leads to a fast growth of the database size.
How would you solve this problem?
With kind regards
Armin Gayl
Error management on InterSystems languages has been evolving along time. Next, we will show the different implementations and why you should use the TRY/THROW/CATCH mechanism.
You can read official error recommendations here.
InterSystems will not mark as obsoletes the non-recommended error management methods to allow giving support to legacy applications. We recommend using tools like objectscriptQuality to detect that legacy unrecommended usage along with many other possible issues and bugs.
I need to consume the content of ^SPOOL output over SQL.
^%SPOOL utilities don't look so promising
<pArray index="0">/shared/BENANDERSON</pArray>
When I ran it, I got this error.
Here is the code where I found the issue occurring. The XML reader must see the / as the invalid character. The value of P0 eventually ends up as null which causes another issue downstream. Is there a way for me to proceed with the / in the data? Thank you!
do %request.Content.
Hello Developer Community!
We are looking to better understand how our users configure and manage our products. If you have a few minutes, please fill out this quick survey https://www.surveymonkey.com/r/N2JX3TQ
If you're willing to participate in an in-depth interview about your experiences, you might be eligible for a $100 gift card! Indicate in the survey that you'd like to talk to us and we will be in touch the second week in September!
Feedback from real users like you in invaluable to us and helps us create better product.
Thank you so much!
Hi Community,
I am looking some kind of logic or trigger some events when cache process ends.
For example, if I set some X global when i logged into terminal and when I closed the terminal or process ends by its own, global to be removed.
Thanks in advance!!!.
SR
Hello,
we use a NAS to archive stream from database to files. If we look at the file size on disk, it is bigger than expected.
For example :
File size is 127K
ls -alh | grep write-chupmb-pdf 127K 2020-07-02 10:43 write-chupmb-pdf
Size on disk is 192K
du -sh * | grep write-chupmb-pdf 192K write-chupmb-pdf
Or expected size is 128K (with 4K blocs)
I tried with %Stream.FileBinary, %FileBinaryStream and OPEN/USE/WRITE and with multiple files and file type (PDF, JPG, PNG) and I have the same problem each time.
Hi all.
I have a reponse message that has a property of the type %Collection.ListOfObj and I need to search for an item in this list. Let me show you.
Hi,
We are using CACHE 2017.2.1, I would like to retrieve data from Journal for killed global. Let say we have global name ^ EMP(123) with data and also have some child nodes and it has been killed by using cache kill command for some reason and we don't know who has executed this and when. My questions are below.
1) Can we get back the data of killed global from journal files,Is it possible or not ?
2) If above question is Yes, then how to find that specific journal file, which has the global which has been killed?
Hi Developers
Is there any way that we can pass the values to the read prompts via cache routine.
For example, we have a couple of reports/routine in our system which accepts some inputs and after taking the inputs it generates some data. Right now it has proper UI and where User enters the value and in routines we have Read statements which accepts those inputs for further processing.
Hello,
We would need to handle the following use case:
A system replies to our GET with a list of codes and a signature.
Each code has been signed with the SHA512withECDSA algorithm
We would need to:
1 Concatenate all codes in a string
2 Decode the string which is in Base 64
3 Validate the string using the signature which we get in the reply
We have read for step 2:
Base64Decode
https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.c….
Hi,
Do you know if cache has programs and functions cache
I made a backup of my production base and when I use this function abouve I receve an error, but if I change any letter of the command the function go ok.
Didn´t work SELECT $$JOB1^KMIGxDESIG() FROM DUAL
Work sELECT $$JOB1^KMIGxDESIG() FROM DUAL
for this I.m using ODBC 64.
Thanks
Hi,
I'd like to compare classes in two namespaces, whether the corresponding .cls code exist in both namespaces or not, and if it does exist in both namespaces, whether the CLS code is identical. If there is such a routine out there the better, I'd like to see it. If not, I know how to get a list of classes in each namespace and I can check currClss.TimeChanged.
Hi:
I have an sql outbound adapter. Sometimes we have trouble connecting to the database.
The timeout in develpment is set to 15 seconds in live it is 150 seconds as it is an always connected Buisness operation.
I thought adding E=S or/and X=S would suspend the message. Why does it not?
Is the only way around then adding something to the buisness operation itself/ creating a customised SQL buisness operation rather than EnsLib.SQL.OutboundAdapter?
Thanks
Mark
Hello,
We would need help.
We have used the following commands:
set fecha = "2021-08-18T07:44:14.180+0000"
set nuevaFecha = ##class(Ens.Util.Time).ConvertDateTime(fecha,"%Y-%m-%d%T%H:%M:%S","%d/%m/%Y")And when we write it to the terminal:
w nuevaFechaIt outputs nothing
Could you help us?
We have read:
https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.c…
Greetings,
Since cache is an OOP language, how can I create 2 methods with the same name but different parameters? Right now when I try that I get a compile time error!
Thank you,
Everardo
This article, and following two articles of the series, is intended as a user guide for developers or system administrators, who need to work with OAuth 2.0 framework (further referred to as OAUTH for simplicity) in their InterSystems product based applications.
Those of you that worked already with ECP might know that it operates not only across
operating systems, processor technologies (big-little-endian), but also -with limits- across versions in C/E.
This cross-version feature also includes IRIS (verified for 2020.1) and C/E (2018.3)
Hi,
Can anyone please explain me how to remove trailing squares from the text field (String). Trailing squares is a white space ?
I tried different things like Ltrim, Trim from sql query side and also from object scripting side something below.
If Address1 set Address1 = $ZSTRIP(Address1,"<>P,<>C,<>W")
If Address1 set Address1 = $ZSTRIP(Address1,"$C(9), $C(32), $C(160)")
If Address1 set Address1 = $ZSTRIP(Address1,"*W,*C")
Nothing works for me
Can anyone please help me to solve this
Thanks
I have a Read-Only Reporting Async with a Remote Database defined to a non-mirrored database on the primary failover member. I would like to update the non-mirrored database on the primary from the async; so far all my attempts fail with *protect* errors.
I found this page
https://community.intersystems.com/post/execute-method-failover-member-…
and tried the SqlProc method. The procedure executed, no errors, but the change to the global was never made (or least not retained) either directly or through a JOBbed process. I wonder if I'm missing something in my configuration.
Sometimes standard COS methods fails and returns low level error code (like %File(CopyFile) error code "-3").
As per ISC Support response, Cache is negating low level error codes (adding "-" prefix).
Is there any existing COS method or COS code snippet to obtain low level error description based on low level error code (positive or negative)?
Hi,
I am brand new to Cache and have been tasked with extracting data from the dB. I see that there are a bunch of tools that can be used to extract via SQL Server statements. DataGrip and DBeaver to name 2. I've gone through some documentation and it doesn't look as if SSMS can connect directly. Is there a preferred extraction tool that anyone can recommend. Does the Cache dB have anything built in where I can access the data while seeing a visual of the tables/schema?
Thanks for any advice,
I am converting an object to json, but in the result a "_class" property appears, is there any way to remove this?
.png)
Result:
.png)
for example :
mysql :
alter table xxxx CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
so, How to implement it in the Cache?
Hello Intersystems-Community,
I build an API and there I use $order to get the Data from my Globals.
When I first time use that API it's get an error (504 Gateway-Timout > 60 Sec.).
After 2 reloads it works with a loading time of 2 Sec.! Sounds for me like the $order is cached and it works faster. Is it true $order will be cached?
When it works, I only get the error at the next day. So it's very hard to reproduce that error.