I have an in-memory list of items and I want to check which items match my pattern string.

Pattern string is a comma-separated list of items and special symbols like '*' and maybe '?'.

There's something similar in $system.OBJ.Compile, it accepts patterns: "*.data.*,Sample.*" - and it would compile 'Sample' package and all 'data' packages.

For example:

set list=$lb("abc", "c", "aaa", "bbb")
set result = ..match(list, "a*,*b")
zw result
result=$lb("abc","aaa","bbb")
0 7
0 691

We have a Cache database in Azure, and want to expose it as an OData source (link).

My first attempt was to use Microsoft's Visual Studio 2017 and Entity Framework to create the data models...but it seems as if EF and Cache don't work together. (I do have those instructions from 2013, but they don't work. (See other post. Best answer seems to be "migrate to IRIS 2019.1.")

Is there any other form of OData support?

0 1
0 629

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

2 9
1 1.4K
Question
· Dec 20, 2018
RemoteDatabase Creation Error

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.

0 1
0 161

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.

0 4
0 370

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?

0 2
0 560

I am unable to connect to InterSystems ODBC client. I am seeing the following error:

[Cache ODBC][State : S1000][Native Code 417] Access denied.

$cnx = new PDO("odbc:Driver={InterSystems ODBC};Server=<IP>;Uid=<id>;Pwd=<password>;");

Am i doing anything wrong?

Although, I can successfully connect and retrieve data in MS Excel using ODBC connection where I have configured my DSN and all

0 2
0 2K
Question
· Dec 17, 2018
Terminal Type

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

0 1
1 228

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:

0 4
0 470
Question
· Dec 13, 2018
Cache ODBC error

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.exe]

0 3
0 496

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> ]

0 6
0 463

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.

0 3
0 244

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

0 4
0 481
Question
· Dec 4, 2018
%Unit Test Case

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")
}

}

1 1
1 262

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? Below is a a snippet of the code I am using:

Property mylist as %String (MAXLEN="") [InitialExpression = "route1, route2, route3"];

set routeList = $LISTBUILD(mylist)

&sql(DECLARE MyReport CURSOR FOR

SELECT

ProcessStartDate,

0 3
0 586
Question
· Dec 3, 2018
Rest return 500 error

I have an application which is distributed across maybe 5 servers since it has over a thousand users at a time we had an upgrade to the application last week and I had an integration build that uses the REST service ( ##class(%Net.HttpResponse) but since the upgrade the integration has not be able to communicate with the application tried testing my URL through Postman and all seems ok but if I test direct I get a 500 error anything that I need to check on please or any advice on how to check what's going on.

0 2
0 443

Hello everyone,

I try excuting a SQL Query like this SELECT ID, CompanyName FROM Company WHERE CompanyName LIKE 'condition'

But if I want to search CompanyName have special char %, ex: '100% Co' , 'Group of Mr.%', 'The %TaxProp'...

How can I take % to query, with

0 5
0 844
Question
· Nov 26, 2018
BPL - Foreach IF statement

As part of a BPL I am building I need to foreach over a some repeating elements and look for a certain value, if said value is present I need to forward the message to another operation.

I can't seem to get the if statement inside the foreach loop to work and I think I am doing something wrong?

The error message I am getting:

ERROR <Ens>ErrException: <UNDEFINED>zS2+2^GWH.Messages.Eobs.AKISegmentCheck.Thread1.1 *k1 -- logged as '-' number - @' Set k1=request.GetNextIndex("PIDgrpgrp("_(1)_").ORCgrp()",k1,.tSCTrans)'

Can anyone explain that error to me?

0 3
0 706