I have multiple projects that I utilize when debugging in Cache Studio. One of my projects suddenly lost the ability to step through commands with the yellow box and the cursor moving though code lines. The cursor just sits at the entry line while variables apparently do change. Interestingly enough, if I change the project and the debug target, the "yellow box" ability is still there. Apparently losing this functionality is by project/debug target/whatever. The goal is, of course to return it back but how?

0 24 242


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.

0 23 232

Hi all,

I need some advice about JSON conversions and the outputs. I am being sent a JSON response from an API call and I am struggling to produce an output that I can use from it.

I have used the %FromJSON() method call to take the JSON stream source (pData) and convert it to a Dynamic object (object) but I am a little unsure as to how I can read the dynamic object and use it to extract the values from this and set the values as a property in another class.

The current coding I have for the conversion:

0 21 318
Anna Golitsyna · Sep 11, 2020
Automatic Watch variables

I come from Visual Studio and now I use mostly Cache 2017 Studio. One debugging functionality I miss dearly is current local variables automatically appearing in the Watch Variables window together with their values. Yes, I can hover or type them myself but both actions take extra time which is especially noticeable when debugging unfamiliar code across many routines. Any Cache settings or plugins to that effect? If not then why not? And if nothing else is there in Cache, what are the alternatives or hacks in this respect?


0 12 182
Renan Santos · Mar 30, 2021
IRIS and VsCode Questions

Hi Community,


I'm developing an IRIS environment for a project and I would like to take some questions to pass on to the developers that I haven't found yet here in the community:


1. Is it possible to debug the process in VSCode in real time?

2. How can we use the terminal in VsCode for some configuration or just import applications (Example: Web Terminal)?


1 12 203
Michoel Reach · Mar 31, 2021
End Session programmatically

We have a background job that keeps an eye on our ongoing CSP sessions, counts licenses used and some other tasks. Question: If I know the session ID (something like "wuuZ2Gwgxw"), how do I (find and) end that particular session programmatically in ObjectScript - i.e., the equivalent of %session.EndSession=1 in the csp page code?


Michael Reach

0 12 169

Hi! I have a complex SQL select query which I execute via %ResultSet. It also includes a UNION. The select statement within the union should only be done when an external parameter is set, and I'm not sure of way of doing that within SQL, other than something like


WHERE (some conditions)



WHERE :doUnion = 1 AND (some conditions)

...this works, but I don't think it's particularly optimal as I believe it will still execute the second SELECT regardless of :doUnion. It's also sort of hard to read...

0 12 151

I need to set and use some context variables in a transformation (written in DTL), but the code is manually written.

When writing the same as BPL I define context variables and they are visible in transformations called by that process.

In something like this my.DTLtransform sets HL7 message fields to values in context variables:

1 11 194

Hi everyone,

when I'm using the %JSONExport-function on Caché-Objects containing properties of type %integer, %numeric or %boolean, this properties are all automatically converted to Strings in the JSON-Output.

Is there a way to get around this type-cast?


Result with %JSONExport:

maxOrderable and maxReserveable are of type %integer, deliverable and assembly of type %boolean. All 4 properties are shown as quoted Strings.

0 11 217

I have multiple files with different columns, first 9 values are fixed, so i want to ignore the first value, and next 8 values i want to combine into one value using ^ sign

Current Format


Desired Format


Reading each line from the file use below code.

0 11 177


So I am a front end developer working with REST API with Cache database on the BE. The BE guys are currently using Cache through a Windows virtual machine and they claim it is not possible to have a development server to work with. All the work they are doing is directly on the production server and changes are immediate and I think this is a bad idea going forward and we most definitely need a development server that has access to the same code base and different version (through git) to be able to do development. We also do all the testing on this production server with test accounts, but we cannot do automated testing with this setup.

0 11 176

httpRequest POST file Upload multipart

1. is there a code example step-by-step, how to build each part  ?

I tried the demo from intersystems doc's,

I checked it in .Net response, that didnot recognize the File-data part

2. I noticed, there is :

SET BinaryMIMEPart.ContentType="application/octet-stream"

but missing : 

SET BinaryMIMEPart.ContentDisposition (as analogue, let say for VBA EXCEL )

or I do it via the:

Do BinaryMIMEPart.SetHeader("Content-Disposition",...) ?

that is not analouge for VBA

0 11 222
Token Ibragimov · Jun 11, 2020
SFTP connect


I'm trying to upload file to SFTP server.  

I have access to SFTP server . 
My code is bellow 

Try {
Set sftp = ##class(%Net.SSH.Session).%New()

1 10 506

We have a Unicode installation of Cache'. A client wants to send us documents that will be machine-read and loaded, automatically. They want to create the documents in ISO-8859-1 ("Latin-1"). We'd need to convert the text to UTF8 for our system. I saw the documentation on the $ZCONVERT function, but I didn't see this option. How should it be done?


0 10 85

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.

0 10 149
Scott Roth · Jan 13, 2021
Handling Errors

I have a case where our EMR is sending data, but not all the values needed for the Ancillary are valued properly and causes that message to error/halt processing on the Ancillary system, not ideal but its what they do. I would expect them to still process the message except that 1 field, but they don't.

I want to add validation to make sure certain fields are valued correctly for the Vendor. 

So I add some statements to take those items that don't pass this validation out to a batch file with headers.

0 9 147
Scott Roth · Dec 9, 2020
Code migration using VSCode

I am fairly new to using VSCode. I have used VSCode to create some files on our Test Server, now I need to move them to Production.

Looking through the VSCode extension documentation, maybe I missed it but how to I migrate code from one workspace to another. In Studio I was use to exporting the code into an XML and just being able to import it on the Production server version of Studio.



0 9 278


Olá a todos!

Estou com dificuldades de fazer meu select para retornar palavras que contém acentos.

Na minha tabela TESTE, por exemplo, tenho palavras no campo NOME como Fábio e Fabio, porém se eu coloco a instrução:


a instrução só traz FÁBIO.

Como eu faço para trazer todas as palavras: FÁBIO, FABIO, FABÍO, FABIÓ, FÁBÍÓ, FÂBIO, etc...

Conto com sua ajuda!


0 9 110


I am making a request to an API and JSON is coming as follows:

SET %httprequest = ##class(%Net.HttpRequest).%New()
DO %httprequest.Get(URL)
SET %responseBody = %httprequest.HttpResponse.Data.Read()

W %responseBody
{produto:"CHP0001",Local:{IDMV: "000000001",LOTE: "",DtFabric: "null",DtVenc: "null",Atributo06: "0000000002",Atributo07: "",QtdeDisp: "10.00000",QtdeAloc: "0.00000",QtdeSep: "0.00000",QtdeTotal: "10.00000",Status: "OK",Motivo: ""}}

0 9 134


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,


0 9 303

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. Is it possible to delete the cache for $order?



0 8 174

Cache ODBC State S1000 Native Code 400 Illegal Value

This is my query:

select  DateTijdSec from 
 where pnr = '27085070017' and LTestId->Makey='BLA' and VerzamelDatTijd < '2021-03-04-2021 09:04' and glpactieid->makey in ('TAV','TMA') order by DateTijdSec desc

Most likely there is a wrong date time in the table, how can i get the data?




0 8 84