Danny Wijnschenk · Sep 14, 2020 go to post

Hi Hansel,

Temp should only grow because of use of temporary globals. (^IRIS.temp, ^mtemp, or any other global explicitly mapped to IRISTEMP)
In my experience, sudden growth of temp is mostly due to an SQL query that is doing a join or order of non-indexed columns.
When you restart Iris, you could delete the iristemp (it will recreate it), you can also set a param to truncate it automatically at startup:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
 

Danny Wijnschenk · Sep 14, 2020 go to post

I don't see any performance disavantages in using SOAP or REST to call classmethods of other IRIS instances compared to ECP.
And SOAP/REST is available in all IRIS license types, in contrast with ECP.

Danny Wijnschenk · Sep 3, 2020 go to post

When i use %SQL.Statement, and I pass sql to the %Prepare method as an array, it will start to fail  around 11,400 characters

Danny Wijnschenk · Sep 3, 2020 go to post

The maximum length of a column is defined by the MAXLEN parameter in the class definition.
The maximum string length is 32,767 and 3,641,144 if long strings are enabled.
If you use Streams as data type, you don't have a limit and can use Substring(column, from, maxlen) in SQL

Danny Wijnschenk · Sep 3, 2020 go to post

Look at the file CodeSnippets.txt which is located in the Documents\InterSystems directory on your windows pc where Studio is installed

Danny Wijnschenk · Aug 21, 2020 go to post

What error are you getting ? Can you call the function in terminal ?

SQL queries via xDBC are cached, you can remove the cached queries in the managment portal, Explorer -> SQL :

Danny Wijnschenk · Aug 3, 2020 go to post

You should not always rely that all data is in cache and processing of the data can be done before a timeout occurs. (data will grow, more users can use the system, ...)
For REST queries that have the risk of running too long,  you can do as follows :
- the api responds immediately with a queryId (some sequential number),
- the query continues to run in the background, and the response of the query will be stored in some table/global/...  with the queryId as the key
- a separate api call is used by the client (with the queryId) to get the response (or a 'not ready' status when the query is still running).
It is a little more work on the client to call once to launch the query, and a second.. time to get the results, but you are safe when your systems  grows with data or users

Danny Wijnschenk · Jul 5, 2020 go to post

Hi Robert,

Handy to know i can still use this whenever the internet goes down, and i need to dial into my customers with a 300 BAUD modem !

Danny (fellow dinosaur)

Danny Wijnschenk · Jul 5, 2020 go to post

Hi Anthony,

Look at the doc for the property EntityBody, you can do something like :

Set body = { "MyKey":"MyValue" }
Do httpRequest.EntityBody.Write(  body.%ToJSON() )

 property EntityBody as %GlobalBinaryStream;

When an Entity-Body is included with a message, the data type of that body is determined via the header fields Content-Type and Content- Encoding. These define a two-layer, ordered encoding model.

This is a stream so to insert into this stream use:

Do oref.EntityBody.Write("Data into stream")
Danny Wijnschenk · Feb 7, 2020 go to post

Hi Yone,

what version are you using ? From Caché/Ensemble 2016.2 you could create your json directly like :

Set body = {
     "app_id""e47322de-64c8-43c5-a1b7-42aa6409eb48",
     "headings"{"en":"Cita Atencion Primaria","es":"Cita Atencion Primaria"},
     "subtitle"{"en":"C.P. ISORA","es":"C.P. ISORA"},
     "contents"{"en""Next appointment""es""Siguiente cita"},
     "data":{
                "centro""C.P. ISORA",            
                "fecha""yyyy/mm/dd",       
                "hora""hh:mm",
                "profesional""nombre del profesional",
                "nomUsuario""nombre del usuario",
                "codcita""idCita",
                "sepuedeborrar"1
     },
     "include_player_ids"["2b3a6be7-5475-4871-b3be-a50eb2ec6034"]
}
Do httpRequest.EntityBody.Write(body.%ToJSON())
Danny Wijnschenk · Jan 7, 2020 go to post

Hi Raj,

I use different IDE's and combinations :

- Caché Studio without any extensions for development where i am self-employed and no other developers are involved

