Let's say I have this simple script file try.script

write 1
write 0

I can execute it in a terminal (csession) by calling:

csession cache < try.script

And I get the following output:

%SYS>
1
%SYS>
0

However I want to use a try catch block in my script:

try {
write 1/0
catch {}
halt

But as script is executed line by line, it's interpreted like this:

0 8
0 1.1K

Hi All,

Actually, I'm developing few restful API's. I want to create a authentication tokens and display it on my login restful API. If I'm using CSP sessionId, how can I validate the session Id's in another or continues restful API's. else, is there any other approach to handle this task.

My Primary goal is, I have to integrate 2 different front end applications. One is Zen framework another one is web pages from Python.

If any lead, it would be appreciated.

Thanks,

Arun Kumar Durairaj.

0 1
0 465
Question
· Sep 25, 2018
Terminal can not be connected.

■Setting up CACHÉ preferred connection server.
server name:localhost
ip adress:127.0.0.1
port:1972
Telnetport:23
web server port:57772
web server ip adress:
CSP server instance:
comment:
Authentication method=>password

■hosts
localhost 127.0.0.1

■os
windows10 (virtual box)

0 6
0 1.9K
Question
· May 7, 2018
Information of Mirror servers

Hi

I'm using this query "Config.MapMirror.List" To get information of the list of servers that are in the mirror system.

I'd like to know how can I know which of the list is the primary and which is the failover or async member.

Is there a way to do it with this query? Is there another query to get this info?

Thanks a lot

0 3
0 349

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 832
Question
· Oct 2, 2018
Terminal Access Denied

HI,

I have been using evaluation version of Cache 2017.2, it was working fine and I was using Cache studio, SMP & Cache Terminal/console till yesterday.

Today, cache was in shutdown status, then I restarted. But, Cache terminal is not working and showing as Access Denied while otherthings like studio and SMP is working as expected. I checked all security level services on SMP, all are fine and enabled.

Can anyone help me to diagnose the problem and make it working.

Thanks.

0 9
0 1.7K
Question
· Jun 4, 2018
Cache Studio 2017.2

Hi all,

I hope this is the right forum to ask this type of question, but I'm running out of ideas.

For reasons beyond my control, we run a version of Intersystems Caché (2013.1) that is not supported by Atelier. As such, I use Caché Studio to do my development.
The issue I have is, I don't run Windows or MAC, but Linux (Ubuntu 18.04 in my case). I've successfully managed to get Studio working using Wine and pretty much everything is usable.

0 8
0 1.9K

Hello,

I'm trying to set Caché-Python Binding on Mac, but there is a problem.

I performed installation and configuration of Caché-Python binding module based on the manual (URL)
including setting of PATH and LD_LIBRARY_PATH in "bash_profile",
and they seems to be done successfully (there was no error in the process).

0 3
0 912
Question
· Aug 16, 2018
%UnitTest.TestCase

I need to start doing unit testing for some of my code.

Why does it delete the unit testing class from Cache when I run the test?

Is there a way to turn this off?

0 20
0 582
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 435

Hi community.

I'm trying to create a "setup" method to be called on a batch script but i'm getting the error <INVALID ARGUMENT> when I pass a string as an argument to this method.

The idea is to call the method with a folder as the parameter, for example:

##class(test.MyClass).MyMethod("D:\path\to\my\file.json")

My class (just for example)

Class test.MyClass

0 7
0 1K

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 625

I'm using Caché as an OAuth authorization server and I want to accept the password credentials grant type. I've found that if I make an authorize request, the Caché authorization server requires some URL parameters that shouldn't be required in password grant (redirect_uri, state, scope, and response_type). If I include these parameters, it calls my DirectLogin() method instead of just calling ValidateUser() as I would expect from the docs. I have two questions:

1 3
1 614

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 681

I've mapped multiple tables (UNION on mapped SQL classes) into a view, using CREATE VIEW.

Through ODBC, in Entity Framework, I am querying against that view and offering paging. The paging is implemented using IQueryable.Skip and IQueryable.Take.

Skip seems to have unexpected results, I believe due to incorrect SQL generated by the Entity Framework provider, though perhaps I've done something incorrectly. The generated SQL looks similar to this (with some bits replaced or altered for security reasons), the basic structure is unaltered.

0 11
0 663

I'm writing a SOAP client in Ensemble (2017.2.2) that is required to pass empty elements to the SOAP server in the form <xsi:type="ns:ResponsibleUser"/> where ResponsibleUser is a class that itself has no properties. I initially thought I'd found the answer with the XMLIGNORENULL parameter of XML enabled classes but this didn't make any difference for SOAP requests, only working when I wrote the XML to a file.

0 1
0 474

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