Question
· Jun 1, 2017
Casting JSON

I'm doing a REST service. A method has as body parameter a JSON corresponding to a class A.

In my production I have class A so that I retrieve the parameters using a dynamic object, such that:

Set body = ##class(%DynamicObject).%FromJSON(%request.Content)
Set myObjectA = ##class(A).%New()
Set myObjectA.Id = body.Id
Set myObjectA.Name = body.Name
Set myObjectA.Date = body.Date
Set myObjectA.Salary = body.Salary

I would like to know if I can avoid doing the manual mapping, doing a casting, since I am sure that FromJSON will return a class A. Something like this:

0 9
1 861

Hi,

We have a global with 65 million entries. All we are doing is just iterating through each entry to find out the total no of entries. It is currently taking 110 minutes. Is this something normal? What can we do to speed up this process? Below is the program for just iterating each entry in the global.

s sub=" ,count=0
f{
s sub=$o(^YYY(sub)) q:sub=""
s count= count +1
}
w!, "Total Count:"_ count

3 19
1 415

I'm trying to read data from a file and it contains single precision (4 byte) float values. Does Iris/Cache' have a way to convert the binary into a Cache' variable that is accurate?

ZW RECORD
RECORD="EDID"_$c(17,0)_"fLargeRefMinSize"_$c(0)_"DATA"_$c(4,0,0,0,0)_"DGMST&"_$c(0,0,0,0,0,0,0)_"d"_$c(14,0,0,30)_"h+"_$c(0)_"("_$c(0,0,0)_"EDID"_$c(22,0)_"fBribeSpeechcraftMult"_$c(0)_"DATA"_$c(4,0)_"ÍÌÌ=GMST"_$c(28,0,0,0,0,0,0,0)_"c"_$c(14,0,0,30)_"h+"_$c(0)_"("_$c(0,0,0)_"EDID"_$c(12)

The float DATA value for "f" LargeRefMinSize is $c(0,0,0,0) which is obviously 0.

0 6
0 123
Question
· Sep 13, 2019
Mirror Problem with SSL

I'm trying to create a simple mirror with two Cachés 2016.2.1.803 Instances,

but after i create the mirror with the primary and try to connect the fallouver server, i receive the following message:

ERRO #2071: Erro ao recuperar informações do conjunto espelho para 'BPLUS'. Erro: Connection failed: Unexpected error: <READ>SSLServer+191^MIRRORCTL

i'm not using ssl on this configuration, tried with arbiter and without, same effect.

Tried with Caché 2018.1 and Caché 2016.2.1, same problem.

Some tips?

Best,

0 2
0 787
Question
· Jun 15, 2016
Oauth 1.0 library

I am in need of a routine or class method to generate an Oauth 1.0 signature. I was about to code this myself, but thought to check first to see if anyone has already done this and is willing to share.

Thanks in advance for any help.

[UPDATE 06/28/2016]

1 3
0 500

After installing IRIS 2023.1 on a live copy of our production machine our REST Service now consumes a CSP Session with every request. The request is handled as expected, but uses one of the 5 CSP Session per license. So after 25 requests, the license is used up. The Grace time always shows 0 and the session stay for very long. (Maybe the 900 Seconds timeout).
On Caché 2018, we had the same settings for the Webapp and there, only a single Session was set for all requests. The Caché request didn't use any cookies.

0 7
0 310

Hello, I am trying to write a script that will output a .log file. When I get PowerShell to parse the file with Get-Content, I find that there are extra spaces in the parsing. How can I edit my Intersystems script to output a logfile encoded differently? I think its outputting in unicode by default.

0 2
0 114
Question
· Jul 3, 2023
Cache Studio for Windows 11

Has anyone tried loading Cache 2017 on Windows 11?

I'm working with my corporate IT department to get a version published that will work on Windows 11 desktops but I have to prove that it can be loaded before they will give me the rights to install it.

It looks like Cache 2018 is supported but we're still supporting a bunch of 2017 installations until we can begin the move to IRIS.

Meanwhile the new laptops are all being issued with Windows 11 and the installers are all blocked by corporate.

0 5
0 285

I'm having trouble adjusting the protocol used for any CSP Requests. Currently all request to the system are sent over HTTP 1.1

When loading 40+ images on a page, the browser starts stalling request. According to google HTTP 1.1 only allows 6 parallel TCP Connections before suspending the remaining.

I have looked through the Web Gateway Settings, %Net.HttpRequest.HTTPVersion and SSL Configuration but haven't found anything.

0 7
0 195
Question
· Jun 23, 2023
Dateconversion

Hi Community,

I need to convert date 1997-08-09 10:38:39.700000000 into this format 1997-08-09T10:38:39Z

I have tried using all date function $ZDH,$ZDT no luck can anyone help me to convert this into required format.

Thanks,

Smythee

1 5
0 255

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

This is for the veteran programmers out there (you know who you are; you started programming before date 60000).

I'm in the middle of updates for our system, and I've come across many $ZU() calls. Most of them are documented in the "Replacement List", but two are missing: $ZUtil(0) and $ZUtil(1).

I honestly don't remember what these are for (and I'm pretty sure I used them in code in a previous century), so if someone can tell me, great. If you can provide a link to a reference, better!

As always, I appreciate your help.

0 10
0 268

Is there a reason why calling %ExecDirect() (or %Execute) won't set the %SQLCODE of the result set to 100 even when the query returns no data?

Here is the code in question with a bit of contrivance to force the issue:

set statement = ##class(%SQL.Statement).%New()
set result = ##class(%SQL.Statement).%ExecDirect(statement,"select top 0 0 from Example.Testing")
w result.%SQLCODE

The %SQLCODE is set to 0 in this case. The same happens if I use %Prepare and %Execute, e.g.

1 8
0 469

I need to mount a database from another system. We have copied a device from another systems and mounted the device. I want to mount the cache database on this new device to our current instance of cache. If I add the name and path of this new device to the cpf file, the instance fails to start stating the database does not exist. If I attempt to create the database via the management portal, the new device is not accessible. I am missing something but I am not sure what it is. What do I need to do to make the imported device accessible by my cache instance?

0 3
0 140