- Caché Studio with Serenji source control from Gerorge James for a particular customer where i am one of the developers

- Visual Studio Code with the vscode-objectscript extention from Dmitry Maslennikov for another customer where i am one of the developers.

I like Caché Studio since I use it from day 1, because it is build-in so no need to configure anything. I use the 'projects' feature a lot, and export my projects regularly as a sort of 'light' source control. (I even edit my html and js files in Studio, even when they contain no COS code at all.)

But when developing in teams  a good build-in source control is essential, so that's why i also use the other options. I am still learning Visual Studio Code but it seems the way for the future.

Danny Wijnschenk · Jan 6, 2020 go to post

Hi Youness,

how are you exporting the data to excel : as a .csv file ?

I am not sure if this is your problem, but when exporting data (numbers) to excel,  you need to be careful on the decimal character you are using : if i export numbers with a decimal point, and my locale is set on comma as a decimal , the numbers are treated as strings, and no validation works.

Danny Wijnschenk · Jan 6, 2020 go to post

Hi Evgeny,

the info is at least unreliable, so i vote to ask the author to delete this information from the article. There is already too much fake news on the internet, lets make this little part of the internet as reliable and accurate as possible !

Danny Wijnschenk · Nov 27, 2019 go to post
set myVar="",$piece(myVar,"=",31)=""  ;repeat = 30 times

works also with multiple characters :

USER>set myVar="",$piece(myVar,"=?",31)=""
 
USER>write myVar
=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?=?
 
Danny Wijnschenk · Nov 14, 2019 go to post

It all depends from which backup and journal files you start the recovery.

You need to start from a backup  & all journal files from before your event that killed the data (and stop the restore just before that event, which i assume is 11/14/2019 15:18:56). What happened on this time : did you kill some data or remove the class ?

It seems that the restore did not fully restored the class definition : can you go into studio and recompile the class ?

In the class definition, you will find the actual global names where the data is stored (by default it will be ^User.MemberD and ^User.MemberI (and possibly ^User.MemberS). Do you have these globals after the restore ?

Danny Wijnschenk · Oct 19, 2019 go to post

There is no general answer if it is possible : it depends on the application : I have done conversions in a few  hours, but had also conversions that took a lot longer or were impossible without heavy rewrite of code.

Depends on :

- use of OS-dependencies (VMS/VAX) like working with files/devices or print operations

- use of 'non-standard' Mumps syntax, or relying on specific formats of special variables

- use of  DSM-11 tools (like DASL) or OS tools

- available source code

- ...

Danny Wijnschenk · Sep 26, 2019 go to post

Hi Everardo,

I have seen the error, but not in testing ensemble messages :

USER>Write _test1
 
<FUNCTION>GetProp+2^%CDCalBk
USER 3e1>

variables preceded by _ (underscore) are only to be used in Caché Direct (VISM) programs.

Are you running any code that uses too much underscores ?

For example :

USER>set var1=1
 
USER>set var2="a"_var1
 
USER>set var2="a"__var1  ;two underscores
 
<FUNCTION>GetProp+2^%CDCalBk
USER 3e1>
Danny Wijnschenk · Sep 24, 2019 go to post

Any special mappings in that namespace? Size ?

Try to export classes and routines from that namespace and import them in a new namespace, is it still slow in the new namespace?

Danny Wijnschenk · Sep 22, 2019 go to post

Hi Gunwant,

can you show us the postman screenshot, and your resthandler class.

It will be much easier for the community to solve your problem with this info, than having to guess,

Friendly Regards

Danny Wijnschenk · Aug 18, 2019 go to post

I prefer option 3 as the other options only makes your code more unreadable.

We could use <GLOBAL>^MyGlobal</GLOBAL> in the documentation, and write some script to generate a summary page of all classes that point to this global...

Danny Wijnschenk · Aug 14, 2019 go to post

Are you pointing the filestream to the correct file : is there any data in the filestream (you are using \Temp\GaganTest : it will use the same drive as the one where your database is located, also no extension is mentioned)

You can set a timeout (Set ftp.Timeout = 100) if the ftp server times out when uploading big files.

The file size will not effect your cache.dat size.