how do you change a date format to dd-MMM-YYYY in 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.
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 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.
Hi guys,
I'm running a method on an instance of Cache 2010, which, when compiled, has $$$OK in it's .int code. This line throws an error, telling me that "the OK macro isn't recognized".
Some things I've tried;
- I looked it %occStatus, and the macro definition of OK is there.
- I changed $$$OK to 1 by hand in the .int code. It compiled successfully, but each time I recompile the original class, it's going to put that $$$OK back
- I tried Include %occStatus at the top of the class. The .int code was unchanged when I did this (is my syntax on that wrong?
Let's say you have about 100TB of data in multiple CACHE.DAT. The biggest one is about 30TB but mostly more than 1TB. You have limited time for maintenance during a day, and it is only a few hours at night. You have to check Integrity as much often as possible. And of course backup it.
How would you do it?
Hi All,
I want to connect with Python pages from cache database by using Restful API's. I'm not sure which one is best method. I have mentioned below the methods. Please post your thoughts.
1) CSP Session
2) OAuth 2.0(Delegated access)
3) EWD(Enterprise web development)
Thanks in advance.
Thanks,
Arun Kumar Durairaj.
Here's a fun test to see how well you know ObjectScript.
What will each of the following statements output?
This is the class which I want to test.
Class GSK.MyTestUnit Extends %RegisteredObject {
ClassMethod Add(num1 As %Integer, num2 As %Integer) { s res=num1+num2 q res } }
This is my testing class.
Class GSK.TestingClass Extends %UnitTest.TestCase {
Method test() { Do $$$AssertEquals(##class(GSK.MyTestUnit).Add(3,8),41, "Test Add(2,2)=4 passed ") do $$$AssertNotEquals(##class(GSK.MyTestUnit).Add(3,8),11,"pass/fail") }
}
The test cases are passed even though they should fail.
s ^UnitTestRoot="C:\TestSuite1" d ##class(%UnitTest.Manager).
I am trying to use %INLIST in SQL query using a cursor and the query fails to return results. It appears that the variable I use against %INLIST returns an empty string. All the examples I have seen use result sets and build the query as a string. Is it possible to use %INLIST in a cursor-based query?
Did you know that Caché (and now InterSystems IRIS) has available parser for ObjectScript ?
Well, technically, lexer. It hides under the name of %SyntaxColor class. This class provides API to the DLL used by Studio to do syntax highlighting. As a result if works only under Windows.
I bet that not everyone familiar with InterSystems Caché knows about Studio extensions for working with the source code. You can actually use the Studio to create your own type of source code, compile it into interpretable (INT) and object code, and sometimes even add code completion support. That is, theoretically, you can make the Studio support any programming language that will be executed by the DBMS just as well as Caché ObjectScript. In this article, I will give you a simple example of writing programs in Caché Studio using a language that resembles JavaScript. If you are interested, please read along.
I'm using this code to read a file, line by line.
Most lines are shorter than 32767 symbols, but some are longer. No line is longer than $$$MaxStringLength and long strings are enabled.
Is there a param to Open/Read command I can pass to increase Read limit?
My code:
set filename = pFile
open filename:("R")
for {
use filename read x
quit:$ZEOF=-1
set ^dbg($i(^dbg)) = $lb($e(x,1,10), $e(x,*-10,*), $l(x))
}
close filenameI've checked reclen parameter but it did not seem to help
We are trying to get a custom header that I have added to a request to Cache, and I have seen the following in another post, however it doesn't work for us:
You can do it as in any CSP page/class. With %request, which is object of class %CSP.Request
And headers available in property CgiEnvs, where every http header appear with a prefix HTTP_
So, you may try this code.
set ipCountry=%request.
The following class contains 1 class method "test" that creates a Zen Application and Page:
Class objectscript.createZenPage
{
classmethod test() {
// create Application.
set app=##class(%Dictionary.ClassDefinition).%New()
set app.Super="%ZEN.application"
set app.Name="ZenTest.MyZenApplication"
set app.ProcedureBlock=1
set param=##class(%Dictionary.ParameterDefinition).%New()
set param.Name="APPLICATIONNAME"
set param.Default="MyZenApplication"
set param.parent=app
do param.%Save()
set param=##class(%Dictionary.ParameterDefinition).Hi all,
I have an incoming JSON message with a string field exceeding in length the 'caché long-string limit' of 3641144 characters.
Using {}.%FromJSON(instream) I am able to create %DynamicObject properly. However, I am unable to access the long property, as in every assignment, I get the <MAXSTRING> error.
Is there any way for me to obtain contents of the 'too long' string field as a stream?
Thanks
Jiri
When using the JSON_OBJECT() function in Caché SQL on a %String property that contains JSON syntax, it converts the %String into a JSON object instead of escaping it as a string literal. How can I prevent this? (without ridiculous hacks like "add a space to the beginning of the value" as we don't always know which properties will contain these values and I certainly don't want to have to check for nulls and add/remove a space every single place this value is used in the application)
I don't want these strings automatically marshalled into JSON objects.
I've created a CCDA schema with from an xsd ad now am trying to reference the CCDA elements in a custom class (process). What is the syntax for referencing my CCDA elements?
I've tried the following
Method OnRequest(pRequest As EnsLib.EDI.XML.Document, Output pResponse As Ens.Response) As %Status
{
// constructing PDQ Request
set tPDQRequest = ##class(HS.Message.PatientSearchRequest).%New()
$$$LOGINFO("Starting Process")
set tPDQRequest.Title=pRequest.GetValueAt("/title")
$$$LOGINFO("Title: "_tPDQRequest.Title)
set tPDQRequest.LastName=pRequest.